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 ../../../_images/query.gif
  Returns the default file rule value, can return as well
defaultOptions / do unicode ../../../_images/query.gif
  Return/set a string of default options used by this translator.
extension / ext bool ../../../_images/query.gif
  Returns the default file extension for this translator.
fileCompression / cmp unicode ../../../_images/query.gif
  Specifies the compression action to take when a file is saved. Possible values are compressed, uncompressedasCompressed.
filter / f bool ../../../_images/query.gif
  Returns the filter string used for this translator.
list / l bool ../../../_images/query.gif
  Return a string array of all the translators that are loaded.
loaded / ld bool ../../../_images/query.gif
  Returns true if the given translator is currently loaded.
objectType / ot bool ../../../_images/query.gif
  This flag is obsolete. This will now return the same results as defaultFileRule going forward.
optionsScript / os bool ../../../_images/query.gif
  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 ../../../_images/query.gif
  Returns true if this translator supports read operations.
writeSupport / ws bool ../../../_images/query.gif
  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 )