ScriptSOP Class

From TouchDesigner Documentation
Revision as of 14:59, 8 August 2017 by Admin (talk | contribs) (ScriptSOP Class Auto Create)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

{lowercase} {OPClassSummary|OPtype=script|OPfamily=SOP} {ClassMemberSection|empty=True} {ClassMethodSection|empty=} {ClassMethod

   |class=scriptSOP
   |name=appendMesh
   |call=appendMesh(numRows, numCols, closedU=False, closedV=False, addPoints=True)
   |returns=
   |text=: -> Mesh

Append a mesh to this SOP. Returns the appended mesh.

numRows, numCols - Specifies the initial number of rows and columns.
closedU - (Keyword, Optional) Specifies whether or not the grid is wrapped in the u direction.
closedV - (Keyword, Optional) Specifies whether or not the grid is wrapped in the v direction.
addPoints - (Keyword, Optional) If True, a new point will be attached to each vertex, otherwise the vertex point references will need to be manually set afterwards. Use this option when creating meshes with shared vertices.

} {ClassMethod

   |class=scriptSOP
   |name=appendPoly
   |call=appendPoly(numVertices, closed=True, addPoints=True)
   |returns=
   |text=: -> Poly

Append a poly to this SOP. Returns the appended polygon.

numVertices - Specifies the initial number of vertices.
closed - (Keyword, Optional) Specifies whether or not the last vertex of the polygon will connect to the first. An open polygon will be drawn as a line.
addPoints - (Keyword, Optional) If True, a new point will be attached to each vertex, otherwise the vertex point references will need to be manually set afterwards. Use this option when creating polygons with shared vertices.

} {ClassMethod

   |class=scriptSOP
   |name=sortCustomPages
   |call=sortCustomPages(page1, page2, page3..)
   |returns=
   |text=:

Reorder custom parameter pages.

scriptOp.sortCustomPages('Definition','Controls') } {ClassMethod

   |class=scriptSOP
   |name=copy
   |call=copy(sop)
   |returns=
   |text=:

Copy geometry from the specified SOP operator.

sop - The SOP to copy geometry from. Geometry currently in this SOP will be removed.

} {ClassMethod

   |class=scriptSOP
   |name=appendPoint
   |call=appendPoint()
   |returns=
   |text=: -> Point

Append a point to this SOP. The appended point will be returned. } {ClassMethod

   |class=scriptSOP
   |name=appendCustomPage
   |call=appendCustomPage(name)
   |returns=
   |text=: -> Page

Add a new page of custom parameters. See Page Class for more details.

page = scriptOp.appendCustomPage('Custom1') page.appendFloat('X1') } {ClassMethod

   |class=scriptSOP
   |name=destroyCustomPars
   |call=destroyCustomPars()
   |returns=
   |text=: -> total

Remove all custom parameters from COMP. } {ClassMethod

   |class=scriptSOP
   |name=clear
   |call=clear()
   |returns=
   |text=:

Remove all geometry. } {ClassInheritance|class=SOP} {ClassInheritance|class=OP} TouchDesigner Build:

{#invoke:Category|list|SOP Classes}

An Operator Family that reads, creates and modifies 3D polygons, curves, NURBS surfaces, spheres, meatballs and other 3D surface data.

Each SOP has a list of Points. Each point has an XYZ 3D position value plus other optional attributes. Each polygon Primitive is defined by a vertex list, which is list of point numbers.

An Operator Family that contains its own Network inside. There are twelve 3D Object Component and eight 2D Panel Component types. See also Network Path.

Any of the procedural data operators. OPs do all the work in TouchDesigner. They "cook" and output data to other OPs, which ultimately result in new images, data and audio being generated. See Node.