Jump to content

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
Link to comment
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
Link to comment
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.

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