Jump to content
JKeil

Point Wrangle- source an unconnected node (Resolved)

Recommended Posts

Hello!

Can a point wrangle access sop attribute values  not directly connected as inputs?  

The function in question is the point function.  

 

Scenario:

I am driving the y position of an object "grid1" by the length attribute of sop  "seg_length_height"  Right now I am using

point("../seg_length_height", 1, "length", 0)  and putting this in the translate y scale of a transform sop.  

I would like to do this in a wrangle

So I tried to copy and paste this into a point wrangle with a few modifications and it did not work.  

@P.y = point("../seg_length_height", "length", 1);    

 

If I do the following it of course works 

@P.y = point(1,  "length", 0);  provided the "seg_length_height" is hooked into the second input.  

 

Is this just the way the wrangle is set up?  or am I referencing the oppath incorrectly?  

 

Thanks!

 

 

modeling11_upl.hipnc

Edited by JKeil

Share this post


Link to post
Share on other sites

what about putting this in your attribwrangle2:

@P.y += pointattrib("op:../seg_length_height/", "length", 1, 0);

or

@P.y += point("op:../seg_length_height/", "length", 1);

Edited by Noobini
  • Thanks 1

Share this post


Link to post
Share on other sites

Keep in mind that if you use the op: syntax in this way, your reference will not update if your source object path changes. If you have the ability to directly connect in your network, it's usually the better plan.

Share this post


Link to post
Share on other sites

i was just fumbling around until it works...so is there a proper way to use op: syntax ?

Share this post


Link to post
Share on other sites

Your syntax is correct, there's nothing inherently wrong with it except that it won't be recognized as a dependency. There are plenty of other places where op: syntax is necessary, such as using COPs textures as shader inputs. It's just something to be aware of in case you need to be able to change object names or collect your project dependencies later on down the road.

Share this post


Link to post
Share on other sites

but i turned on display dependencies and it shows....or is it ANOTHER dependency that's not showing ?

Dependency.jpg

Share this post


Link to post
Share on other sites

Looks like they added that in 16.5! In 16.0.736 it definitely doesn't do that... I guess nevermind about the dependency problem, then.

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

×