Create a editor window that can be painted into
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
activeOnly (ao) | bool | ||
|
|||
autoSave (autoSave) | bool | ||
For Canvas mode, this determines if the buffer will be saved to a disk file after every stroke. Good for painting textures and viewing the results in shaded display in the model view. |
|||
camera (cam) | unicode | ||
|
|||
canvasMode (cm) | bool | ||
|
|||
canvasUndo (cu) | bool | ||
Does a fast undo in Canvas mode. This is a special undo because we are not using any history when we paint in Canvas mode so we provide a single level undo for the Canvas. |
|||
changeCommand (cc) | unicode, unicode, unicode, unicode | ||
Parameters: First string: commandSecond string: editorNameThird string: editorCmdFourth string: updateFuncCall the command when something changes in the editor The command should have this prototype :command(string $editor, string $editorCmd, string $updateFunc, int $reason)The possible reasons could be : 0: no particular reason1: scale color2: buffer (single/double)3: axis4: image displayed5: image saved in memory |
|||
clear (cl) | float, float, float | ||
|
|||
control (ctl) | bool | ||
Query only. Returns the top level control for this editor. Usually used for getting a parent to attach popup menus. Caution: It is possible, at times, for an editor to exist without a control. This flag returns “NONE” if no control is present. |
|||
currentCanvasSize (ccs) | bool | ||
In Query mode, this returns the (X,Y) resolution of the current canvas.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list. |
|||
defineTemplate (dt) | unicode | ||
Puts a command in a mode where any other flags and args are parsed and added to the command template specified in the argument. They will be used as default arguments in any subsequent invocations of the command when templateName is set as the current template. |
|||
displayAppearance (dsa) | unicode | ||
Sets the display appearance of the model panel. Possible values are “wireframe”, “points”, “boundingBox”, “smoothShaded”, “flatShaded”. This flag may be used with the -interactive and -default flags. Note that only “wireframe”, “points”, and “boundingBox” are valid for the interactive mode. |
|||
displayFog (dfg) | bool | ||
For Scene mode, this determines if fog will be displayed in the Paint Effects panel when refreshing the scene. If fog is on, but this is off, fog will only be drawn on the strokes, not the rest of the scene. |
|||
displayImage (di) | int | ||
|
|||
displayLights (dsl) | unicode | ||
|
|||
displayStyle (dst) | unicode | ||
Set the mode to display the image. Valid values are: “color” to display the basic RGB image”mask” to display the mask channel”lum” to display the luminance of the image |
|||
displayTextures (dtx) | bool | ||
|
|||
docTag (dtg) | unicode | ||
|
|||
doubleBuffer (dbf) | bool | ||
|
|||
drawAxis (da) | bool | ||
drawContext (drc) | bool | ||
|
|||
exists (ex) | bool | ||
|
|||
fastUpdate (fu) | int | ||
fileName (fil) | unicode | ||
|
|||
filter (f) | unicode | ||
|
|||
forceMainConnection (fmc) | unicode | ||
Specifies the name of a selectionConnection object which the editor will use as its source of content. The editor will only display items contained in the selectionConnection object. This is a variant of the -mainListConnection flag in that it will force a change even when the connection is locked. This flag is used to reduce the overhead when using the -unlockMainConnection , -mainListConnection, -lockMainConnection flags in immediate succession. |
|||
highlightConnection (hlc) | unicode | ||
Specifies the name of a selectionConnection object which the editor will synchronize with its highlight list. Not all editors have a highlight list. For those that do, it is a secondary selection list. |
|||
iconGrab (ig) | bool | ||
|
|||
loadImage (li) | unicode | ||
|
|||
lockMainConnection (lck) | bool | ||
Locks the current list of objects within the mainConnection, so that only those objects are displayed within the editor. Further changes to the original mainConnection are ignored. |
|||
mainListConnection (mlc) | unicode | ||
Specifies the name of a selectionConnection object which the editor will use as its source of content. The editor will only display items contained in the selectionConnection object. |
|||
menu (mn) | unicode | ||
|
|||
nbImages (nim) | bool | ||
|
|||
newImage (ni) | int, int, float, float, float | ||
Starts a new image in edit mode, setting the resolution to the integer values (X,Y) and clearing the buffer to the floating point values (R,G,B). In Query mode, this returns the (X,Y) resolution of the current Image. |
|||
paintAll (pa) | float | ||
|
|||
panel (pnl) | unicode | ||
Specifies the panel that the editor belongs to. By default if an editor is created in the create callback of a scripted panel it will belong to that panel. If an editor doesn’t belong to a panel it will be deleted when the window that it is in is deleted. |
|||
parent (p) | unicode | ||
|
|||
redrawLast (rl) | bool | ||
|
|||
refreshMode (rmd) | int | ||
|
|||
removeAllImages (ra) | bool | ||
|
|||
removeImage (ri) | bool | ||
|
|||
rollImage (rig) | float, float | ||
In Canvas mode, this rolls the image by the floating point values (X,Y). X and Y are between 0 (no roll) and 1 (full roll). A value of .5 rolls the image 50% (ie. the border moves to the center of the screen. |
|||
saveAlpha (sa) | bool | ||
|
|||
saveBumpmap (sbm) | unicode | ||
|
|||
saveImage (si) | bool | ||
save the current Editor Image to memory. Saved Editor Images are stored in an Editor Image Stack. The most recently saved image is stored in position 0, the second most recently saved image in position 1, and so on... To set the current Editor Image to a previously saved image use the “di/displayImage” flag. |
|||
scaleBlue (sb) | float | ||
|
|||
scaleGreen (sg) | float | ||
|
|||
scaleRed (sr) | float | ||
|
|||
selectionConnection (slc) | unicode | ||
Specifies the name of a selectionConnection object which the editor will synchronize with its own selection list. As the user selects things in this editor, they will be selected in the selectionConnection object. If the object undergoes changes, the editor updates to show the change. |
|||
singleBuffer (sbf) | bool | ||
|
|||
snapShot (snp) | bool | ||
|
|||
stateString (sts) | bool | ||
Query only flag. Returns the MEL command that will edit an editor to match the current editor state. The returned command string uses the string variable $editorName in place of a specific name. |
|||
swap (swp) | int | ||
tileSize (ts) | int | ||
|
|||
unParent (up) | bool | ||
|
|||
undoCache (uc) | bool | ||
By default the last image is cached for undo. If this is set false, then undoing will be disabled in canvas mode and undo in scene mode will force a full refresh. Less memory will be used if this is set false before the first clear or refresh of the current scene. |
|||
unlockMainConnection (ulk) | bool | ||
|
|||
updateMainConnection (upd) | bool | ||
|
|||
useTemplate (ut) | unicode | ||
|
|||
wrap (wr) | bool, bool | ||
|
|||
writeImage (wi) | unicode | ||
|
|||
zoom (zm) | float | ||
|
Derived from mel command maya.cmds.dynPaintEditor
Example:
import pymel.core as pm
import maya.cmds as cmds
pm.dynPaintEditor( 'editor' )
pm.dynPaintEditor( 'editor', e=True, ni=(640, 480, 1.0, 0.5, 0.2) )