Arthur~Chiu Posted August 19, 2015 Share Posted August 19, 2015 i want to get one sop node type name,only know this node fullpath , the red arrow is what i want and how to get this nodeparameter value,such as the yellow arrow in my code, the path is the node fullpath,and i can get the SOP_Node SOP_Node *soppath_node; OP_Context context(time); soppath_node = findSOPNode(path.c_str()); Quote Link to comment Share on other sites More sharing options...
Atom Posted August 20, 2015 Share Posted August 20, 2015 (edited) It looks like you are set to use Hscript so you can use the global variables. For instance $OS will get you the name of the node and you can fetch the value of any paramter with the ch("paramter_name") command. In the image I am fetching the name of the node and the value of the translate Y. Edited August 20, 2015 by Atom Quote Link to comment Share on other sites More sharing options...
jkunz07 Posted August 20, 2015 Share Posted August 20, 2015 `optype('.')` Will get you the operator type of the current node Quote Link to comment Share on other sites More sharing options...
MrScienceOfficer Posted August 20, 2015 Share Posted August 20, 2015 (edited) SOP_Node *soppath_node = nullptr;//setting it to nullptr is just a good practice OP_Context context(time); soppath_node = findSOPNode(path.c_str()); int columns = soppath_node->evalParm("cols", 0, context.getTime()); // to set it you say const int val = //whatever you want to set it to soppath_node->setInt("cols", 0, context.getTime(), val); http://www.sidefx.com/docs/hdk14.0/_h_d_k__node_intro__working_with_parameters.html Edited August 20, 2015 by captain Quote Link to comment Share on other sites More sharing options...
Arthur~Chiu Posted August 21, 2015 Author Share Posted August 21, 2015 how to get node type name in hdk,like the png show grid node ,i want to get the name "grid" Quote Link to comment Share on other sites More sharing options...
graham Posted August 21, 2015 Share Posted August 21, 2015 You can access the label through OP_Operator (the node definition). const UT_String &label = soppath_node->getOperator()->getEnglish() Quote Link to comment Share on other sites More sharing options...
Arthur~Chiu Posted August 21, 2015 Author Share Posted August 21, 2015 how to packed ploymesh Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.