Point Class

From TouchDesigner 099 Wiki

A Point describes an instance to a single geometry point. They are accessible through the SOP.points member.

Members

index (Read Only) The point index in the list.
owner (Read Only) The OP to which this object belongs.
P The coordinates as AttributeData. Individual components can be read or written with the [] operator.
point.P[0] = 5
point.P = (1,0,1)
x Get or set x coordinate value. This is the same as P[0].
y Get or set y coordinate value. This is the same as P[1].
z Get or set z coordinate value. This is the same as P[2].

Attributes

In addition to the above members, all attributes are members as well.
For example, if the Point contains texture coordinates, they may be accessed with: Point.uv

Examples:

 box = op('box1')
 print(box.N[0], box.N[1], box.N[2])
 print(box.uv[0], box.uv[1], box.uv[2])



See: Attribute Class for more information.


Methods

destroy()

Destroy and remove the actual point this object refers to. This operation is only valid when the primitive belongs to a scriptSOP.
Note: after this call, other existing Point objects in this SOP may no longer be valid.