Beispiel #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))
Beispiel #2
0
    def save(self, objects, **kwargs):
        """
        Save all the given object data to the item path on disc.

        :type objects: list[str]
        :type kwargs: dict
        """
        super(PoseItem, self).save(**kwargs)

        # Save the pose to the temp location
        mutils.savePose(self.path() + "/pose.json",
                        objects,
                        metadata={"description": kwargs.get("comment", "")})
Beispiel #3
0
    def write(self, path, objects, iconPath="", **options):
        """
        Write all the given object data to the given path on disc.

        :type path: str
        :type objects: list[str]
        :type iconPath: str
        :type options: dict
        """
        super(PoseItem, self).write(path, objects, iconPath, **options)

        # Save the pose to the temp location
        mutils.savePose(path + "/pose.json",
                        objects,
                        metadata={"description": options.get("comment", "")})
Beispiel #4
0
    def write(self, path, objects, iconPath="", **options):
        """
        Write all the given object data to the given path on disc.

        :type path: str
        :type objects: list[str]
        :type iconPath: str
        :type options: dict
        """
        super(PoseItem, self).write(path, objects, iconPath, **options)

        # Save the pose to the temp location
        mutils.savePose(
            path + "/pose.json",
            objects,
            metadata={"description": options.get("comment", "")}
        )