A simple question of HAPI_SetParmIntValue arguments

   2773   2   1
User Avatar
Member
6 posts
Joined: Oct. 2018
Offline
Using this API, for instance, see the picture.
If I want to change the second value, the ‘index’ is 1 without doubt, but what is the ‘parm_name’? ‘Translate’ or ‘ty’ ?

When I load a hda file, I can get the parameter name ‘Translate’ from the ‘nameSH’ of the ‘HAPI_ParmInfo’ struct,
but how do I get the name of each index like ‘tx’, ‘ty’ ?
Edited by VincentKK - Oct. 18, 2018 14:18:03

Attachments:
Catch2F82(10-18-09-37-37).jpg (54.0 KB)

User Avatar
Staff
534 posts
Joined: Sept. 2016
Offline
Hi,

Parameters ending with x/y/z/w are actually special case, as the last character can be ignored:
In your case, the param name is a actually “t”

Translate is the param's label
t is the param's name. It's a float tuple3 that can be split to tx ty tz

To modify the Y translation to 20:
HAPI_SetParmFloatValue(session, node_id, “t”, 1, 20.0f )

Cheers
User Avatar
Member
6 posts
Joined: Oct. 2018
Offline
dpernuit
20.0f
Cool, thank you!
  • Quick Links