pymel.core.context.artUserPaintCtx

artUserPaintCtx(*args, **kwargs)

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.

Flags:

Long Name / Short Name Argument Types Properties
accopacity / aco bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  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.
activeListChangedProc / alp unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Accepts a string that 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.
afterStrokeCmd / asc unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  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
alphaclamp / alc unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  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 ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies the lower bound for the alpha values. C: Default is 0.0. Q: When queried, it returns a float.
alphaclampupper / acu float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies the upper bound for the alpha values. C: Default is 1.0. Q: When queried, it returns a float.
attrSelected / asl unicode ../../../_images/query.gif
  Returns a name of the currently selected attribute. Q: When queried, it returns a string.
beforeStrokeCmd / bsc unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  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
brushalignment / bra bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  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.
brushfeedback / brf bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies if the brush additional feedback should be drawn. C: Default is TRUE. Q: When queried, it returns a boolean.
chunkCommand / cc unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies th name of the Mel script/procedure that is called once for every selected surface when a chunk is received on that surface. Q: When queried, it returns a string.
clamp / cl unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  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 ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies the lower bound for the values. C: Default is 0.0. Q: When queried, it returns a float.
clampupper / clu float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies the upper bound for the values. C: Default is 1.0. Q: When queried, it returns a float.
clear / clr bool ../../../_images/create.gif ../../../_images/edit.gif
  Floods all cvs/vertices to the current value.
colorAlphaValue / cl1 float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  The Alpha value of the color.
colorRGBAValue / cl4 float, float, float, float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  The RGBA value of the color.
colorRGBValue / cl3 float, float, float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  The RGB value of the color.
colorRamp / cr unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Allows a user defined color ramp to be used to map values to colors.
colorfeedback / cf bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Sets on/off the color feedback display. C: Default is FALSE. Q: When queried, it returns a boolean.
colorfeedbackOverride / cfo bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Sets on/off the color feedback override. C: Default is FALSE. Q: When queried, it returns a boolean.
colorrangelower / crl float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies the value that maps to black when color feedback mode is on. C: Default is 0.0. Q: When queried, it returns a float.
colorrangeupper / cru float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies the value that maps to the maximum color when color feedback mode is on. C: Default is 1.0. Q: When queried, it returns a float.
dataTypeIndex / dti int ../../../_images/query.gif ../../../_images/edit.gif
  When the selected paintable attribute is a vectorArray, it specifies which field to paint on.
disablelighting / dl bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  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.
dragSlider / dsl unicode ../../../_images/create.gif ../../../_images/edit.gif
  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, uvvectoror none. C: Default is none.
duringStrokeCmd / dsk unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  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
dynclonemode / dcm bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Enable or disable dynamic clone mode.
exists / ex bool ../../../_images/create.gif
  Returns true or false depending upon whether the specified object exists. Other flags are ignored.
expandfilename / eef bool ../../../_images/create.gif ../../../_images/edit.gif
  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.
exportaspectratio / ear float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Value of aspect ratio for export
exportfilemode / efm unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  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.
exportfilesave / esf unicode ../../../_images/edit.gif
  Exports the attribute map and saves to a specified file.
exportfilesizex / fsx int ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies the width of the attribute map to export. C: Default width is 256. Q: When queried, it returns an integer.
exportfilesizey / fsy int ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies the width of the attribute map to export. C: Default width is 256. Q: When queried, it returns an integer.
exportfiletype / eft unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies the image file format. It can be one of the following: iff, tiff, jpeg, alias, rgb, fitpostScriptEPS, softimage, wavefrontRLA, wavefrontEXP. C: default is tiff. Q: When queried, it returns a string.
filterNodes / fon bool ../../../_images/edit.gif
  Sets the node filter.
finalizeCmd / fc unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies the name of the Mel script/procedure that is called at the end of each stroke. Q: When queried, it returns a string.
fullpaths / fp bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  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.
getArrayAttrCommand / gac unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies the name of the Mel script/procedure that 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.
getSurfaceCommand / gsc unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies the name of the Mel script/procedure that 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.
getValueCommand / gvc unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies the name of the Mel script/procedure that is called every time a value on the surface is needed by the scriptable paint tool. Q: When queried, it returns a string.
history / ch bool ../../../_images/create.gif
  If this is a tool command, turn the construction history on for the tool in question.
image1 / i1 unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  First of three possible icons representing the tool associated with the context.
image2 / i2 unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Second of three possible icons representing the tool associated with the context.
image3 / i3 unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Third of three possible icons representing the tool associated with the context.
importfileload / ifl unicode ../../../_images/edit.gif
  Load the attribute map a specified file.
importfilemode / ifm unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies the channel to import. The valid entries here are: alpha, luminance, red, green, blue, and rgbC: Default is alpha. Q: When queried, it returns a string.
importreassign / irm bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  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.
initializeCmd / ic unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies the name of the Mel script/procedure that is called in the beginning of each stroke. Q: When queried, it returns a string.
interactiveUpdate / iu bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  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.
lastRecorderCmd / lrc unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Value of last recorded command.
lastStampName / lsn unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Value of the last stamp name.
lowerradius / lr float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Sets the lower size of the brush (only apply on tablet).
makeStroke / mst int ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Stroke point values.
mappressure / mp unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  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.
maxvalue / mxv float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies the maximum value for each attribute. C: Default is 1.0. Q: When queried, it returns a float.
minvalue / miv float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies the minimum value for each attribute. C: Default is 0.0. Q: When queried, it returns a float.
name / n unicode ../../../_images/create.gif
  If this is a tool command, name the tool appropriately.
objattrArray / oaa unicode ../../../_images/query.gif
  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.
opacity / op float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Sets the brush opacity. C: Default is 1.0. Q: When queried, it returns a float.
outline / o bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies if the brush should be drawn. C: Default is TRUE. Q: When queried, it returns a boolean.
outwhilepaint / owp bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies if the brush outline should be drawn while painting. C: Default is FALSE. Q: When queried, it returns a boolean.
paintNodeArray / pna unicode ../../../_images/query.gif
  An array of paintable nodes. Q: When queried, it returns a string.
paintattrselected / pas unicode ../../../_images/edit.gif
  An array of selected paintable attributes. Each element of the array is a string with the following information: NodeType.NodeName.AttributeName.
paintmode / pm unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies the paint mode. There are two possibilities: screenand tangent. C: Default is screen. Q: When queried, it returns a string.
paintoperationtype / pot unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies the operation type used by the Paint Tool. Currently, we support the following paint modes: Paint, Smear, Blur, Eraseand Clone. Default is Paint.
pickColor / pcm bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Set pick color mode on or off
pickValue / pv bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Toggle for picking
playbackCursor / plc float, float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Values for the playback cursor.
playbackPressure / plp float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Valus for the playback pressure.
preserveclonesource / pcs bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Whether or not to preserve a clone source.
profileShapeFile / psf unicode ../../../_images/query.gif ../../../_images/edit.gif
  Passes a name of the image file for the stamp shape profile.
projective / prm bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies the projective paint mode. C: Default is ‘false’. Q: When queried, it returns a boolean.
radius / r float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Sets the size of the brush. C: Default is 1.0 cm. Q: When queried, it returns a float.
rampMaxColor / rxc float, float, float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Defines a special color to be used when the value is greater than or equal to the maximum value.
rampMinColor / rmc float, float, float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Defines a special color to be used when the value is less than or equal to the minimum value.
record / rec bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Toggle on for recording.
reflection / rn bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies the reflection mode. C: Default is ‘false’. Q: When queried, it returns a boolean.
reflectionaboutorigin / rno bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Toggle on to reflect about the origin
reflectionaxis / ra unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies the reflection axis. There are three possibilities: x, yand z. C: Default is x. Q: When queried, it returns a string.
screenRadius / scR float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Brush radius on the screen
selectclonesource / scs bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Toggle on to select the clone source
selectedattroper / sao unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  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.
setArrayValueCommand / sac unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies the name of the Mel script/procedure that is called for each paint stamp. A stamp may affect one or more values on the surface. This call rolls up all the calls that would be made to setValueCommand for the stamp into one call with array arguments. Q: When queried, it returns a string.
setValueCommand / svc unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies the name of the Mel script/procedure that is called every time a value on the surface is changed. Q: When queried, it returns a string.
showactive / sa bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Sets on/off the display of the surface isoparms. C: Default is TRUE. Q: When queried, it returns a boolean.
stampDepth / stD float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Depth of the stamps
stampProfile / stP unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Sets the brush profile of the current stamp. Currently, the following profiles are supported: gaussian, soft, solidand square. C: Default is gaussian. Q: When queried, it returns a string.
stampSpacing / stS float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies the stamp spacing. Default is 1.0.
strokesmooth / ssm unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Stroke smoothing type name
surfaceConformedBrushVertices / scv bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Enables/disables the the display of the effective brush area as affected vertices.
tablet / tab bool ../../../_images/query.gif
  Returns true if the tablet device is present, false if it is absent
tangentOutline / to bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Enables/disables the display of the brush circle tangent to the surface.
toolCleanupCmd / tcc unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies the name of the Mel script/procedure that is called when this tool is exited. Q: When queried, it returns a string.
toolOffProc / tfp unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Accepts a strings describing the name of a MEL procedure that is invoked whenever the tool is turned off. For example, cloth invokes clothPaintToolOffwhen 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.
toolOnProc / top unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Accepts a strings describing the name of a MEL procedure that is invoked whenever the tool is turned on. For example, cloth invokes clothPaintToolOnwhen 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.
toolSetupCmd / tsc unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies the name of the Mel script/procedure that is called once for every selected surface when an initial click is received on that surface. Q: When queried, it returns a string.
useColorRamp / ucr bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  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.
useMaxMinColor / umc bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies whether the out of range colors should be used. See rampMinColor and rampMaxColor flags for further details.
usepressure / up bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Sets the tablet pressure on/off. C: Default is false. Q: When queried, it returns a boolean.
value / val float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Specifies the value for each attribute. C: Default is 0.0. Q: When queried, it returns a float.
whichTool / wst unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  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 that takes arguments.
worldRadius / wlR float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Radius in worldspace Flag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.artUserPaintCtx

Example:

import pymel.core as pm

# create the context
pm.artUserPaintCtx('artUserPaintCtx')
# Result: u'artUserPaintCtx' #

# set the init mel script
pm.artUserPaintCtx( 'artUserPaintCtx', e=True, ic='spherePaint' )
# Result: u'artUserPaintCtx' #