aldenc98
March 7, 2016 21:45:35
Hi,
I've tried to find this in the docs and on this forum, but what's the proper way to rename a node that is an instance of an asset using the C++ API? I've enumerated the list of the parameters on the node, but didn't see anything matching “name”. The hou.Node class has the name property, but I couldn't find anything matching this functionality in the C++ API.
There's the HAPI_NodeInfo::nameSH, but there isn't any documentation for how to set this value. The docs only have information for how to query HAPI_StringHandle values and not how to create them.
damian
March 8, 2016 13:20:18
There's HAPI_RenameNode() if you just want to rename a node you created via HAPI_CreateNode().
Any other node not created via HAPI_CreateNode() cannot be renamed via HAPI. This is something we're working on for the next version.
Furthermore, HAPI_StringHandle is and will always be a HAPI-side handle. Input strings are passed into HAPI as just const char*'s.
aldenc98
March 8, 2016 20:40:09
Awesome, thanks for the quick response, damian!
I'm still really new to Houdini programming, but I couldn't find neither the HAPI_CreateNode nor the HAPI_RenameNode functions when searching in the docs for 1.9 (
http://www.sidefx.com/docs/hengine1.9/index.html) [
sidefx.com] Am I looking on the correct page, or were these functions only added in HE2.0?
damian
March 10, 2016 10:57:02
Ya, those functions are 2.0 only. Are you still on Houdini 14? Houdini Engine 2.0 came out with H15.
I do want to ask what you're actually trying to accomplish. Like, why are you trying to rename nodes? And, are you trying to rename nodes within an asset?