A class for manipulating references which inherits Path and path. you can create an instance by supplying the path to a reference file, its namespace, or its reference node to the appropriate keyword. The namespace and reference node of the reference can be retreived via the namespace and refNode properties. The namespace property can also be used to change the namespace of the reference.
Use listReferences command to return a list of references as instances of the FileReference class.
It is important to note that instances of this class will have their copy number stripped off and stored in an internal variable upon creation. This is to maintain compatibility with the numerous methods inherited from the path class which requires a real file path. When calling built-in methods of FileReference, the path will automatically be suffixed with the copy number before being passed to maya commands, thus ensuring the proper results in maya as well.
Remove edits from the passed in reference node. The reference must be in an unloaded state. To remove a particular type of edit, use the editCommand flag. If no flag is specified, all edits will be removed.
For use with cleanReference. Remove only this type of edit. Supported edits are: setAttr addAttr deleteAttr connectAttr disconnectAttr and parent
Derived from mel command maya.cmds.file
When queried, this flag returns a string array containing a number that uniquely identifies each instance the file is used.
Derived from mel command maya.cmds.file
Export the main scene animation nodes and animation helper nodes from all referenced objects. This flag, when used in conjunction with the -rfn/referenceNode flag, can be constrained to only export animation nodes from the specified reference file. See -ean/exportAnim flag description for details on usage of animation files.
Force an action to take place. (new, open, save, remove reference)
When queried, this flag returns the name of the reference node associated with the file. If the file is not a reference or does not have a reference node, an empty string is returned. In query mode, this flag can accept a value.
Set the type of this file. By default this can be any one of: “mayaAscii”, “mayaBinary”, “mel”, “OBJ”, “directory”, “plug-in”, “audio”, “move”, “EPS”, “Adobe(R) Illustrator(R)”, “image” plug-ins may define their own types as well.Return a string array of file types that match this file.
Derived from mel command maya.cmds.file
Export the main scene animation nodes and animation helper nodes from the selected referenced objects. This flag, when used in conjunction with the -rfn/referenceNode flag, can be constrained to only export animation nodes from the selected nodes of a specified reference file. See -ean/exportAnim flag description for details on usage of animation files.
Force an action to take place. (new, open, save, remove reference)
When queried, this flag returns the name of the reference node associated with the file. If the file is not a reference or does not have a reference node, an empty string is returned. In query mode, this flag can accept a value.
Set the type of this file. By default this can be any one of: “mayaAscii”, “mayaBinary”, “mel”, “OBJ”, “directory”, “plug-in”, “audio”, “move”, “EPS”, “Adobe(R) Illustrator(R)”, “image” plug-ins may define their own types as well.Return a string array of file types that match this file.
Derived from mel command maya.cmds.file
referenceQuery -editString -onReferenceNode <self.refNode>
Remove the encapsulation of the reference around the data within the specified file. This makes the contents of the specified file part of the current scene and all references to the original file are lost. Returns the name of the reference that was imported.
Derived from mel command maya.cmds.file
When used in conjunction with the -reference flag, this flag determines if the reference is loaded, or if loading is deferred.C: The default is false.Q: When queried, this flag returns true if the reference is deferred, or false if the reference is not deferred. If this is used with -rfn/referenceNode, the -rfn flag must come before -q.
Derived from mel command maya.cmds.file
When used in conjunction with the -reference flag, this flag determines if the reference is loaded, or if loading is deferred.C: The default is false.Q: When queried, this flag returns true if the reference is deferred, or false if the reference is not deferred. If this is used with -rfn/referenceNode, the -rfn flag must come before -q.
Derived from mel command maya.cmds.file
Returns boolean. Queries whether the specified reference file uses namespaces or renaming prefixes.
Derived from mel command maya.cmds.file
This flag loads a file and associates it with the passed reference node. If the reference node does not exist, the command will fail. If the file is already loaded, then this flag will reload the same file.If a file is not given, the command will load (or reload) the last used reference file.
This flag is obsolete and has been replaced witht the loadReferenceDepth flag. When used with the -open flag, no references will be loaded. When used with -import, -reference or -loadReference flags, will load the top-most reference only.
Used to specify which references should be loaded. Valid types are “all”, “none” and “topOnly”, which will load all references, no references and top-level references only, respectively. Must be used with the -open, -import, -reference or -loadReference flags. When “none” is used with -loadReference, only path validation is performed. This can be used to replace a reference without triggering reload.
Used to control the return value in open, import, loadReference, and reference operations. It will force file command to return a list of new nodes added to the current scene.
Derived from mel command maya.cmds.file
Locks attributes and nodes from the referenced file.
Derived from mel command maya.cmds.file
Returns true if the specified namespace exists, false if not.
Derived from mel command maya.cmds.namespace
Returns string array. A main flag used to query the contents of the target reference.
Derived from mel command maya.cmds.referenceQuery
Remove the given file reference from its parent. This will also Remove everything this file references. Returns the name of the file removed. If the reference is alone in its namespace, remove the namespace. If there are objects remaining in the namespace after the file reference is removed, by default, keep the remaining objects in the namespace. To merge the objects remaining in the namespace to the parent or root namespace, use flags mergeNamespaceWithParent or mergeNamespaceWithRoot. The empty file reference namespace is then removed. To forcibly delete all objects, use flag force. The empty file reference namespace is then removed.
Derived from mel command maya.cmds.file
Remove edits from the reference. @param editCommand: If specified, remove only edits of a particular type: addAttr, setAttr, connectAttr, disconnectAttr or parent @param force: Unload the reference if it is not unloaded already
This flag loads a file and associates it with the passed reference node. If the reference node does not exist, the command will fail. If the file is already loaded, then this flag will reload the same file.If a file is not given, the command will load (or reload) the last used reference file.
This flag is obsolete and has been replaced witht the loadReferenceDepth flag. When used with the -open flag, no references will be loaded. When used with -import, -reference or -loadReference flags, will load the top-most reference only.
Used to specify which references should be loaded. Valid types are “all”, “none” and “topOnly”, which will load all references, no references and top-level references only, respectively. Must be used with the -open, -import, -reference or -loadReference flags. When “none” is used with -loadReference, only path validation is performed. This can be used to replace a reference without triggering reload.
Used to control the return value in open, import, loadReference, and reference operations. It will force file command to return a list of new nodes added to the current scene.
Derived from mel command maya.cmds.file
Select all the components of this file as well as its child files. Note that the file specified must be one that is already opened in this Maya session. The default behaviour is to replace the existing selection. Use with the “add” flag to keep the active selection list.
Derived from mel command maya.cmds.file
This flag will unload the reference file associated with the passed reference node.
Derived from mel command maya.cmds.file
Locks attributes and nodes from the referenced file.
Derived from mel command maya.cmds.file
return the path with the copy number at the end