VEX assign components error
1014
2
0
-
- mzigaib
- Member
- 944 posts
- Joined: April 2008
- Offline
If i have two vector vertex or point attributes like @uv and @uv_2 and try in vex:
@uv.x=@uv_2.y;
I got an error, even if I do like:
vector u = @uv_2.x;
I also got an error so if I try like:
vector u = @uv_2;
@uv.x=u.y;
Then it works but if I try like:
@Cd.y=@P.y;
It also works! For some reason I can't assign directly components for some attributes, what am I missing?
-
- jsmack
- Member
- 7658 posts
- Joined: Sept. 2011
- Online
@foo binds to floats, except for some special cases like ‘Cd’ and ‘uv’
Since ‘uv_2’ is not a special case, it's bound as a float, and floats don't have components.
either prototype it first:
or use
v@uv_2
to bind as a vector
Edited by jsmack - July 28, 2020 20:03:08
-
- mzigaib
- Member
- 944 posts
- Joined: April 2008
- Offline
Ok it makes sense, thanks for the explanation!