Difference between revisions of "Paint"

From Silhouette Wiki
Jump to navigation Jump to search
(Created page with "The Paint object is a global object used to interact with the Paint UI while in the Paint Node. === Attributes === {| class="wikitable" ! scope="col" | Name ! scope="col...")
 
 
(5 intermediate revisions by the same user not shown)
Line 7: Line 7:
 
! scope="col" class="unsortable" | Description
 
! scope="col" class="unsortable" | Description
 
|-
 
|-
|angle
+
|align
|The current display angle, when rotate mode is enabled.
+
|True if the Clone overlay mode is set to Align.
 
|-
 
|-
|blend
+
|alphaSource
|The current blend amount, for blending between views in supported nodes.
+
|The current alpha source used for ''Obey Alpha''. (0=input, 1=output)
 
|-
 
|-
|channelMask
+
|brush
|The current channel mask, as a [[Color]].
+
|The current brush name.
 
|-
 
|-
|colorSpace
+
|brushes
|The current OCIO display colorspace name.
+
|The List of available brush names. (''read-only'')
 
|-
 
|-
|device
+
|brushSize
|The current OCIO display device name.
+
|The current brush size (diameter in pixels).
 
|-
 
|-
|exposure
+
|channelMask
|The current display exposure value.
+
|The target channel mask as a [[Color]].
|-
 
|gamma
 
|The current display gamma value.
 
 
|-
 
|-
|hand
+
|cloneOffset
|True if viewer rotate angle edit mode is enabled.
+
|The current clone offset as a [[Point3D]].
 
|-
 
|-
|lut
+
|invertAlpha
|The current OCIO display LUT name, or None.
+
|True if ''Invert Alpha'' is on.
 
|-
 
|-
|magnify
+
|matchMove
|True if the magnifier is enabled.
+
|True if ''Match Move'' is on.
 
|-
 
|-
|maskEnabled
+
|opaqueAlpha
|True if the frame mask is enabled.
+
|True if ''Opaque Alpha'' is on.
 
|-
 
|-
|node
+
|onionSkin
|The active edit [[Node]]. Setting this will change the [[Node]] being edited.
+
|True if the Clone overlay mode is on.
 
|-
 
|-
|overlay
+
|onionSkinMix
|True if the overlay is enabled.
+
|The mix value of the Clone overlay.
 
|-
 
|-
|rotate
+
|opacity
|True if viewer rotate mode is enabled.
+
|The current brush opacity.
 
|-
 
|-
|stabilize
+
|preset
|True if stabilization is enabled.
+
|The current Preset index.
 
|-
 
|-
|stereo
+
|profileType
|True if the current [[Node]] generates or passes stereo data.
+
|The current Brush Profile index (0=Circle, 1=Square)
 
|-
 
|-
|stereoAlign
+
|transformMode
|True if in stereo alignment mode
+
|True if Clone Interactive Transform mode is enabled.
 
|-
 
|-
|streamMask
+
|cloneOffsetModifier
|The current [[Silhouette Module Reference#Stream Mask Constants|Stream Mask]] (''read-only''), indicating which streams the current [[Node]] generates or passes (ie. the available streams).
+
|The [[Silhouette Module Reference#Modifier Constants|Modifier]] used for setting the Clone Offset
 
|-
 
|-
|streamMode
+
|brushEditModifier
|The current [[Silhouette Module Reference#Stream Mode Constants|Stream Mode]]. Check the <tt>streamMask</tt> attribute to determine the available streams.
+
|The [[Silhouette Module Reference#Modifier Constants|Modifier]] used for editing the Brush Size.
|-
 
|toolName
 
|The current tool name.
 
|-
 
|updateMode
 
|The current update mode (0=Drag, 1=Adaptive, 2=Release, 3=Manual)
 
|-
 
|viewMode
 
|The current view mode (the number of available view modes depends on the current edit [[Node]])
 
|-
 
|viewNode
 
|The current viewing [[Node]]. Note the view node can be different than the edit node.
 
|-
 
|xform
 
|The current OCIO display transform name.
 
|-
 
|zoom
 
|The current zoom level (1=1:1, -1=zoom-to-fit)
 
|-
 
|zoomFactor
 
|The current 'zoom factor' preference value.
 
 
|}
 
|}
  
Line 92: Line 68:
 
! scope="col" class="unsortable" | Description
 
! scope="col" class="unsortable" | Description
 
|-
 
|-
|autoAlign(y_axis=False)
+
|getState(state)
|If there is an active [[Layer]], perform an auto-alignment and the current cursor position.
+
|Returns the value for the [[Paint State]].
|-
 
|centerSelection()
 
|Center the viewer on the current selection.
 
|-
 
|enableNode(node_type, state)
 
|Enable or disable the [[Node]] with the given type.
 
|-
 
|nodeAvailable(node_type)
 
|True if the [[Node]] of type is in the current [[Session]].
 
|-
 
|nodeEnabled(node_type)
 
|True if the [[Node]] of type is enabled.
 
|-
 
|queryTool(state)
 
|Query the current tool state. See [[Tool Commands]] for more information.
 
|-
 
|selectTool(name)
 
|Switch to the tool with the name, if exposed by the current edit [[Node]].
 
|-
 
|setChannelMask(color)
 
|Set the channel mask to the [[Color]]. Same as assigning to the <tt>channelMask</tt> attribute.
 
|-
 
|setControlBind(controlName, key)
 
|Bind the key to the control with the given name.
 
|-
 
|setMagnify(state)
 
|Enable the magnifier if True. Same as assigning to the <tt>magnify</tt> attribute.
 
|-
 
|setMask(mask)
 
|Set and display the view mask with the given name.
 
|-
 
|setOverlay(state)
 
|Enable the overlay if True. Same as assigning to the <tt>overlay</tt> attribute.
 
|-
 
|setStabilize(state)
 
|Enable viewer stabilization if True. Same as assigning to the <tt>stabilize</tt> attribute.
 
|-
 
|setToolBind(toolName, key)
 
|Bind the key to the tool with the given name.
 
|-
 
|setUpdateMode(mode)
 
|Set the update mode. Same as assigning to the <tt>updateMode</tt> attribute.
 
|-
 
|setViewMode(mode)
 
|Set the view mode. Same as assigning to the <tt>viewMode</tt> attribute.
 
 
|-
 
|-
|setZoom(zoom)
+
|savePreset(index)
|Set the zoom level. Same as assigning to the <tt>zoom</tt> attribute.
+
|Save the current paint settings to the specified preset index.
 
|-
 
|-
|toolCommand(command, modifier=False)
+
|setState(state, value)
|Send the command to the current tool. See [[Tool Commands]] for more information.
+
|Sets the value for [[Paint State]]
 
|}
 
|}

Latest revision as of 18:59, 10 December 2012

The Paint object is a global object used to interact with the Paint UI while in the Paint Node.

Attributes

Name Description
align True if the Clone overlay mode is set to Align.
alphaSource The current alpha source used for Obey Alpha. (0=input, 1=output)
brush The current brush name.
brushes The List of available brush names. (read-only)
brushSize The current brush size (diameter in pixels).
channelMask The target channel mask as a Color.
cloneOffset The current clone offset as a Point3D.
invertAlpha True if Invert Alpha is on.
matchMove True if Match Move is on.
opaqueAlpha True if Opaque Alpha is on.
onionSkin True if the Clone overlay mode is on.
onionSkinMix The mix value of the Clone overlay.
opacity The current brush opacity.
preset The current Preset index.
profileType The current Brush Profile index (0=Circle, 1=Square)
transformMode True if Clone Interactive Transform mode is enabled.
cloneOffsetModifier The Modifier used for setting the Clone Offset
brushEditModifier The Modifier used for editing the Brush Size.

Methods

Name Description
getState(state) Returns the value for the Paint State.
savePreset(index) Save the current paint settings to the specified preset index.
setState(state, value) Sets the value for Paint State