pymel.core.system.translator¶
- translator(*args, **kwargs)¶
Set or query parameters associated with the file translators specified in as the argument.
Flags:
Long Name / Short Name Argument Types Properties defaultFileRule / dfr bool Returns the default file rule value, can return as well defaultOptions / do unicode Return/set a string of default options used by this translator. extension / ext bool Returns the default file extension for this translator. fileCompression / cmp unicode Specifies the compression action to take when a file is saved. Possible values are compressed, uncompressedasCompressed. filter / f bool Returns the filter string used for this translator. list / l bool Return a string array of all the translators that are loaded. loaded / ld bool Returns true if the given translator is currently loaded. objectType / ot bool This flag is obsolete. This will now return the same results as defaultFileRule going forward. optionsScript / os bool Query the name of the options script to use to post the user options UI. When this script is invoked it will expect the name of the parent layout in which the options will be displayed as well as the name of the callback to be invoked once the apply button has been depressed in the options area. readSupport / rs bool Returns true if this translator supports read operations. writeSupport / ws bool Returns true if this translator supports write operations. Flag can have multiple arguments, passed either as a tuple or a list. Derived from mel command maya.cmds.translator
Example:
import pymel.core as pm # Returns true if dxf files can be read. pm.translator( 'dxf', q=True, rs=True )