|
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...
|
|
Functions for working with OBJ Nodes
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] | session | The session of Houdini you are interacting with. See Sessions for more on sessions. Pass NULL to just use the default in-process session. |
[in] | parent_node_id | The 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_count | The number of object nodes currently under the parent. Use this count with a call to HAPI_GetComposedObjectList() to get the object infos. |
Fill an array of HAPI_ObjectInfo structs.
This is best used with HAPI_ComposeObjectList() with.
- Parameters
-
[in] | session | The session of Houdini you are interacting with. See Sessions for more on sessions. Pass NULL to just use the default in-process session. |
[in] | parent_node_id | The parent node id. |
[out] | object_infos_array | Array of HAPI_ObjectInfo at least the size of length . |
[in] | start | At least 0 and at most object_count returned by HAPI_ComposeObjectList(). |
[in] | length | Given object_count returned by HAPI_ComposeObjectList(), length should be at least 0 and at most object_count - start . |
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] | session | The session of Houdini you are interacting with. See Sessions for more on sessions. Pass NULL to just use the default in-process session. |
[in] | parent_node_id | The parent node id. The object transforms will be relative to this node unless this node is not an OBJ. |
[in] | rst_order | The order of application of translation, rotation and scale. |
[out] | transform_array | Array of HAPI_Transform at least the size of length. |
[in] | start | At least 0 and at most object_count returned by HAPI_ComposeObjectList(). |
[in] | length | Given object_count returned by HAPI_ComposeObjectList(), length should be at least 0 and at most object_count - start . |
Get the node ids for the objects being instanced by an Instance OBJ node.
- Parameters
-
[in] | session | The session of Houdini you are interacting with. See Sessions for more on sessions. Pass NULL to just use the default in-process session. |
[in] | object_node_id | The object node id. |
[out] | instanced_node_id_array | Array of HAPI_NodeId at least the size of length. |
[in] | start | At least 0 and at most object_count returned by HAPI_ComposeObjectList(). |
[in] | length | Given object_count returned by HAPI_ComposeObjectList(), length should be at least 0 and at most object_count - start . |
Fill an array of HAPI_Transform structs with the transforms of each instance of this instancer object for a given part.
- Parameters
-
[in] | session | The session of Houdini you are interacting with. See Sessions for more on sessions. Pass NULL to just use the default in-process session. |
[in] | node_id | The object node id. |
[in] | part_id | The part id. |
[in] | rst_order | The order of application of translation, rotation and scale. |
[out] | transforms_array | Array of HAPI_Transform at least the size of length. |
[in] | start | First 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] | length | Must 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. |
Get the object info on an OBJ node.
- Parameters
-
[in] | session | The session of Houdini you are interacting with. See Sessions for more on sessions. Pass NULL to just use the default in-process session. |
[in] | node_id | The node id. |
[out] | object_info | The output HAPI_ObjectInfo. |
Get the tranform of an OBJ node.
- Parameters
-
[in] | session | The session of Houdini you are interacting with. See Sessions for more on sessions. Pass NULL to just use the default in-process session. |
[in] | node_id | The object node id. |
[in] | relative_to_node_id | The 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_order | The order of application of translation, rotation and scale. |
[out] | transform | The output HAPI_Transform transform. |
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] | session | The session of Houdini you are interacting with. See Sessions for more on sessions. Pass NULL to just use the default in-process session. |
[in] | node_id | The object node id. |
[in] | trans | A HAPI_TransformEuler that stores the transform. |