Jump to content

Switch tab on node (trace) via python


Recommended Posts

Hey all,  python / HDA related question:

I'm making an HDA where I'm creating a bunch of trace nodes linking to a bunch of rotoshapes in a COP network, which is all good and everything is linking correctly...however I want to initialize the COP tab on the trace node via a python when the node is created instead of the default File node option. 

Also, I've just been grabbing nodes and dragging them into the python windows to get things working, but down the line how would you make the paths underlined in yellow relative to the HDA?   I've tried the ../ I've used before, but it's throwing me errors whenever I try to reference relatively. 

Thanks in advance! 

 

93643402_TraceNodePython_question.thumb.png.8b63df27c0e4a46d018db6e7aa1eb48e.png

Link to comment
Share on other sites

  • 3 weeks later...

To switch the tabs you would use:

newt.parm('usecop1').set(1)

For relative references you would want to use "./" rather than "../".

The former will reference the node itself, allowing you to access its parms and internal nodes. The latter will reference the parent of the node instead.

  • Thanks 1
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...