Jump to content

How to click a button of a node inside the network of an asset?


Recommended Posts

Hi,

I am making an asset where I want to click a button of a node inside the subnet of the asset. I know how to do these for asset parameters but not sure how to do it for a node inside an asset.

Any ideas?

Thanks :)

RMB click button-> Expressions -> edit expression? Is this what you are looking for?

Link to comment
Share on other sites

Thanks, no I mean something similar to this:

kwargs['node'].hdaModule().setHeight(kwargs)

where you use a callback script to trigger a button click if the user clicks a button in your asset.

But I want to click the button of a node inside the subnet like:

kwargs['node'].nodes('/uvproject1/initialize').pressButton()

Edited by magneto
Link to comment
Share on other sites

Thanks hopbin, I will promote it to the asset level, hide and trigger the click in the callback script, because I want to press it anytime they change some numeric values.

But if anyone knows how to access a parameter in the subnet from a callback script without promoting it to the asset level, that would be great.

Link to comment
Share on other sites

Thanks hopbin, I will promote it to the asset level, hide and trigger the click in the callback script, because I want to press it anytime they change some numeric values.

But if anyone knows how to access a parameter in the subnet from a callback script without promoting it to the asset level, that would be great.

I'm not sure you have to promote it in order to press it.

Try something like this, as a Python callback.

kwargs['node'].node('inner_node_name').parm('button_name').pressButton()

That should work.

  • Like 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...