HDK - Get Full name string from Houdini

   4664   6   0
User Avatar
Member
26 posts
Joined: March 2008
Offline
Hopefully a quick and easy query.

Inside Houdini you have the full name information (ex /Obj/Geo1/Box1…)

I was wondering if you can get this full name from the HDK?
The part I am interested in is the Geo1 part, since that is the whole Geometry object.

Thank you.
You cant recycle wasted time
User Avatar
Member
85 posts
Joined: July 2005
Offline
Well I will do as follow:

OP_Node* current_input_node = getInput( current_obj );
OP_Network *my_parent = current_input_node->getParent();
OP_Node *my_parent_node = my_parent->getCurrentNodePtr();
my_parent_node->getFullPath( my_parent_full_path );

Loop until your parent node is “/Obj”
get the path of the child node and you will have Geo1
User Avatar
Member
26 posts
Joined: March 2008
Offline
I am assuming that the “getInput()” function is from the OP_Node header?

One problem I have, is that I dont know how to get a valid OP_Node pointer into my project. I am working on a standalone application (outside Houdini) so all I have to work from is the GU_Detail pointer. Where I cant find a way to get a pointer to the OP_Node class.
You cant recycle wasted time
User Avatar
Member
7766 posts
Joined: July 2005
Offline
Er, do you even have any nodes at all then? Are you loading a .hip file? OPgetDirector() should return the “/” node.
User Avatar
Member
26 posts
Joined: March 2008
Offline
Er, do you even have any nodes at all then? Are you loading a .hip file? OPgetDirector() should return the “/” node.

Well, I either load a file into Houdini, or create a new object, then RMB and choose “save geometry” and choose my file extension to get it going, so I assume I have nodes.

But what I see as nodes could be something else.
I see the SOP boxes you have in the bottom right corner as nodes.

I havent used OPgetDirector() function before. But its the same problem there. I cant seem to get a valid point to the OP_Director class in order to get the the function.
You cant recycle wasted time
User Avatar
Member
7766 posts
Joined: July 2005
Offline
The “SOP boxes” are nodes. Nodes create/modify geometry. Nodes own the geometry. So if you're only dealing with a geometry file, then there's no nodes.
User Avatar
Member
26 posts
Joined: March 2008
Offline
The “SOP boxes” are nodes. Nodes create/modify geometry. Nodes own the geometry. So if you're only dealing with a geometry file, then there's no nodes.

Aha! Then I understand.

Okey, so I do not have any nodes in my project so I can go that way.
You cant recycle wasted time
  • Quick Links