How to access individual values of a vector attribute in VEX
2853
5
1
LMaly
Member
8 posts
Joined: 11月 2021
Offline
2022年1月4日 7:37
Hi guys!
I am using a resample node and letting it create the Tangent Attribute. It works fine but I cannot figure out how to then access the individual values of that attribute in an Attribute Wrangle node.
I have tried @tangentu.0 @tangentu @tangentu{0} @tangentu.x @tangentu.r but nothing works, I always get an error saying that the attribute is a float and not a vector.
Any ideas? Thanks!
Image Not Found
Image Not Found
Attachments:
img03.jpg (243.6 KB)
Hatchery
Member
136 posts
Joined: 3月 2016
Offline
2022年1月5日 11:37
try using @tangentu.x rather than .0
and maybe try
v@tangentu.x to be very explicit its a vector.
Love Houdini
animatrix_
Member
4616 posts
Joined: 2月 2012
Offline
2022年1月6日 3:54
Hi,
tangentu is not one of the known attributes so you have to explicitly specify the type unless if it's float as @Hatchery mentioned v@tangentu.
Then you can use
or
Andr
Member
900 posts
Joined: 2月 2016
Offline
2022年1月6日 5:00
I rmb this issue was driving me crazy when working with user-created vector attributes in Vex. Now I developed the habit of always specify the data type when reading any attrib. Just in case.
LMaly
Member
8 posts
Joined: 11月 2021
Offline
2022年1月10日 5:54
Hatchery try using @tangentu.x rather than .0 and maybe try v@tangentu.x to be very explicit its a vector.Thanks that worked!
I was also able to get it done by using the attrib() function
But I see that using
v@tangentu.x is essentially the same thing but more efficient.
Thanks a lot for the help!
Attachments:
Capture.JPG (37.1 KB)
LMaly
Member
8 posts
Joined: 11月 2021
Offline
2022年1月10日 5:54
Andr I rmb this issue was driving me crazy when working with user-created vector attributes in Vex. Now I developed the habit of always specify the data type when reading any attrib. Just in case.yeah I will make sure to make a habit of it too! thanks for the tip!