Difference between revisions of "Viewer"
Jump to navigation
Jump to search
(Created page with "The View is a global object used to interact with the viewer and tools. === Attributes === {| class="wikitable" ! scope="col" | Name ! scope="col" class="unsortable" | Descr...") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 62: | Line 62: | ||
|- | |- | ||
|streamMode | |streamMode | ||
− | |The current [[Silhouette Module Reference#Stream | + | |The current stream mode as a [[Silhouette Module Reference#Stream Mask Constants|mask]]. Check the <tt>streamMask</tt> attribute to determine the available streams. |
|- | |- | ||
|toolName | |toolName | ||
Line 92: | Line 92: | ||
! scope="col" class="unsortable" | Description | ! scope="col" class="unsortable" | Description | ||
|- | |- | ||
− | | | + | |autoAlign(y_axis=False) |
− | | | + | |If there is an active [[Layer]], perform an auto-alignment and the current cursor position. |
|- | |- | ||
− | | | + | |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) | ||
+ | |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. | ||
+ | |- | ||
+ | |update() | ||
+ | |Send a request to refresh the viewer. Useful when non-undoable changes are made to the object model. | ||
|} | |} |
Latest revision as of 15:39, 7 December 2012
The View is a global object used to interact with the viewer and tools.
Attributes
Name | Description |
---|---|
angle | The current display angle, when rotate mode is enabled. |
blend | The current blend amount, for blending between views in supported nodes. |
channelMask | The current channel mask, as a Color. |
colorSpace | The current OCIO display colorspace name. |
device | The current OCIO display device name. |
exposure | The current display exposure value. |
gamma | The current display gamma value. |
hand | True if viewer rotate angle edit mode is enabled. |
lut | The current OCIO display LUT name, or None. |
magnify | True if the magnifier is enabled. |
maskEnabled | True if the frame mask is enabled. |
node | The active edit Node. Setting this will change the Node being edited. |
overlay | True if the overlay is enabled. |
rotate | True if viewer rotate mode is enabled. |
stabilize | True if stabilization is enabled. |
stereo | True if the current Node generates or passes stereo data. |
stereoAlign | True if in stereo alignment mode |
streamMask | The current Stream Mask (read-only), indicating which streams the current Node generates or passes (ie. the available streams). |
streamMode | The current stream mode as a mask. Check the streamMask attribute to determine the available streams. |
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. |
Methods
Name | Description |
---|---|
autoAlign(y_axis=False) | If there is an active Layer, perform an auto-alignment and the current cursor position. |
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 channelMask 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 magnify 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 overlay attribute. |
setStabilize(state) | Enable viewer stabilization if True. Same as assigning to the stabilize 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 updateMode attribute. |
setViewMode(mode) | Set the view mode. Same as assigning to the viewMode attribute. |
setZoom(zoom) | Set the zoom level. Same as assigning to the zoom attribute. |
toolCommand(command, modifier=False) | Send the command to the current tool. See Tool Commands for more information. |
update() | Send a request to refresh the viewer. Useful when non-undoable changes are made to the object model. |