Go to: Synopsis. Return value. Flags. MEL examples.

Synopsis

artUserPaintCtx [-accopacity boolean] [-activeListChangedProc string] [-afterStrokeCmd string] [-alphaclamp string] [-alphaclamplower float] [-alphaclampupper float] [-attrSelected string] [-beforeStrokeCmd string] [-brushalignment boolean] [-brushfeedback boolean] [-clamp string] [-clamplower float] [-clampupper float] [-clear] [-colorRamp string] [-colorfeedback boolean] [-colorrangelower float] [-colorrangeupper float] [-dataTypeIndex int] [-disablelighting boolean] [-dragSlider string] [-duringStrokeCmd string] [-exists] [-expandfilename boolean] [-exportfilemode string] [-exportfilesave string] [-exportfilesizex int] [-exportfilesizey int] [-exportfiletype string] [-filterNodes] [-finalizeCmd string] [-fullpaths boolean] [-getArrayAttrCommand string] [-getSurfaceCommand string] [-getValueCommand string] [-history boolean] [-image1 string] [-image2 string] [-image3 string] [-importfileload string] [-importfilemode string] [-importreassign boolean] [-initializeCmd string] [-interactiveUpdate boolean] [-lowerradius float] [-mappressure string] [-maxvalue float] [-minvalue float] [-name string] [-objattrArray string] [-opacity float] [-outline boolean] [-outwhilepaint boolean] [-paintNodeArray string] [-paintattrselected string] [-paintmode string] [-profileShapeFile string] [-projective boolean] [-radius float] [-rampMaxColor float float float] [-rampMinColor float float float] [-reflection boolean] [-reflectionaxis string] [-selectedattroper string] [-setValueCommand string] [-showactive boolean] [-stampProfile string] [-surfaceConformedBrushVertices boolean] [-tablet] [-tangentOutline boolean] [-toolCleanupCmd string] [-toolOffProc string] [-toolOnProc string] [-toolSetupCmd string] [-useColorRamp boolean] [-useMaxMinColor boolean] [-usepressure boolean] [-value float] [-whichTool string]

artUserPaintCtx is undoable, queryable, and editable.

This is a context command to set the flags on the artAttrContext, which is the base context for attribute painting operations. All commands require the name of the context as the last argument as this provides the name of the context to create, edit or query. This command executes a scriptable paint (Maya Artisan). It allows the user to apply mel commands/scripts to modify cvs' attributes for all cvs under the paint brush.

Return value

stringThe name of the context created.

In query mode, return type is based on queried flag.

Flags

accopacity, activeListChangedProc, afterStrokeCmd, alphaclamp, alphaclamplower, alphaclampupper, attrSelected, beforeStrokeCmd, brushalignment, brushfeedback, clamp, clamplower, clampupper, clear, colorRamp, colorfeedback, colorrangelower, colorrangeupper, dataTypeIndex, disablelighting, dragSlider, duringStrokeCmd, exists, expandfilename, exportfilemode, exportfilesave, exportfilesizex, exportfilesizey, exportfiletype, filterNodes, finalizeCmd, fullpaths, getArrayAttrCommand, getSurfaceCommand, getValueCommand, history, image1, image2, image3, importfileload, importfilemode, importreassign, initializeCmd, interactiveUpdate, lowerradius, mappressure, maxvalue, minvalue, name, objattrArray, opacity, outline, outwhilepaint, paintNodeArray, paintattrselected, paintmode, profileShapeFile, projective, radius, rampMaxColor, rampMinColor, reflection, reflectionaxis, selectedattroper, setValueCommand, showactive, stampProfile, surfaceConformedBrushVertices, tablet, tangentOutline, toolCleanupCmd, toolOffProc, toolOnProc, toolSetupCmd, useColorRamp, useMaxMinColor, usepressure, value, whichTool
Long name (short name) Argument types Properties
-exists(-ex) create
Returns true or false depending upon whether the specified object exists. Other flags are ignored.
-image1(-i1) string createqueryedit
-image2(-i2) string createqueryedit
-image3(-i3) string createqueryedit
Contexts support up to three icons that represent the tool associated with the context.
-history(-ch) boolean create
If this is a tool command, turn the construction history on for the tool in question.
-name(-n) string create
If this is a tool command, name the tool appropriately.
-dragSlider(-dsl) string createedit
Sets the current brush drag state for resizing or offsetting the brush (like the 'b' and 'm' default hotkeys). The string argument is one of: "radius", "lowradius", "opacity", "value", "depth", "displacement", "uvvector" or "none". C: Default is "none".
-opacity(-op) float createqueryedit
Sets the brush opacity. C: Default is 1.0. Q: When queried, it returns a float.
-accopacity(-aco) boolean createqueryedit
Sets opacity accumulation on/off. C: Default is false (Except for sculpt tool for which it is true by default). Q: When queried, it returns a boolean.
-radius(-r) float createqueryedit
Sets the size of the brush. C: Default is 1.0 cm. Q: When queried, it returns a float.
-lowerradius(-lr) float createqueryedit
Sets the lower size of the brush (only apply on tablet).
-stampProfile(-stP) string createqueryedit
Sets the brush profile of the current stamp. Currently, the following profiles are supported: "gaussian", "soft", "solid" and "square". C: Default is gaussian. Q: When queried, it returns a string.
-profileShapeFile(-psf) string queryedit
Passes a name of the image file for the stamp shape profile.
-brushalignment(-bra) boolean createqueryedit
Specifies the path brush alignemnt. If true, the brush will align to stroke path, otherwise it will align to up vector. C: Default is true. Q: When queried, it returns a boolean.
-clear(-clr) createedit
Floods all cvs/vertices to the current value.
-usepressure(-up) boolean createqueryedit
Sets the tablet pressure on/off. C: Default is false. Q: When queried, it returns a boolean.
-mappressure(-mp) string createqueryedit
Sets the tablet pressure mapping when the table is used. There are four options: "none" - the pressure has no effect, "opacity" - the pressure is mapped to the opacity, "radius" - the is mapped to modify the radius of the brush, "both" - the pressure modifies both the opacity and the radius. C: Default is "none". Q: When queried, it returns a string.
-outline(-o) boolean createqueryedit
Specifies if the brush should be drawn. C: Default is TRUE. Q: When queried, it returns a boolean.
-outwhilepaint(-owp) boolean createqueryedit
Specifies if the brush outline should be drawn while painting. C: Default is FALSE. Q: When queried, it returns a boolean.
-brushfeedback(-brf) boolean createqueryedit
Specifies if the brush additional feedback should be drawn. C: Default is TRUE. Q: When queried, it returns a boolean.
-showactive(-sa) boolean createqueryedit
Sets on/off the display of the surface isoparms. C: Default is TRUE. Q: When queried, it returns a boolean.
-paintmode(-pm) string createqueryedit
Specifies the paint mode. There are two possibilities: "screen" and "tangent". C: Default is "screen". Q: When queried, it returns a string.
-projective(-prm) boolean createqueryedit
Specifies the projective paint mode. C: Default is 'false'. Q: When queried, it returns a boolean.
-reflection(-rn) boolean createqueryedit
Specifies the reflection mode. C: Default is 'false'. Q: When queried, it returns a boolean.
-reflectionaxis(-ra) string createqueryedit
Specifies the reflection axis. There are three possibilities: "x", "y" and "z". C: Default is "x". Q: When queried, it returns a string.
-importfileload(-ifl) string edit
Load the attribute map a specified file.
-importreassign(-irm) boolean createqueryedit
Specifies if the multiply atrribute maps are to be reassigned while importing. Only maps previously exported from within Artisan can be reassigned. C: Default is FALSE. Q: When queried, it returns a boolean.
-importfilemode(-ifm) string createqueryedit
Specifies the channel to import. The valid entries here are: "alpha", "luminance", "red", "green", "blue", and "rgb" C: Default is "alpha". Q: When queried, it returns a string.
-expandfilename(-eef) boolean createedit
If true, it will expand the name of the export file and concatenate it with the surface name. Otherwise it will take the name as it is. C: Default is true.
-exportfilesave(-esf) string edit
Exports the attribute map and saves to a specified file.
-exportfilemode(-efm) string createqueryedit
Specifies the export channel.The valid entries here are: "alpha", "luminance", "rgb", "rgba". C: Default is "luminance/rgb". Q: When queried, it returns a string.
-exportfilesizex(-fsx) int createqueryedit
Specifies the width of the attribute map to export. C: Default width is 256. Q: When queried, it returns an integer.
-exportfilesizey(-fsy) int createqueryedit
Specifies the width of the attribute map to export. C: Default width is 256. Q: When queried, it returns an integer.
-exportfiletype(-eft) string createqueryedit
Specifies the image file format. It can be one of the following: "iff", "tiff", "jpeg", "alias", "rgb", "fit" "postScriptEPS", "softimage", "wavefrontRLA", "wavefrontEXP". C: default is tiff. Q: When queried, it returns a string.
-tablet(-tab) query
Returns true if the tablet device is present, false if it is absent
-surfaceConformedBrushVertices(-scv) boolean createqueryedit
Enables/disables the the display of the effective brush area as affected vertices.
-tangentOutline(-to) boolean createqueryedit
Enables/disables the display of the brush circle tangent to the surface.
-selectedattroper(-sao) string createqueryedit
Sets the edit weight operation. Four edit weights operations are provided : "absolute" - the value of the weight is replaced by the current one, "additive" - the value of the weight is added to the current one, "scale" - the value of the weight is multiplied by the current one, "smooth" - the value of the weight is divided by the current one. C: Default is "absolute". Q: When queried, it returns a string.
-filterNodes(-fon) edit
Sets the node filter.
-value(-val) float createqueryedit
Specifies the value for each attribute. C: Default is 0.0. Q: When queried, it returns a float.
-minvalue(-miv) float createqueryedit
Specifies the minimum value for each attribute. C: Default is 0.0. Q: When queried, it returns a float.
-maxvalue(-mxv) float createqueryedit
Specifies the maximum value for each attribute. C: Default is 1.0. Q: When queried, it returns a float.
-useColorRamp(-ucr) boolean createqueryedit
Specifies whether the user defined color ramp should be used to map values from to colors. If this is turned off, the default greyscale feedback will be used.
-colorRamp(-cr) string createqueryedit
Allows a user defined color ramp to be used to map values to colors.
-useMaxMinColor(-umc) boolean createqueryedit
Specifies whether the out of range colors should be used. See rampMinColor and rampMaxColor flags for further details.
-rampMinColor(-rmc) float float float createqueryedit
Defines a special color to be used when the value is less than or equal to the minimum value.
-rampMaxColor(-rxc) float float float createqueryedit
Defines a special color to be used when the value is greater than or equal to the maximum value.
-clamp(-cl) string createqueryedit
Specifies if the weight value should be clamped to the lower and upper bounds. There are four options here: "none" - no clamping is performed, "lower" - clamps only to the lower bound, "upper" - clamps only to the upper bounds, "both" - clamps to the lower and upper bounds. C: Default is "none". Q: When queried, it returns a string.
-clamplower(-cll) float createqueryedit
Specifies the lower bound for the values. C: Default is 0.0. Q: When queried, it returns a float.
-clampupper(-clu) float createqueryedit
Specifies the upper bound for the values. C: Default is 1.0. Q: When queried, it returns a float.
-alphaclamp(-alc) string createqueryedit
Specifies if the weight value should be alpha clamped to the lower and upper bounds. There are four options here: "none" - no clamping is performed, "lower" - clamps only to the lower bound, "upper" - clamps only to the upper bounds, "both" - clamps to the lower and upper bounds. C: Default is "none". Q: When queried, it returns a string.
-alphaclamplower(-acl) float createqueryedit
Specifies the lower bound for the alpha values. C: Default is 0.0. Q: When queried, it returns a float.
-alphaclampupper(-acu) float createqueryedit
Specifies the upper bound for the alpha values. C: Default is 1.0. Q: When queried, it returns a float.
-dataTypeIndex(-dti) int queryedit
When the selected paintable attribute is a vectorArray, it specifies which field to paint on.
-colorfeedback(-cf) boolean createqueryedit
Sets on/off the color feedback display. C: Default is FALSE. Q: When queried, it returns a boolean.
-disablelighting(-dl) boolean createqueryedit
If color feedback is on, this flag determines whether lighting is disabled or not for the surfaces that are affected C: Default is FALSE. Q: When queried, it returns a boolean.
-colorrangelower(-crl) float createqueryedit
Specifies the value which maps to black when color feedback mode is on C: Default is 0.0. Q: When queried, it returns a float.
-colorrangeupper(-cru) float createqueryedit
Specifies the value which maps to the maximum color when color feedback mode is on C: Default is 1.0. Q: When queried, it returns a float.
-interactiveUpdate(-iu) boolean createqueryedit
Specifies how often to transfer the painted values into the attribute. TRUE: transfer them "continuously" (many times per stroke) FALSE: transfer them only at the end of a stroke (on mouse button release) C: Default is TRUE. Q: When queried, it returns a boolean.
-paintNodeArray(-pna) string query
An array of paintable nodes. Q: When queried, it returns a string.
-objattrArray(-oaa) string query
An array of all paintable attributes. Each element of the array is a string with the following information: NodeType.NodeName.AttributeName.MenuType *MenuType: type(level) of the item in the Menu (UI). Q: When queried, it returns a string.
-attrSelected(-asl) string query
Returns a name of the currently selected attribute. Q: When queried, it returns a string.
-paintattrselected(-pas) string edit
An array of selected paintable attributes. Each element of the array is a string with the following information: NodeType.NodeName.AttributeName.
-beforeStrokeCmd(-bsc) string createqueryedit
The passed string is executed as a MEL command immediately before the start of a stroke. C: Default is no command. Q: When queried, it returns the current command
-duringStrokeCmd(-dsk) string createqueryedit
The passed string is executed as a MEL command during the stroke, each time the mouse is dragged. C: Default is no command. Q: When queried, it returns the current command
-afterStrokeCmd(-asc) string createqueryedit
The passed string is executed as a MEL command immediately after the end of a stroke. C: Default is no command. Q: When queried, it returns the current command
-whichTool(-wst) string createqueryedit
The string defines the name of the tool to be used for the Artisan context. An example is "artClothPaint". In query mode, the tool name for the given context is returned. Note: due to the way MEL works, always specify the -query flag last when specifying a flag which takes arguments.
-activeListChangedProc(-alp) string createqueryedit
Accpts a string which contains a MEL command that is invoked whenever the active list changes. There may be some situations where the UI, for example, needs to be updated, when objects are selected/deselected in the scene. In query mode, the name of the currently registered MEL command is returned and this will be an empty string if none is defined.
-toolOnProc(-top) string createqueryedit
Accepts a strings describing the name of a MEL procedure which is invoked whenever the tool is turned on. For example, cloth invokes "clothPaintToolOn" when the cloth paint tool is turned on. Define this callback if your tool requires special functionality when your tool is activated. It is typical that if you implement a toolOnProc you will want to implement a toolOffProc as well (see the -toolOffProc flag. In query mode, the name of the currently registered MEL command is returned and this will be an empty string if none is defined.
-toolOffProc(-tfp) string createqueryedit
Accepts a strings describing the name of a MEL procedure which is invoked whenever the tool is turned off. For example, cloth invokes "clothPaintToolOff" when the cloth paint tool is turned on. Define this callback if your tool requires special functionality when your tool is deactivated. It is typical that if you implement a toolOffProc you will want to implement a toolOnProc as well (see the -toolOnProc flag. In query mode, the name of the currently registered MEL command is returned and this will be an empty string if none is defined.
-toolSetupCmd(-tsc) string createqueryedit
Specifies the name of the mel script/procedure which is called once for every selected surface when an initial click is received on that surface. Q: When queried, it returns a string.
-toolCleanupCmd(-tcc) string createqueryedit
Specifies the name of the mel script/procedure which is called when this tool is exited. Q: When queried, it returns a string.
-initializeCmd(-ic) string createqueryedit
Specifies the name of the mel script/procedure which is called in the beginning of each stroke. Q: When queried, it returns a string.
-finalizeCmd(-fc) string createqueryedit
Specifies the name of the mel script/procedure which is called at the end of each stroke. Q: When queried, it returns a string.
-getValueCommand(-gvc) string createqueryedit
Specifies the name of the mel script/procedure which is called every time a value on the surface is needed by the scriptable paint tool. Q: When queried, it returns a string.
-setValueCommand(-svc) string createqueryedit
Specifies the name of the mel script/procedure which is called every time a value on the surface is changed. Q: When queried, it returns a string.
-getSurfaceCommand(-gsc) string createqueryedit
Specifies the name of the mel script/procedure which is called once for every dependency node on the selection list, whenever Artisan processes the selection list. It returns the name of the surface to paint on. Q: When queried, it returns a string.
-getArrayAttrCommand(-gac) string createqueryedit
Specifies the name of the mel script/procedure which is called once for every surface that is selected for painting. This procedure returns a string, which is interpreted as a list of names referring to double array attributes on some dependency node. Q: When queried, it returns a string.
-fullpaths(-fp) boolean createqueryedit
Specifies whether full path names should be used when surface names are passed to scripts. If false, just the surface name is passed. C: Default is false Q: When queried, it returns a boolean.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can be used more than once in a command.

MEL examples

// create the context
artUserPaintCtx artUserPaintCtx;
// set the init mel script
artUserPaintCtx -e -ic "spherePaint" artUserPaintCtx;