vex: adding attributes

   3037   2   1
User Avatar
Member
18 posts
Joined: Nov. 2015
Offline
Ok, this is driving me nuts. Can someone explain to me why the attached scene doesn't work?
Inside the geometry I'm defining a vector attribute and add it to P. If I do it in the same wrangle it works. Defining the attribute in another wrangle doesn't. Using a pointvop however works?

Thanks in advance!

Attachments:
vex_add.hip (96.9 KB)

User Avatar
Member
2036 posts
Joined: Sept. 2015
Offline
In your ‘offset1’ just before your WTF you are only using @test

which is a user-defined attribute.

You can only refer to user defined attributes as you have when it's in the same wrangle that it was first declared;

v@test = set(1,2,3);

// blah blah code
// blah blah code

@test = set(2.1, 4.5, 2);// this is ok

In subsequent wrangles if you want to use it you have to ‘pull it back in’ by prefacing what type it was.

so if you put it as v@test instead of @test, your WTF will go away.
Edited by BabaJ - Sept. 24, 2018 11:03:05
User Avatar
Member
18 posts
Joined: Nov. 2015
Offline
Aaah, ok. Thank you!!!
  • Quick Links