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(SetsItem, self).save(**kwargs) # Save the selection set to the given path mutils.saveSelectionSet( self.path() + "/set.json", objects, metadata={"description": kwargs.get("comment", "")})
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(SetsItem, self).write(path, objects, iconPath, **options) # Save the selection set to the given path mutils.saveSelectionSet( path + "/set.json", objects, metadata={"description": options.get("comment", "")})
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(SetsItem, self).write(path, objects, iconPath, **options) # Save the selection set to the given path mutils.saveSelectionSet( path + "/set.json", objects, metadata={"description": options.get("comment", "")} )
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)