Difference between revisions of "Paint"

From Silhouette Wiki
Jump to navigation Jump to search
Line 68: 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()
+
|setState(state, value)
|Center the viewer on the current selection.
+
|Sets the value for [[#Paint State]]
|-
 
|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)
 
|Set the zoom level. Same as assigning to the <tt>zoom</tt> attribute.
 
|-
 
|toolCommand(command, modifier=False)
 
|Send the command to the current tool. See [[Tool Commands]] for more information.
 
 
|}
 
|}

Revision as of 14:48, 20 November 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.
setState(state, value) Sets the value for #Paint State