pymel.core.system.exportAsReference

exportAsReference(exportPath, **kwargs)

Export the selected objects into a reference file with the given name. The file is saved on disk during the process. Returns the name of the reference created.

Flags:
  • namespace:
    The namespace name to use that will group all objects during importing and referencing. Change the namespace used to group all the objects from the specified referenced file. The reference must have been created with the Using Namespacesoption, and must be loaded. Non-referenced nodes contained in the existing namespace will also be moved to the new namespace. The new namespace will be created by this command and can not already exist. The old namespace will be removed.
  • renamingPrefix:
    The string to use as a prefix for all objects from this file. This flag has been replaced by -ns/namespace.

Derived from mel command maya.cmds.file