Justin K Posted February 8, 2018 Share Posted February 8, 2018 (edited) 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 February 9, 2018 by JKeil Quote Link to comment Share on other sites More sharing options...
Noobini Posted February 8, 2018 Share Posted February 8, 2018 (edited) 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 February 8, 2018 by Noobini 1 Quote Link to comment Share on other sites More sharing options...
toadstorm Posted February 9, 2018 Share Posted February 9, 2018 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. Quote Link to comment Share on other sites More sharing options...
Noobini Posted February 9, 2018 Share Posted February 9, 2018 i was just fumbling around until it works...so is there a proper way to use op: syntax ? Quote Link to comment Share on other sites More sharing options...
toadstorm Posted February 9, 2018 Share Posted February 9, 2018 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. Quote Link to comment Share on other sites More sharing options...
Noobini Posted February 9, 2018 Share Posted February 9, 2018 but i turned on display dependencies and it shows....or is it ANOTHER dependency that's not showing ? Quote Link to comment Share on other sites More sharing options...
toadstorm Posted February 9, 2018 Share Posted February 9, 2018 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. Quote Link to comment Share on other sites More sharing options...
Justin K Posted February 9, 2018 Author Share Posted February 9, 2018 thanks for the help! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.