victorrijo Posted April 29, 2016 Share Posted April 29, 2016 Hi everyone, I'm trying to give a value to an attribute of a line connected to an attribute vop sop. I know I can give a value to the global variables like P, N, Cd etc. but what if I want to give a value to something like the direction of the line ( dirx, diry, dirz ) using vex. I can access these attributes easily using ch() but setting the values is not as simple as dirx = 1; Quote Link to comment Share on other sites More sharing options...
j00ey Posted May 1, 2016 Share Posted May 1, 2016 To set a float attribute in a wrangle node you can write f@dir = 1; To set a vector attribute you can do v@dir = {1,2,3};//note curly brackets or else if you want to set it to some sort of variable you need to use the set() function - v@dir = set(@ptnum, @N.y, 0); Quote Link to comment Share on other sites More sharing options...
Atom Posted May 1, 2016 Share Posted May 1, 2016 I think Victor may be asking about channels, not attributes, which VEX can not do at this time as of H15. So he is not looking to set an attribute on the data of the node but instead set a value on one of the parameter channels of the node. Quote Link to comment Share on other sites More sharing options...
victorrijo Posted May 2, 2016 Author Share Posted May 2, 2016 On 5/1/2016 at 0:54 PM, j00ey said: To set a float attribute in a wrangle node you can write f@dir = 1; To set a vector attribute you can do v@dir = {1,2,3};//note curly brackets or else if you want to set it to some sort of variable you need to use the set() function - v@dir = set(@ptnum, @N.y, 0); Hey @j00ey, thanks for responding and I'm sorry if my post was confusion but yes, @Atom is completely right. 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.