Follyx Posted June 24, 2016 Share Posted June 24, 2016 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. - Quote Link to comment Share on other sites More sharing options...
3dome Posted June 24, 2016 Share Posted June 24, 2016 (edited) 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 June 24, 2016 by 3dome edit Quote Link to comment Share on other sites More sharing options...
l0op1ng Posted June 26, 2016 Share Posted June 26, 2016 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. Quote Link to comment Share on other sites More sharing options...
holycause Posted June 26, 2016 Share Posted June 26, 2016 (edited) 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 June 26, 2016 by holycause Quote Link to comment Share on other sites More sharing options...
woodenduck Posted June 27, 2016 Share Posted June 27, 2016 You could use xyzdist and primuv, but I think that may be slower than pcopen and attrib transfer! int prim = @primnum; vector uv = @uv; float maxdist = ch("maxdist"); xyzdist(1, @P, prim, uv, maxdist); @Cd = primuv(1, "Cd", prim, uv); 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.