Jump to content
Sign in to follow this  
localstarlight

Putting wrangle results into parameters?

Recommended Posts

How can I put the results of a wrangle into a parameter?

As a very simple example, imagine I have a subnet containing an attribute wrangle. On the wrangle I do something like:

float x = 2 * 2;

Now say I have a parameter on the subnet called 'Result', how can I put the output of 'x' into the 'Result' parameter? (Let's assume I do the attribute wrangle on Detail mode so it only runs once.)

Is this possible?

I have tried outputting the answer onto the Detail of the incoming object, eg.

f@output = x;

But then cannot figure out how a parameter can read from the detail of the object to show the result.

Share this post


Link to post
Share on other sites

VEX can't write to channel parameters at this time (Houdini 15.5). But Python can, just use a Python node instead of an Attribute Wrangle.

result_node = hou.node("/obj/some_node_with_result_parm")
x = 2
y = 3
result = x * y
result_node.parm("result").set(result)

 

Edited by Atom
  • Like 1

Share this post


Link to post
Share on other sites
Quote

VEX can't write to channel parameters at this time (Houdini 15.5). But Python can, just use a Python node instead of an Attribute Wrangle.

I hope they add this functionality...cant see the logic of not giving VEX this feature.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×