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) unicode ../../../_images/query.gif
 

Returns the default file rule value, can return “” as wellFlag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.

defaultOptions (do) unicode ../../../_images/query.gif
 
Return/set a string of default options used by this translator.
extension (ext) unicode ../../../_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”, “uncompressed” “asCompressed”.
filter (f) unicode ../../../_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.

Derived from mel command maya.cmds.translator

Example:

import pymel.core as pm

import maya.cmds as cmds

# Returns true if dxf files can be read.
pm.translator( 'dxf', q=True, rs=True )

Previous topic

pymel.core.system.timerX

Next topic

pymel.core.system.unassignInputDevice

Core

Core Modules

Other Modules

This Page