Difference between revisions of "Node"

From Silhouette Wiki
Jump to navigation Jump to search
Line 71: Line 71:
 
! scope="col" | Added
 
! scope="col" | Added
 
|-
 
|-
|render(frame, stream=[[Silhouette Module Reference#Stream Type Constants|Stream_Left]], channels=RGBA, depth=None, resolution=Proxy_FullRes, roi=None, port=None)
+
|render(frame, stream=[[Silhouette Module Reference#Stream Type Constants|Stream_Left]], channels=Channel_RGBA, depth=None, resolution=Proxy_FullRes, roi=None, port=None)
|render at the desired frame and returns a [[Raster]] with the result
+
|render at the desired frame and returns a [[Raster]] with the result. <tt>depth</tt> and <tt>roi</tt> default to the Session's depth and ROI, respectively. If <tt>port</tt> is omitted, the first output [[Port]] will be used.
 
|-
 
|-
 
|metadata(frame)
 
|metadata(frame)

Revision as of 20:37, 25 July 2018

The Node object generates output (usually an image) based on a set of inputs (image data and properties).

Base Class: Object

Creation

Nodes are created with the Node(type) constructor, where type is the "node type id". A list of available nodes can be queried with the global fx.nodes avariable.

Attributes

Attributes are read-only except where noted.

Name Description Added
active True if the active node
enabled True if enabled (read/write)
imageToWorldTransform the Matrix used to transform from image coordinates to world coordinates
inputs List of input Ports
outputs List of output Ports
session the Session the node is in (same as parent)
worldToImageTransform the Matrix used to transform from world coordinates to image coordinates
outputMask the output streams it can produce. 6.0
state a dictionary of any extra node-specific state 6.0
connectedInputs list of connected input Ports 6.0
connectedOutputs list of connected output Ports 6.0
pipes list of connected pipes Pipes 6.0
ports list of all Ports 6.0
matte the "obey matte" input Port, or None if the node does not have one 6.0

Methods

Name Description Added
render(frame, stream=Stream_Left, channels=Channel_RGBA, depth=None, resolution=Proxy_FullRes, roi=None, port=None) render at the desired frame and returns a Raster with the result. depth and roi default to the Session's depth and ROI, respectively. If port is omitted, the first output Port will be used.
metadata(frame) returns a metadata dictionary derived from up-stream Sources for the specified frame 6.0
setState(key, value) sets the node state for key to value 6.0
disconnect(port) disconnect the Port 6.0
port(name) return the Port with the given name 6.0
getInput(index=0) return the input Port at index 6.0
getOutput(index=0) return the output Port at index 6.0