MENOZ Posted March 7, 2015 Share Posted March 7, 2015 hello, I'm trying to store the values of an attribute in a new one. after creating a vector attribute test in vop with a noise I want to copy it on v@d in wrangle but.. v@d=@test; just takes the first index of test v@d=point(0,"test",@ptnum); i have to use this to get the correct values but at the same time v@Ptemp=@P; works correctly, even with normals and color. I tried to change the type fo the attributes in wrangle using setattribtypeinfo but it looks like it doesn't makes any difference. can anyone explain the logic behind this? attached a simple example file attribWeird.hip Quote Link to comment Share on other sites More sharing options...
Georgie Posted March 7, 2015 Share Posted March 7, 2015 (edited) v@test; v@d = @test; OR v@d = v@test; All other @ references are cast as float. To manually specify the VEX datatype for an attribute, you must add a character representing the type before the @ sign. For example, to cast the foo attribute as a string, you would use s@foo. That's the reason for your issues. When that happens, only the X component of a vector is used. @P on the other hand is internally recognized as a vector. So you don't need the v@P notation. Altho I usually write this anyway. edit; forgot link http://www.sidefx.com/docs/houdini14.0/vex/snippets Check out the Accessing Geometry Attributes section " Edited March 7, 2015 by Georgie Quote Link to comment Share on other sites More sharing options...
MENOZ Posted March 8, 2015 Author Share Posted March 8, 2015 thanks a lot! everything makes sense again 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.