How to get absolute path of skeleton chain nodes? HDK c++

   1780   1   0
User Avatar
Member
11 posts
Joined: June 2008
Offline
this is what I have
void accessGeometry(OBJ_Node* obj_node, fpreal cook_time){
.....
	OP_Context context(cook_time);
	SOP_Node* sop_node = obj_node->getDisplaySopPtr();
	GU_DetailHandle gd_handle = sop_node->getCookedGeoHandle(context);
....
	GU_DetailHandleAutoReadLock gd_lock(gd_handle);
	const GU_Detail* gdp = gd_lock.getGdp();
....
	GEO_AttributeCapturePath paths(gdp);
....
	std::cout << "Path " << paths.getPath(0) << "\n";
//0 -> 1 -> n
.....
}

then I am splitting string to get name of chain and then I need to add path of root obj manually
like “/obj/” + name, and what if I have subnetwork or net in net.
and then I was planning to use:

OBJ_Node * obj_nodeBone = OPgetDirector()->findOBJNode(pathOfNode);



Is it there any possibility to have absolute path of capture node or node it self with HDK.
this paths.getPath(0) is giving me just for eg. chain_bone1/cregion regardless if it is in subnet or not. but when I am searching for I need to use absolute path that have eg. /obj/subnet/chain_bone1/cregion

thanks
Edited by horak - May 31, 2016 08:17:22
User Avatar
Member
11 posts
Joined: June 2008
Offline
one of solution I have is to use:

....
const GU_Detail* gdp = gd_lock.getGdp();
....
GA_ROHandleS  CSR_h(gdp,GA_ATTRIB_GLOBAL,GEO_STD_ATTRIB_CAPT_SKELROOT);
std::cout << " "   << CSR_h.get(0) << "\n";
....

to get path of GEO_STD_ATTRIB_CAPT_SKELROOT “pCaptSkelRoot”

and add that to my path
  • Quick Links