Make attributes of nodes paintable to Attribute Paint Tool. This command is used to register new attributes to the Attribute Paint tool as paintable. Once registered the attributes will be recognized by the Attribute Paint tool and the user will be able to paint them. In query mode, return type is based on queried flag.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
activate (ac) | bool | ||
|
|||
activateAll (aca) | bool | ||
Activate / deactivate all the registered paintable attributes. Used to filter out some nodes in the attribute paint tool.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list. |
|||
altAttribute (aa) | unicode | ||
|
|||
attrType (at) | unicode | ||
|
|||
clearAll (ca) | bool | ||
|
|||
remove (rm) | bool | ||
|
|||
shapeMode (sm) | unicode | ||
This flag controls how Artisan correlates the paintable node to a corresponding shape node. It is used for attributes of type multi of multi, where the first multi dimension corresponds to the shape index (i.e. cluster nodes). At present, only one value of this flag is supported: “deformer”. By default this flag is an empty string, which means that there is a direct indexing (no special mapping required) of the attribute with respect to vertices on the shape. |
|||
uiName (ui) | unicode | ||
|
Derived from mel command maya.cmds.makePaintable
Example:
import pymel.core as pm
# Make particle.mass paintable.
pm.makePaintable( 'particle', 'mass', attrType='doubleArray' )
# Make particle.goalPP paintable, with a ui name myGoalPP.
# Also make the goalPP0 attribute painted simultaneously
pm.makePaintable( 'particle', 'goalPP', attrType='doubleArray', ui='myGoalPP', altAttribute='goalPP0' )
# Make weightGeometryFilter.weights paintable. Define
# weightGeometryFilter as a deformer node.
pm.makePaintable( 'weightGeometryFilter', 'weights', attrType='multiFloat', sm='deformer' )
# Make all the attributes paintable on the artAttrPaintTest node.
pm.makePaintable( 'artAttrPaintTest', 'intArray', attrType='intArray' )
pm.makePaintable( 'artAttrPaintTest', 'dblArray', attrType='doubleArray' )
pm.makePaintable( 'artAttrPaintTest', 'vecArray', attrType='vectorArray' )
pm.makePaintable( 'artAttrPaintTest', 'intMulti', attrType='multiInteger' )
pm.makePaintable( 'artAttrPaintTest', 'fltMulti', attrType='multiFloat' )
pm.makePaintable( 'artAttrPaintTest', 'dblMulti', attrType='multiDouble' )
pm.makePaintable( 'artAttrPaintTest', 'flt3Multi', attrType='multiVector' )
pm.makePaintable( 'artAttrPaintTest', 'dbl3Multi', attrType='multiVector' )