The artAttrTool command manages the list of tool types which are used for attribute painting. This command supports querying the list contents as well as adding new tools to the list. Note that there is a set of built-in tools. The list of built-ins can be queried by starting Maya and doing an “artAttrTool -q”. The tools which are managed by this command are all intended for attribute painting via Artisan: when you create a new context via artAttrCtx you specify the tool name via artAttrCtx’s -whichToolflag. Typically the user may wish to simply use one of the built-in tools. However, if you need to have custom Properties and Values sheets asscociated with your tool, you will need to define a custom tool via artAttrTool -add “toolName”. For an example of a custom attribute painting tool, see the devkit example customtoolPaint.mel. In query mode, return type is based on queried flag.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
add (()) | unicode | ||
|
|||
exists (ex) | unicode | ||
|
|||
remove (rm) | unicode | ||
Removes the named tool from the internal list of tools.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list. |
Derived from mel command maya.cmds.artAttrTool
Example:
import pymel.core as pm
import maya.cmds as cmds
# Add a tool named "customtoolPaint" to the list of
# attribute painting tools, then creates a new context called
# "customtoolPaintContext" which utilises the "customtoolPaint" tool.
#
pm.artAttrTool( add='customtoolPaint' )
# Result: u'customtoolPaint' #
pm.artAttrCtx( 'customtoolPaintContext', whichTool='customtoolPaint' )
# Result: u'customtoolPaintContext' #
# List all tools currently defined.
#
pm.artAttrTool( query=True )
# Result: [u'general', u'blendShapeWeights', u'skinWeights', u'userPaint', u'colorPerVertex', u'artClothPaint', u'artClothCollPaint', u'fluid', u'putty', u'cacheFileWeights', u'NClothPaint', u'NComponentPaint', u'customtoolPaint'] #