Go to: Synopsis. Return value. Flags. Python examples.
setNodeTypeFlag(
[string]
, [display=boolean], [threadSafe=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
setNodeTypeFlag is undoable, queryable, and NOT editable.
This command sets static data on the specified node type. This will affect the class of node type as a whole. The argument passed may be the name of the node type or the node type tag. Node type tags may be found using the objectType command.| boolean | Did the command succeed? |
In query mode, return type is based on queried flag.
| Long name (short name) | Argument types | Properties | ||
|---|---|---|---|---|
display(dsp)
|
boolean
|
|
||
|
||||
threadSafe(ts)
|
boolean
|
|
||
|
||||
import maya.cmds as cmds
# don't display unit conversion nodes
cmds.setNodeTypeFlag( cmds.objectType(tagFromType='unitConversion'), display=False )
cmds.setNodeTypeFlag( 'mesh', threadSafe=True )
cmds.setNodeTypeFlag( 'mesh', q='true', threadSafe=True )
# Returns True
# don't display legacy render layers
cmds.setNodeTypeFlag("renderLayer", display=False)
# Returns True
# ask for the value of the display flag of unit conversion nodes
cmds.setNodeTypeFlag(cmds.objectType(tagFromType='unitConversion'), query=True, display=True)
# Returns False
# ask for the value of the display flag of legacy render layers nodes
cmds.setNodeTypeFlag("renderLayer", query=True, display=True)
# Returns False