Jump to content

nodes in vex


Recommended Posts

dies this exist anywhere? A sheet with vexcode for nodes wich arent written in vex.

i.e. Attrib transfer:

-assigning the value to existent variables.

-an if then for non existent variables etc.

-creating non existent variables

blahblah....

that would be good.

-

Link to comment
Share on other sites

attrib transfer in vex is pretty easy actually.

You just need an attribwrangle and type @P = v@opinput1_P; (if you want to transfer P for example)

this transfers the P of input1 to the P of input0

This is because by default attribwrangle matches attributes by id (you can see/change that in bindings tab)

Edited by 3dome
edit
Link to comment
Share on other sites

Great ! I didn't know that you can transfert by id.

But is there a way to do it like attrib transfert by distance without the cost of using a point cloud ?

If you compare the cost of attrib transfert versus a pcopen in wrangle, there is a huge performance difference.

 

Link to comment
Share on other sites

another way to copy attributes from another input is to use the "findattribval" function

it returns the point number of the given input if it founds it or -1 if it doesn't find.

int match = findattribval(1, "point", "name", s@name);

if(match!=-1) @P = point(1, "P", match);

 

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