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

Synopsis

art3dPaintCtx([accopacity=boolean], [afterStrokeCmd=string], [alphablendmode=string], [assigntxt=boolean], [attrnames=string], [beforeStrokeCmd=string], [brushalignment=boolean], [brushdepth=float], [brushfeedback=boolean], [brushtype=string], [clear=boolean], [commonattr=string], [dragSlider=string], [dynclonemode=boolean], [exists=boolean], [expandfilename=boolean], [extendFillColor=boolean], [fileformat=string], [filetxtaspectratio=float], [filetxtsizex=int], [filetxtsizey=int], [floodOpacity=float], [floodall=boolean], [floodselect=boolean], [history=boolean], [image1=string], [image2=string], [image3=string], [keepaspectratio=boolean], [lastRecorderCmd=string], [lastStampName=string], [lowerradius=float], [makeStroke=uint], [mappressure=string], [name=string], [opacity=float], [outline=boolean], [outwhilepaint=boolean], [paintmode=string], [paintoperationtype=string], [painttxtattr=string], [painttxtattrname=string], [pfxScale=float], [pfxWidth=float], [pickColor=boolean], [pickValue=boolean], [playbackCursor=[float, float]], [playbackPressure=float], [preserveclonesource=boolean], [pressureMapping1=int], [pressureMapping2=int], [pressureMapping3=int], [pressureMax1=float], [pressureMax2=float], [pressureMax3=float], [pressureMin1=float], [pressureMin2=float], [pressureMin3=float], [profileShapeFile=string], [projective=boolean], [radius=float], [record=boolean], [reflection=boolean], [reflectionaboutorigin=boolean], [reflectionaxis=string], [reloadtexfile=boolean], [resizeratio=float], [resizetxt=boolean], [rgbcolor=[float, float, float]], [rgbflood=[float, float, float]], [saveTextureOnStroke=boolean], [saveonstroke=boolean], [savetexture=boolean], [screenRadius=float], [selectclonesource=boolean], [shadernames=string], [shapeattr=boolean], [shapenames=string], [showactive=boolean], [soloAsDiffuse=boolean], [stampDepth=float], [stampProfile=string], [stampSpacing=float], [strokesmooth=string], [surfaceConformedBrushVertices=boolean], [tablet=boolean], [tangentOutline=boolean], [textureFilenames=boolean], [updateEraseTex=boolean], [usepressure=boolean], [worldRadius=float])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

art3dPaintCtx is undoable, queryable, and editable.

This is a tool context command for 3d Paint tool.

Return value

None

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

Flags

accopacity, afterStrokeCmd, alphablendmode, assigntxt, attrnames, beforeStrokeCmd, brushalignment, brushdepth, brushfeedback, brushtype, clear, commonattr, dragSlider, dynclonemode, exists, expandfilename, extendFillColor, fileformat, filetxtaspectratio, filetxtsizex, filetxtsizey, floodOpacity, floodall, floodselect, history, image1, image2, image3, keepaspectratio, lastRecorderCmd, lastStampName, lowerradius, makeStroke, mappressure, name, opacity, outline, outwhilepaint, paintmode, paintoperationtype, painttxtattr, painttxtattrname, pfxScale, pfxWidth, pickColor, pickValue, playbackCursor, playbackPressure, preserveclonesource, pressureMapping1, pressureMapping2, pressureMapping3, pressureMax1, pressureMax2, pressureMax3, pressureMin1, pressureMin2, pressureMin3, profileShapeFile, projective, radius, record, reflection, reflectionaboutorigin, reflectionaxis, reloadtexfile, resizeratio, resizetxt, rgbcolor, rgbflood, saveTextureOnStroke, saveonstroke, savetexture, screenRadius, selectclonesource, shadernames, shapeattr, shapenames, showactive, soloAsDiffuse, stampDepth, stampProfile, stampSpacing, strokesmooth, surfaceConformedBrushVertices, tablet, tangentOutline, textureFilenames, updateEraseTex, usepressure, worldRadius
Long name (short name) Argument types Properties
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.
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
alphablendmode(abm) string createqueryedit
Specifies the blend mode used while painting RGB channel. Currently, we support the following blend modes: "Default" "Lighten" "Darken" "Difference" "Exclusion" "Hard Light" "Soft Light" "Multiply" "Screen" "Overlay" "Constant" Default is "Default".
assigntxt(ast) boolean edit
Sends a request to the tool to allocate and assign file textures to the specified attibute on the selected shaders.
attrnames(atn) string createqueryedit
Name of attributes
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
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.
brushdepth(bd) float createqueryedit
Depth of the brush
brushfeedback(brf) boolean createqueryedit
Specifies if the brush additional feedback should be drawn. C: Default is TRUE. Q: When queried, it returns a boolean.
brushtype(brt) string createqueryedit
Name of the brush type
clear(clr) boolean createedit
Floods all cvs/vertices to the current value.
commonattr(cat) string query
Returns a string with the names of all common to all the shaders paintable attributes and supported by the Paint Texture Tool.
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".
dynclonemode(dcm) boolean createqueryedit
Enable or disable dynamic clone mode.
exists(ex) boolean create
Returns true or false depending upon whether the specified object exists. Other flags are ignored.
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.
extendFillColor(efc) boolean createqueryedit
States if the painted textures will be automatically postprocessed on each stroke to fill in the background color. Default is true.
fileformat(eff) string createqueryedit
Name of the file format
filetxtaspectratio(far) float createqueryedit
Specifies the aspect ration of the texture width and height. Default is 1.
filetxtsizex(ftx) int createqueryedit
Specifies the width of the texture. Default is 256.
filetxtsizey(fty) int createqueryedit
Specifies the height of the texture. Default is 256.
floodOpacity(fop) float createqueryedit
Value of the flood opacity
floodall(fal) boolean createqueryedit
Turn on to flood everything
floodselect(fsl) boolean createqueryedit
Should the selected area be flooded?
history(ch) boolean create
If this is a tool command, turn the construction history on for the tool in question.
image1(i1) string createqueryedit
First of three possible icons representing the tool associated with the context.
image2(i2) string createqueryedit
Second of three possible icons representing the tool associated with the context.
image3(i3) string createqueryedit
Third of three possible icons representing the tool associated with the context.
keepaspectratio(kar) boolean createqueryedit
States if the aspect ratio of the file texture sizes should remain constant. Default is true. boolean.
lastRecorderCmd(lrc) string createqueryedit
Value of last recorded command.
lastStampName(lsn) string createqueryedit
Value of the last stamp name.
lowerradius(lr) float createqueryedit
Sets the lower size of the brush (only apply on tablet).
makeStroke(mst) uint createqueryeditmultiuse
Stroke point values.
mappressure(mp) string createqueryedit
Sets the tablet pressure mapping when the table is used. There are three options: "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 "Opacity". Q: When queried, it returns a string.
name(n) string create
If this is a tool command, name the tool appropriately.
opacity(op) float createqueryedit
Sets the brush opacity. C: Default is 1.0. Q: When queried, it returns a float.
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.
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.
paintoperationtype(pot) string createqueryedit
Specifies the operation type used by the Paint Tool. Currently, we support the following paint modes: "Paint", "Smear", "Blur", "Erase" and "Clone". Default is "Paint".
painttxtattr(pta) string createqueryedit
Specifies the attribute on the shader which the user wants to paint. Currently, we support the following attributes: "Color", "Transparency", "Ambient", "Incandescence", "BumpMap", "Diffuse", "Translucence" "Eccentricity" "SpecularColor", "Reflectivity", "ReflectedColor", and user-defined float, float3, double, and double3 attributes. Default is "Color".
painttxtattrname(ptn) string queryedit
Returns a string with the names of all paintable attributes supported by the Paint Texture Tool.
pfxScale(psc) float queryedit
Specifies the scale for Paint Effect brushes.
pfxWidth(pwd) float queryedit
Specifies the width for Paint Effect brushes.
pickColor(pcm) boolean createqueryedit
Set pick color mode on or off
pickValue(pv) boolean createqueryedit
Toggle for picking
playbackCursor(plc) [float, float] createqueryeditmultiuse
Values for the playback cursor.
playbackPressure(plp) float createqueryeditmultiuse
Valus for the playback pressure.
preserveclonesource(pcs) boolean createqueryedit
Whether or not to preserve a clone source.
pressureMapping1(pm1) int createqueryedit
First pressure mapping value
pressureMapping2(pm2) int createqueryedit
Second pressure mapping value
pressureMapping3(pm3) int createqueryedit
Third pressure mapping value
pressureMax1(px1) float createqueryedit
First pressure maximum value
pressureMax2(px2) float createqueryedit
Second pressure maximum value
pressureMax3(px3) float createqueryedit
Third pressure maximum value
pressureMin1(ps1) float createqueryedit
First pressure minimum value
pressureMin2(ps2) float createqueryedit
Second pressure minimum value
pressureMin3(ps3) float createqueryedit
Third pressure minimum value
profileShapeFile(psf) string queryedit
Passes a name of the image file for the stamp shape profile.
projective(prm) boolean createqueryedit
Specifies the projective paint mode. C: Default is 'false'. 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.
record(rec) boolean createqueryedit
Toggle on for recording.
reflection(rn) boolean createqueryedit
Specifies the reflection mode. C: Default is 'false'. Q: When queried, it returns a boolean.
reflectionaboutorigin(rno) boolean createqueryedit
Toggle on to reflect about the origin
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.
reloadtexfile(rtf) boolean edit
Sends a request to the tool to reload the texture from the disc.
resizeratio(rr) float queryedit
Specifies the scale by which to resize the current textures.
resizetxt(rft) boolean edit
Sends a request to the tool to resize all the currently in use textures.
rgbcolor(rgb) [float, float, float] createqueryedit
Colour value
rgbflood(fc) [float, float, float] createqueryedit
Color of the flood
saveTextureOnStroke(sts) boolean createqueryedit
States if the original texture will be automatically saved on each stroke. Default is false.
saveonstroke(sos) boolean createqueryedit
States if the temporary texture will be automatically saved on each stroke. Default is false.
savetexture(stx) boolean edit
Sends a request to the tool to save the texture to the disc.
screenRadius(scR) float createqueryedit
Brush radius on the screen
selectclonesource(scs) boolean createqueryedit
Toggle on to select the clone source
shadernames(hnm) string query
Returns a string with the names of all shaders assigned to selected surfaces.
shapeattr(spa) boolean queryedit
States if the attribute to paint is an attribute of the shape and not the shader. Default is false.
shapenames(shn) string query
Returns a string with the names of all surfaces which are being painted on.
showactive(sa) boolean createqueryedit
Sets on/off the display of the surface isoparms. C: Default is TRUE. Q: When queried, it returns a boolean.
soloAsDiffuse(sod) boolean queryedit
States if the currently paintable texture will be rendered as as diffuse texture in the viewport. Default is false.
stampDepth(stD) float createqueryedit
Depth of the stamps
stampProfile(stP) string createqueryedit
Sets the brush profile of the current stamp. Currently, the following profiles are supported: "gaussian", "poly", "solid" and "square". C: Default is gaussian. Q: When queried, it returns a string.
stampSpacing(stS) float createqueryedit
Specifies the stamp spacing. Default is 1.0.
strokesmooth(ssm) string createqueryedit
Stroke smoothing type name
surfaceConformedBrushVertices(scv) boolean createqueryedit
Enables/disables the the display of the effective brush area as affected vertices.
tablet(tab) boolean query
Returns true if the tablet device is present, false if it is absent
tangentOutline(to) boolean createqueryedit
Enables/disables the display of the brush circle tangent to the surface.
textureFilenames(tfn) boolean query
Returns a string array with the names of all the painted file textures.
updateEraseTex(uet) boolean createqueryedit
Should the erase texture update?
usepressure(up) boolean createqueryedit
Sets the tablet pressure on/off. C: Default is false. Q: When queried, it returns a boolean.
worldRadius(wlR) float createqueryedit
Radius in worldspace

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 have multiple arguments, passed either as a tuple or a list.

Python examples

import maya.cmds as cmds

# Create a new 3d paint context, then switch to it
cmds.art3dPaintCtx('art3dPaintCtx1')
cmds.setToolTo('art3dPaintCtx1')

# Set art3dPaintCtx1's radius to 2.0, lowerradius to 0.5
cmds.art3dPaintCtx('art3dPaintCtx1', edit=True, r=2.0, lr=0.5)