Noobini Posted March 9, 2020 Share Posted March 9, 2020 (edited) FYI, the Radii Attribute in bound maybe useful in some cases...but it's a bit annoying to access it in a wrangle...here's how: The working wrangle is where I got it to work, the others were for reverse engineering. Is there an easier, more obvious way? (I'm preparing to facepalm...) vu_radii.hiplc Edited March 9, 2020 by Noobini Quote Link to comment Share on other sites More sharing options...
anim Posted March 10, 2020 Share Posted March 10, 2020 that's pretty common you need to define the type of the attribute you are expecting to bind, if left ambiguous you'll get fallback value, the best guess or error so for example: vector r = detail(1,"radii",0); // will load detail attribute as vector as it's the only type you are dealing with @P *= detail(1,"radii",0); // same, therefore it will multiply @P component wise @P *= float(detail(1,"radii",0)); // will force detail to read as float so it will fall back to x component if "radii" is vector, therefore it will multiply @P by x component of radii @P *= vector(detail(1,"radii",0)).y; // will force detail to read as vector so it will allow you to specify component as .y, therefore it will multiply @P by y component of radii @P *= vector(detail("../A","radii",0)).y; // will not work, because you are missing op: @P *= vector(detail("op:../A","radii",0)).y; // will work // usually you may want to do this for clarity vector r = detail(1,"radii",0); // will load detail attribute as vector as it's the only type you are dealing with @P *= r.y; // also you can omit last argument in detail function overall vector r = detail(1,"radii"); 1 Quote Link to comment Share on other sites More sharing options...
Noobini Posted March 10, 2020 Author Share Posted March 10, 2020 ahhh..ok so it's like getbbox_size() where it returns a vec representing the 3 dims. 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.