Difference between revisions of "Shape"

From Silhouette Wiki
Jump to navigation Jump to search
(Created page with "The Session object stores all the Nodes to create the output for a specific shot. ''Base Class: MultiViewObject'' === Methods === {| class="wikitable" ! scope=...")
 
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
The Session object stores all the [[Node|Nodes]] to create the output for a specific shot.
+
The Shape object represents a Bézier, B-Spline, or X-Spline shape that can animate over time.
  
''Base Class: [[MultiViewObject]]''
+
''Base Class: [[StereoscopicObject]]''
 +
 
 +
Shapes can be created with <tt>Shape([[#Shape Type|type]], label=None)</tt>.
 +
 
 +
=== Attributes ===
 +
 
 +
{| class="wikitable"
 +
! scope="col" | Name
 +
! scope="col" class="unsortable" | Description
 +
| scope="col" | Added
 +
|-
 +
|blendMode
 +
|the [[Silhouette Module Reference#Blend Mode|blend mode]]
 +
|-
 +
|blurType
 +
|the [[Silhouette Module Reference#Blur Type|blur type]]
 +
|-
 +
|closed
 +
|True if the shape is closed
 +
|-
 +
|inverted
 +
|True if the shape alpha should be inverted
 +
|-
 +
|path
 +
|the ''path'' property (same as <tt>shape.property('path')</tt> or <tt>shape['path']</tt>)
 +
|-
 +
|range
 +
|the shape's ''t-range'' as a tuple (start, end)
 +
|-
 +
|shapeType
 +
|the [[#Shape Type|shape type]]
 +
|-
 +
|capStyle
 +
|the open shape end-cap style (Shape.FlatCap or Shape.RoundCap)
 +
|6.0
 +
|-
 +
|featherType
 +
|the feathering type (read-only, Shape.LegacyFeather or Shape.PerPointFeather)
 +
|6.0
 +
|-
 +
|numPoints
 +
|the number of control points
 +
|7.0
 +
|-
 +
|numSelectedPoints
 +
|the number of selected control points
 +
|7.0
 +
|-
 +
|selectedPoints
 +
|the list of selected point indexes (formerly a method)
 +
|7.0
 +
|}
  
 
=== Methods ===
 
=== Methods ===
Line 8: Line 59:
 
! scope="col" | Name
 
! scope="col" | Name
 
! scope="col" class="unsortable" | Description
 
! scope="col" class="unsortable" | Description
 +
! scope="col" | Added
 +
|-
 +
|createPath()
 +
|create and return a new empty [[ShapePath|path]] - set with <tt>setPath()</tt>
 +
|-
 +
|createPath(frame)
 +
|create and return a new empty [[ShapePath|path]] and set a key at <tt>frame</tt>
 +
|-
 +
|evalPath(frame)
 +
|interpolate and return a [[ShapePath|path]] at the desired frame
 +
|-
 +
|isPointSelected(index)
 +
|return True if the control point index is selected
 +
|-
 +
|selectAllPoints(state=True)
 +
|select (or deselect) all of the control points
 +
|-
 +
|selectPoint(index, state=True)
 +
|select (or deselect) the control point at index
 
|-
 
|-
|getPosition(frame)
+
|selectPoints(indexes, state=True)
|return the tracker [[Point3D|position]] at <tt>frame</tt>
+
|select (or deselect) the List of control point at indexes
 +
|-
 +
|setPath(path, frame)
 +
|set the [[ShapePath|path]] as a keyframe at <tt>frame</tt>
 +
|-
 +
|convertToBezier()
 +
|creates and returns a Bezier version of the current shape
 +
|6.0
 
|}
 
|}
  
 
=== Constants ===
 
=== Constants ===
  
==== Mode ====
+
==== Shape Type ====
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 21: Line 98:
 
! scope="col" class="unsortable" | Description
 
! scope="col" class="unsortable" | Description
 
|-
 
|-
|Mode_RGB
+
|Bezier
|track all three channels
+
|a Bézier shape
|-
 
|Mode_Luminance
 
|track luminance
 
|-
 
|Mode_R
 
|track red channel
 
 
|-
 
|-
|Mode_G
+
|Bspline
|track green channel
+
|a B-Spline shape
 
|-
 
|-
|Mode_B
+
|Xspline
|track blue channel
+
|an X-Spline shape
 
|}
 
|}

Latest revision as of 13:33, 26 July 2018

The Shape object represents a Bézier, B-Spline, or X-Spline shape that can animate over time.

Base Class: StereoscopicObject

Shapes can be created with Shape(type, label=None).

Attributes

Name Description Added
blendMode the blend mode
blurType the blur type
closed True if the shape is closed
inverted True if the shape alpha should be inverted
path the path property (same as shape.property('path') or shape['path'])
range the shape's t-range as a tuple (start, end)
shapeType the shape type
capStyle the open shape end-cap style (Shape.FlatCap or Shape.RoundCap) 6.0
featherType the feathering type (read-only, Shape.LegacyFeather or Shape.PerPointFeather) 6.0
numPoints the number of control points 7.0
numSelectedPoints the number of selected control points 7.0
selectedPoints the list of selected point indexes (formerly a method) 7.0

Methods

Name Description Added
createPath() create and return a new empty path - set with setPath()
createPath(frame) create and return a new empty path and set a key at frame
evalPath(frame) interpolate and return a path at the desired frame
isPointSelected(index) return True if the control point index is selected
selectAllPoints(state=True) select (or deselect) all of the control points
selectPoint(index, state=True) select (or deselect) the control point at index
selectPoints(indexes, state=True) select (or deselect) the List of control point at indexes
setPath(path, frame) set the path as a keyframe at frame
convertToBezier() creates and returns a Bezier version of the current shape 6.0

Constants

Shape Type

Name Description
Bezier a Bézier shape
Bspline a B-Spline shape
Xspline an X-Spline shape