Difference between revisions of "Session"

From Silhouette Wiki
Jump to navigation Jump to search
Line 1: Line 1:
The Session object stores all the [[Node|Nodes]] to create the output for a specific shot.
+
The Session object stores all the [[Node|Nodes]] to create the outputs for a specific shot.
  
 
''Base Class: [[Object]]''
 
''Base Class: [[Object]]''
 +
 +
=== Construction ===
 +
<tt>session = Session(label=None, width=None, height=None, pixelAspect=None, depth=None, duration=None, frameRate=None)</tt>
 +
 +
If any arguments are omitted they should be set using the respective [[Property]].
 +
 +
Sessions can be created automatically from a [[Source]] using the <tt>tools.session.SessionBuilder</tt> class.
  
 
=== Attributes ===
 
=== Attributes ===
Line 50: Line 57:
 
|finds the [[Node]] with the name or type, depending on the argument name, or None
 
|finds the [[Node]] with the name or type, depending on the argument name, or None
 
|}
 
|}
 +
 +
 +
==== Sessions ====
 +
* new Sessions can be created and activated
 +
* new Sources can be created and added to the Project
 +
* adding a Source to a Session creates a SourceNode and connects it
 +
* <tt>Session.getNodes(type)</tt> returns a list of nodes of the desired type
 +
* <tt>Session.addNode(node)</tt> adds the Node
 +
* <tt>Session.removeNode(node)</tt> removes the Node
 +
* <tt>Session.roi(frame)</tt> returns the ROI as a [[Recti]] for the specified frame
 +
* <tt>Session.displayWindow</tt> attribute returns the session frame as a [[Recti]]
 +
* <tt>Session.outputStreams</tt> attribute was removed
 +
* <tt>Session.outputs</tt> a list of Output nodes
 +
* <tt>Session.outputRange</tt> the session's output range as a tuple (start, end)
 +
* <tt>Session.renderRange</tt> the session's render range as a tuple (start, end)
 +
 +
Note the output range is in output frame numbers and the render range is the zero-indexed frames needing to be rendered.

Revision as of 13:08, 26 July 2018

The Session object stores all the Nodes to create the outputs for a specific shot.

Base Class: Object

Construction

session = Session(label=None, width=None, height=None, pixelAspect=None, depth=None, duration=None, frameRate=None)

If any arguments are omitted they should be set using the respective Property.

Sessions can be created automatically from a Source using the tools.session.SessionBuilder class.

Attributes

Attributes are read-only except where noted.

Name Description
depth the session depth (read/write)
duration the duration in frames
frameRate the frame rate
nodes List of Nodes in the session
pixelAspect the pixel aspect
project the Project containing the session
renderInfo the rendering settings
size the size as a Tuple of (width, height)
startFrame the start frame number
workRange the current work range as a Tuple of (start_frame, end_frame) (read/write)

Methods

Name Description
node(name|type) finds the Node with the name or type, depending on the argument name, or None


Sessions

  • new Sessions can be created and activated
  • new Sources can be created and added to the Project
  • adding a Source to a Session creates a SourceNode and connects it
  • Session.getNodes(type) returns a list of nodes of the desired type
  • Session.addNode(node) adds the Node
  • Session.removeNode(node) removes the Node
  • Session.roi(frame) returns the ROI as a Recti for the specified frame
  • Session.displayWindow attribute returns the session frame as a Recti
  • Session.outputStreams attribute was removed
  • Session.outputs a list of Output nodes
  • Session.outputRange the session's output range as a tuple (start, end)
  • Session.renderRange the session's render range as a tuple (start, end)

Note the output range is in output frame numbers and the render range is the zero-indexed frames needing to be rendered.