Item Instancer Funcs

class lwsdk.LWItemInstancerFuncs(self)

Bases: object

Proxy of C++ PCore::LWItemInstancerFuncs class

 createInstance(LWItemInstancerID instancer) → LWItemInstanceID

Creates and returns a new instanceID for the instancer.

 destroyInstance(LWItemInstancerID instancer, LWItemInstanceID instance)

Removes and releases the provided instance from the instancer system.

 first(LWItemInstancerID instancer) → LWItemInstanceID

Returns the first LWItemInstanceID from the instancer system.

 instanceByIndex(LWItemInstancerID instancer, unsigned int index) → LWItemInstanceID

Returns a LWItemInstanceID from the instancer system by index.

 next(LWItemInstancerID instancer, LWItemInstanceID instance) → LWItemInstanceID

Returns the next LWItemInstanceID from the instancer system that follows instance in the list.

 numInstances(LWItemInstancerID instancer) → unsigned int

Returns the number of instances currently managed by the instancer system.

 setInstance(LWItemInstanceID instance, unsigned int ID, LWItemID item, unsigned int steps)

Set the instance attributes. The ID is used to identify a LWItemInstanceID by a number, and item is the mesh-type scene object to which the LWItemInstanceID will be assigned.

 setInstanceDrawer(LWItemInstanceID instance, InstanceDrawerMode drawmode)

Sets the instanceID draw mode for OpenGL. Available options are:

lwsdk.INSTDRAW_NONE No drawing is done.
lwsdk.INSTDRAW_POINT The instance is drawn as a point.
lwsdk.INSTDRAW_BBOX The instance is drawn as a bounding box.

 setInstanceDrawerColor(LWItemInstanceID instance, unsigned int color)

Sets the instance's color for OpenGL.

 setMotionStep(LWItemInstanceID instance, unsigned int step, LWDVector pos, LWDVector scl, LWDVector rot)

Set the instance motion data for a single step.

step is the step index for which the parameters will be set.
pos is the position for the step.
scl is the scale for the step.
rot is the rotation for the step.

 setMotionStepM(LWItemInstanceID instance, unsigned int step, LWDVector pos, double matrix)

Set the instance motion data for a single step. step is the step index for which the parameters will be set. pos is the position for the step. matrix is a Python sequence of 9 double values that represent the rotation and scale matrix for the step.

 setMotions(LWItemInstanceID instance, data[])

Set the instance motion data for multiple steps at once.

data is a Python sequence that contains one of the following for each step to be set:

( (position), (scale), (rotation) )

Where position is a 3-element sequence representing the position at that step, scale is a 3-element sequence holding the step scale values, and rotation is a 3-element sequence that contains the rotations at that step.

 setMotionsM(LWItemInstanceID instance, data[])

Set the instance motion data for multiple steps at once.

data is a Python sequence that contains one of the following for each step to be set:

( (position), (matrix) )

Where position is a 3-element sequence representing the position at that step, and matrix is a 9-element sequence containing the rotation/scale matrix for the step.

Previous topic

Image Utility

Next topic

Item Instance Info

This Page