Jump to content

how to get one node type name


Recommended Posts

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());
 
 
 
 
 
 
 
 

post-8642-0-28024400-1439969829_thumb.pn

Link to comment
Share on other sites

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.

post-12295-0-40216800-1440032426_thumb.j

Edited by Atom
Link to comment
Share on other sites



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);


Edited by captain
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...