File Management¶
Save Export Import¶
saving exporting and importing and references
from zoo.libs.maya.cmds.filemanage import saveexportimport saveexportimport.multipleImport(“D:/aFile.ma”, duplicates=4, namespace=”xx”)
- fileModified()¶
Checks if the current scene has been modified, returns True if it needs saving.
- Returns:
True is there have been modifications to the current scene
- Return type:
- untitledFileName()¶
Returns the default maya file name i.e. untitled :rtype: str
- isCurrentSceneUntitled()¶
Determines if the current maya scene is the default untitled file path :rtype: bool
- isPathUntitled(path)¶
Determines if the provided path is an untitled file i.e. mayas default untitled scene
- currentSceneFilePath()¶
Returns the current full file path name of the scene, will be “” if not saved
- Returns:
The full file path of the current scene
- Return type:
- saveAsDialogMaMb(windowCaption='Save File', directory='', okCaption='OK')¶
Pops up a save file dialog and save’s to the new path, returns the name of the file to save.
- Returns:
The path of the file saved, if cancelled will be “”.
- Return type:
- sceneModifiedDialogue()¶
Checks if the file has already been saved. Returns “save”, “discard” or “cancel”.
If not saved opens “save”, “discard” or “cancel” window. Returns the button pressed if “discard” or “cancel”
If “save” is clicked it will try to save the current file, if cancelled will return “cancel”
- Returns:
The button clicked returned as a lower case string “save”, “discard” or “cancel”
- Return type:
- createNewScene(force=True)¶
Creates a new maya scene
- Parameters:
force (bool) – Will force a new scene even if the current scene has not been saved, False will error if not saved
- asciiOrBinary(filePath)¶
- importAllReferences()¶
- multipleReference(filePath, duplicates=4, namespace='xx')¶
References multiple files into the scene
- Parameters:
- Returns:
success if the import was successful
- Return type:
- multipleImport(filePath, duplicates=4, namespace='xx')¶
Import a file multiple times in the scene
- Parameters:
- Returns:
success if the import was successful
- Return type: