proceduralΒΆ

class procedural

During a procedural script execution, this interface gives access to the primitives linked to the procedural.

Members

Methods:

table result getattributes ( ) Returns the current render attributes
table result getattributes ( string handle ) Returns the render attributes of a shape
aabb,transform result getboundsandtransform ( string handle ) Returns the local bounds and transform of a shape
aabb,transform result getboundsandtransform ( list-string handles ) Returns the local bounds and transform of a list of shapes
matrix result getcameratransform ( int id ) Returns a camera transform
number result getcurrenttime ( ) Returns the frame current time
aabb result getlaabb ( string handle ) Returns the local aabb of a shape
matrix result getmaincamera ( ) Returns the main camera matrix
number,number multiCount,multiRadius getmultiattributes ( string handle ) Returns a particle multiplication attributes
point3 result getmultioffset ( number partIndex , number multiIndex , number multiRadius , number multiCount ) Returns a particle offset for multiplication
string result getrenderertype ( ) Returns the type of renderer
nil getshaderoutputs ( string handle ) Return a table with all the shader outputs presents in the primitive's materials.
shape result getshape ( string handle ) Retrieves a shape
transform result gettransform ( ) Returns the current transform
transform result gettransform ( string handle ) Returns the transform of a shape
triarray result gettrianglearray ( string handle , bool useND ) Build a triangle array out of a shape
vect result getvar ( string handle , string variable ) Returns a primitive variable
int result getvarsize ( string name ) Return the number of components of a variable

Documentation

table result getattributes ( )

Returns the current render attributes

Return:

  • result


table result getattributes ( string handle )

Returns the render attributes of a shape

Arguments:

  • handle The shape's handle.

Return:

  • result The shape render attributes


aabb,transform result getboundsandtransform ( string handle )

Returns the local bounds and transform of a shape

Arguments:

  • handle The shape's handle.

Return:

  • result The shape bounds and transform


aabb,transform result getboundsandtransform ( list-string handles )

Returns the local bounds and transform of a list of shapes

Arguments:

  • handles The shapes hanles as an array.

Return:

  • result The shapes bounds and transform


matrix result getcameratransform ( int id )

Returns a camera transform

Arguments:

  • id Camera index (1 for the left most) or nil for the left camera.

Return:

  • result


number result getcurrenttime ( )

Returns the frame current time

Return:

  • result


aabb result getlaabb ( string handle )

Returns the local aabb of a shape

Arguments:

  • handle The shape's handle.

Return:

  • result The shape's local aabb


matrix result getmaincamera ( )

Returns the main camera matrix

Return:

  • result


number,number multiCount,multiRadius getmultiattributes ( string handle )

Returns a particle multiplication attributes

Arguments:

  • handle The particle system handle

Return:

  • multiCount,multiRadius The particle system multiplication attributes


point3 result getmultioffset ( number partIndex , number multiIndex , number multiRadius , number multiCount )

Returns a particle offset for multiplication

Arguments:

  • partIndex The particle index
  • multiIndex The multiplication index
  • multiRadius The multiplication radius
  • multiCount The multiplication total count

Return:

  • result The particle offset


string result getrenderertype ( )

Returns the type of renderer

Return:

  • result


nil getshaderoutputs ( string handle )

Return a table with all the shader outputs presents in the primitive's materials.

The returned table is like this :

{
    "Ci" = true,
    "Oi" = true,
    "Specular" = true,
    etc..
}
Arguments:

  • handle The primitive's handle


shape result getshape ( string handle )

Retrieves a shape

Arguments:

  • handle The shape's handle

Return:

  • result


transform result gettransform ( )

Returns the current transform

Return:

  • result


transform result gettransform ( string handle )

Returns the transform of a shape

Arguments:

  • handle The shape's handle.

Return:

  • result The shape transform


triarray result gettrianglearray ( string handle , bool useND )

Build a triangle array out of a shape

Arguments:

  • handle The shape's handle
  • useND If true, use "Pnd" to compute the triangulation, else use the "P"

Return:

  • result


vect result getvar ( string handle , string variable )

Returns a primitive variable

Arguments:

  • handle The shape's handle.
  • variable The variable to get

Return:

  • result The primitive variable as a vect


int result getvarsize ( string name )

Return the number of components of a variable

If the size is 1, a single variable will be returned as a number, else it will be returned as a point3.
Arguments:

  • name The variable name to get the size

Return:

  • result