Atom Posted June 15, 2015 Share Posted June 15, 2015 (edited) Hi All, I am watching Ari Danesh video on the PointWrange, introduced in H12.5 His example no longer works in H14. In this scene the VEX code should randomize the Y points on the grid but the point wrangle seems to have no effect. What am I doing wrong? ap_point_wrangle_porblem.hipnc Edited June 15, 2015 by Atom Quote Link to comment Share on other sites More sharing options...
Skybar Posted June 15, 2015 Share Posted June 15, 2015 You have a typo there, two of them. Your attributes is called "rnd_y" and "rnd_v" - but later you use "rand_y" and "rand_v" that doesn't exist. Quote Link to comment Share on other sites More sharing options...
Atom Posted June 15, 2015 Author Share Posted June 15, 2015 (edited) Ah, thank you..(again). That does seem odd to me, however. Shouldn't undeclared variables throw an error in the Wrangle node itself? (or at least a warning) For instance if I simply type a single line @my_var; (which is of an unknown type) I get a float attribute in the Geometry sheet with a value of 0.0. It seems the act of using a variable declares it as a float and initializes it with 0.0. That is why my mis-spelled variable produced no errors. A mis-spelled variable is a declared variable. And with it's value being zero it did not make any change in the y-direction. Because multiplying by zero is zero. This certainly compounds the end-users ability to detect errors based upon typos. Ugh.. Edited June 15, 2015 by Atom Quote Link to comment Share on other sites More sharing options...
anim Posted June 15, 2015 Share Posted June 15, 2015 Ah, thank you..(again). That does seem odd to me, however. Shouldn't undeclared variables throw an error in the Wrangle node itself? (or at least a warning) For instance if I simply type a single line @my_var; (which is of an unknown type) I get a float attribute in the Geometry sheet with a value of 0.0. It seems the act of using a variable declares it as a float and initializes it with 0.0. That is why my mis-spelled variable produced no errors. And with it's value being zero it did not make any change in the y-direction. Because multiplying by zero is zero. This certainly compounds the end-users ability to detect errors based upon typos. Ugh.. undeclared variables throw error and everything is as expected the difference in your case is that you are not using variables, but attribute bindings so @attribname, automatically binds that to an attribute and if that attribute doesn't exist it will be created and initialized with specified type(if specified by Attributes To Create pattern) your example using actual variables would look like vector pos = set(0,1,0); float rnd_y = random(@ptnum); vector rnd_v = set(0,rnd_y * 3.11,0); @P += pos + rnd_v; if you misspell variable names in there you would see errors Quote Link to comment Share on other sites More sharing options...
Atom Posted June 15, 2015 Author Share Posted June 15, 2015 Got it, thanks Tomas. Ari Danesh explained the difference between temporary variables and @variables later on in the video. I guess I should I have watched the entire video before posting. 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.