Ejemplo n.º 1
0
    def save(self, objects, path="", iconPath="", metadata=None, **kwargs):
        """
        Save all the given object data to the given path on disc.

        :type objects: list[str]
        :type path: str
        :type iconPath: str
        :type metadata: None or dict
        """
        if path and not path.endswith(".pose"):
            path += ".pose"

        logger.info(u'Saving: {0}'.format(path))

        # Remove and create a new temp directory
        tempPath = mutils.createTempPath() + "/" + self.transferBasename()

        # Save the pose to the temp location
        mutils.savePose(tempPath, objects, metadata=metadata)

        # Move the mirror table to the given path using the base class
        contents = [tempPath, iconPath]
        super(PoseItem, self).save(path, contents=contents, **kwargs)

        logger.info(u'Saved: {0}'.format(path))
Ejemplo n.º 2
0
    def save(self, objects, path="", iconPath="", metadata=None, **kwargs):
        """
        Save all the given object data to the given path on disc.

        :type objects: list[str]
        :type path: str
        :type iconPath: str
        :type metadata: None or dict
        """
        if path and not path.endswith(".set"):
            path += ".set"

        # Remove and create a new temp directory
        tempPath = mutils.createTempPath() + "/" + self.transferBasename()

        # Save the selection set to the temp location
        mutils.saveSelectionSet(tempPath, objects, metadata=metadata)

        # Move the selection set to the given path using the base class
        contents = [tempPath, iconPath]
        super(SetsItem, self).save(path, contents=contents, **kwargs)
Ejemplo n.º 3
0
    def save(self,
             objects,
             leftSide,
             rightSide,
             path="",
             iconPath="",
             metadata=None,
             **kwargs):
        """
        Save the given objects to the location of the current mirror table.

        :type objects: list[str]
        :type leftSide: str
        :type rightSide: str
        :type path: str
        :type iconPath: str
        :type metadata: None or dict
        """
        if path and not path.endswith(".mirror"):
            path += ".mirror"

        logger.info("Saving: %s" % self.transferPath())

        # Remove and create a new temp directory
        tempPath = mutils.createTempPath() + "/" + self.transferBasename()

        # Save the mirror table to the temp location
        mutils.saveMirrorTable(
            tempPath,
            objects,
            metadata=metadata,
            leftSide=leftSide,
            rightSide=rightSide,
        )

        # Move the mirror table to the given path using the base class
        contents = [tempPath, iconPath]
        super(MirrorItem, self).save(path, contents=contents, **kwargs)