magicU Posted August 18, 2015 Share Posted August 18, 2015 Hi all, long time lurker, first time poster..I'm trying to "convert" a Point SOP expression of $NX= $TX2-$TX into Point Wrangle VEX terms where there are 2 inputs to the Point SOP. I couldn't find any doc references to accessing the other inputs of the Point Wrangle and was hoping someone could point me in the right direction? I thought @P1.x-@P.x might work...but to no avail! Even the Ari Danesh H12.5 wrangle tutorial doesn't seem to address multiple inputs... thanks! Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted August 18, 2015 Share Posted August 18, 2015 In Houdini 14 a good way of figuring out what command is used to access something standard is to put AttributeVOP and look how outputs are called in Geometry Global Parameters VOP, assuming that you have Show Full Input and Ouput Names on VOP Nodes turned OFF in Edit => Prefences => Network Editor, Nodes and Tree. Than you can see how standard variables are called, for example last four outputs are used for accessing inputs coming into AttributeVOP, so just add @ to the name of variable and you have your answer. Quote Link to comment Share on other sites More sharing options...
jkunz07 Posted August 18, 2015 Share Posted August 18, 2015 This thread may be helpful as well: https://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=28469&highlight= there are some wrangle workflows compared with point sop workflows. Quote Link to comment Share on other sites More sharing options...
anim Posted August 18, 2015 Share Posted August 18, 2015 to access other inputs currently you can use point(), vertex(), prim(), detail(), ... functions vector P2 = point(1, "P", @ptnum); @N = P2-@P; 2 Quote Link to comment Share on other sites More sharing options...
magicU Posted August 19, 2015 Author Share Posted August 19, 2015 Thanks all, I ended up stumbling across the point() function, but got confused as to why I could skip out passing the "point_number" value mentioned in the docs.I ended up using this code (Tomas, thanks, I quite like the shorthand of using 1, instead!):@N=point(@OpInput2, "P", @ptnum)-@P ; The docs function - point(surface_node, point_number, attribute, index) Quote Link to comment Share on other sites More sharing options...
acey195 Posted August 19, 2015 Share Posted August 19, 2015 (edited) what you just did is not super safe though, because the types you use are ambiguous. Because @N and @P are hardcoded to be vectors it might work in this case, but to be safe you may want to add type descriptors, so your code would become: v@N = vector(point(@OpInput2, "P", @ptnum))-v@P ; @attrib creates a float attrib by default but you can state what it should be: f@attrib, for floats i@attrib, for ints v@attrib, for vectors s@attrib, for strings Edited August 19, 2015 by acey195 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.