HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Objects

Functions

HAPI_DECL HAPI_GetObjectInfo (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_ObjectInfo *object_info)
 Get the object info on an OBJ node. More...
 
HAPI_DECL HAPI_GetObjectTransform (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_NodeId relative_to_node_id, HAPI_RSTOrder rst_order, HAPI_Transform *transform)
 Get the tranform of an OBJ node. More...
 
HAPI_DECL HAPI_ComposeObjectList (const HAPI_Session *session, HAPI_NodeId parent_node_id, const char *categories, int *object_count)
 Compose a list of child object nodes given a parent node id. More...
 
HAPI_DECL HAPI_GetComposedObjectList (const HAPI_Session *session, HAPI_NodeId parent_node_id, HAPI_ObjectInfo *object_infos_array, int start, int length)
 Fill an array of HAPI_ObjectInfo structs. More...
 
HAPI_DECL HAPI_GetComposedObjectTransforms (const HAPI_Session *session, HAPI_NodeId parent_node_id, HAPI_RSTOrder rst_order, HAPI_Transform *transform_array, int start, int length)
 Fill an array of HAPI_Transform structs. More...
 
HAPI_DECL HAPI_GetInstancedObjectIds (const HAPI_Session *session, HAPI_NodeId object_node_id, HAPI_NodeId *instanced_node_id_array, int start, int length)
 Get the node ids for the objects being instanced by an Instance OBJ node. More...
 
HAPI_DECL HAPI_GetInstanceTransformsOnPart (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, HAPI_RSTOrder rst_order, HAPI_Transform *transforms_array, int start, int length)
 Fill an array of HAPI_Transform structs with the transforms of each instance of this instancer object for a given part. More...
 
HAPI_DECL HAPI_SetObjectTransform (const HAPI_Session *session, HAPI_NodeId node_id, const HAPI_TransformEuler *trans)
 Set the transform of an individual object. Note that the object nodes have to either be editable or have their transform parameters exposed at the asset level. This won't work otherwise. More...
 

Detailed Description

Functions for working with OBJ Nodes

Function Documentation

HAPI_DECL HAPI_ComposeObjectList ( const HAPI_Session session,
HAPI_NodeId  parent_node_id,
const char *  categories,
int object_count 
)

Compose a list of child object nodes given a parent node id.

Use the object_count returned by this function to get the HAPI_ObjectInfo structs for each child object using HAPI_GetComposedObjectList().

Note, if not using the categories arg, this is equivalent to:

session, parent_node_id,
true, &object_count );
Parameters
[in]sessionThe session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]parent_node_idThe parent node id.
[in]categories(Optional) Lets you filter object nodes by their render categories. This is a standard OBJ parameter, usually under the Render > Shading tab. If an OBJ node does not have this parameter, one can always add it as a spare.

The value of this string argument should be NULL if not used or a space-separated list of category names. Multiple category names will be treated as an AND op.

Parameters
[out]object_countThe number of object nodes currently under the parent. Use this count with a call to HAPI_GetComposedObjectList() to get the object infos.
HAPI_DECL HAPI_GetComposedObjectList ( const HAPI_Session session,
HAPI_NodeId  parent_node_id,
HAPI_ObjectInfo object_infos_array,
int  start,
int  length 
)

Fill an array of HAPI_ObjectInfo structs.

This is best used with HAPI_ComposeObjectList() with.

Parameters
[in]sessionThe session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]parent_node_idThe parent node id.
[out]object_infos_arrayArray of HAPI_ObjectInfo at least the size of length.
[in]startAt least 0 and at most object_count returned by HAPI_ComposeObjectList().
[in]lengthGiven object_count returned by HAPI_ComposeObjectList(), length should be at least 0 and at most object_count - start.
HAPI_DECL HAPI_GetComposedObjectTransforms ( const HAPI_Session session,
HAPI_NodeId  parent_node_id,
HAPI_RSTOrder  rst_order,
HAPI_Transform transform_array,
int  start,
int  length 
)

Fill an array of HAPI_Transform structs.

This is best used with HAPI_ComposeObjectList() with.

Note that these transforms will be relative to the parent_node_id originally given to HAPI_ComposeObjectList() and expected to be the same with this call. If parent_node_id is not an OBJ node, the transforms will be given as they are on the object node itself.

Parameters
[in]sessionThe session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]parent_node_idThe parent node id. The object transforms will be relative to this node unless this node is not an OBJ.
[in]rst_orderThe order of application of translation, rotation and scale.
[out]transform_arrayArray of HAPI_Transform at least the size of length.
[in]startAt least 0 and at most object_count returned by HAPI_ComposeObjectList().
[in]lengthGiven object_count returned by HAPI_ComposeObjectList(), length should be at least 0 and at most object_count - start.
HAPI_DECL HAPI_GetInstancedObjectIds ( const HAPI_Session session,
HAPI_NodeId  object_node_id,
HAPI_NodeId instanced_node_id_array,
int  start,
int  length 
)

Get the node ids for the objects being instanced by an Instance OBJ node.

Parameters
[in]sessionThe session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]object_node_idThe object node id.
[out]instanced_node_id_arrayArray of HAPI_NodeId at least the size of length.
[in]startAt least 0 and at most object_count returned by HAPI_ComposeObjectList().
[in]lengthGiven object_count returned by HAPI_ComposeObjectList(), length should be at least 0 and at most object_count - start.
HAPI_DECL HAPI_GetInstanceTransformsOnPart ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_id,
HAPI_RSTOrder  rst_order,
HAPI_Transform transforms_array,
int  start,
int  length 
)

Fill an array of HAPI_Transform structs with the transforms of each instance of this instancer object for a given part.

Parameters
[in]sessionThe session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]node_idThe object node id.
[in]part_idThe part id.
[in]rst_orderThe order of application of translation, rotation and scale.
[out]transforms_arrayArray of HAPI_Transform at least the size of length.
[in]startFirst index of range. Must be at least 0 and at most HAPI_PartInfo::pointCount - 1. This is the 0th part of the display geo of the instancer object node.
[in]lengthMust be at least 0 and at most HAPI_PartInfo::pointCount - start. This is the 0th part of the display geo of the instancer object node.
HAPI_DECL HAPI_GetObjectInfo ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_ObjectInfo object_info 
)

Get the object info on an OBJ node.

Parameters
[in]sessionThe session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]node_idThe node id.
[out]object_infoThe output HAPI_ObjectInfo.
HAPI_DECL HAPI_GetObjectTransform ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_NodeId  relative_to_node_id,
HAPI_RSTOrder  rst_order,
HAPI_Transform transform 
)

Get the tranform of an OBJ node.

Parameters
[in]sessionThe session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]node_idThe object node id.
[in]relative_to_node_idThe object node id for the object to which the returned transform will be relative to. Pass -1 or the node_id to just get the object's local transform.
[in]rst_orderThe order of application of translation, rotation and scale.
[out]transformThe output HAPI_Transform transform.
HAPI_DECL HAPI_SetObjectTransform ( const HAPI_Session session,
HAPI_NodeId  node_id,
const HAPI_TransformEuler trans 
)

Set the transform of an individual object. Note that the object nodes have to either be editable or have their transform parameters exposed at the asset level. This won't work otherwise.

Parameters
[in]sessionThe session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]node_idThe object node id.
[in]transA HAPI_TransformEuler that stores the transform.