Jump to content

wrangle point attribute


Recommended Posts

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

Link to comment
Share on other sites

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 :Dhttp://www.sidefx.com/docs/houdini14.0/vex/snippets Check out the Accessing Geometry Attributes section

"

Edited by Georgie
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...