Exemple #1
0
def saveControlShapeToFile(name, icon, curve, filePath):
    """
    Save a control curve to a yaml file.

    Args:
        curve (PyNode): A curve transform node containing one or
            more curve shapes.
    """
    data = {
        'name': name,
        'icon': icon,
        'sort': 100,
        'curves': getShapeData(curve),
    }
    with open(filePath, 'wb') as fp:
        yaml.dump(data, fp)
Exemple #2
0
    def saveToFile(self, filepath):
        """
        Returns:
            True if the save was successful
        """
        sceneName = pm.sceneName()
        if not sceneName:
            return False

        LOG.debug("Saving blueprint: {0}".format(filepath))

        data = self.serialize()
        with open(filepath, 'wb') as fp:
            yaml.dump(data, fp, default_flow_style=False, Dumper=PulseDumper)

        return True
Exemple #3
0
 def dumpYaml(self):
     data = self.serialize()
     return yaml.dump(data, default_flow_style=False, Dumper=PulseDumper)