papicrunch Posted February 22, 2014 Share Posted February 22, 2014 Hi, Is there an equivalent of " opdigits " expressions in Vex ? thank Quote Link to comment Share on other sites More sharing options...
magneto Posted February 22, 2014 Share Posted February 22, 2014 I don't think there is, the only way I know is to use the opdigits in a parameter and then reference that in VEX code. Quote Link to comment Share on other sites More sharing options...
papicrunch Posted February 23, 2014 Author Share Posted February 23, 2014 so bad the opdigits expression is really slow thx Quote Link to comment Share on other sites More sharing options...
papicrunch Posted February 23, 2014 Author Share Posted February 23, 2014 just repost the goal of that on sidefx forum hi, Is there a way to pass an attribut when packing an object, as the "name" can be retrieved to intrinsic_fragmentname. One solution that I found is to concat my custom attribut in the name then retrieve it with the opdigit expression. (see the hip) But the opdigit expression is really slow to evaluate and with a lot pack primitive is not a viable solution. thank, papi Quote Link to comment Share on other sites More sharing options...
papicrunch Posted February 23, 2014 Author Share Posted February 23, 2014 the hip intrinsic3.hip Quote Link to comment Share on other sites More sharing options...
magneto Posted February 23, 2014 Share Posted February 23, 2014 I am not sure exactly what you are doing but you can split the string in VEX using the split function and then convert the last element into an integer using the atoi function. Quote Link to comment Share on other sites More sharing options...
papicrunch Posted February 23, 2014 Author Share Posted February 23, 2014 (edited) great idea but i dont find a way to use this function in the attributWrangle sop, how can i declare an array string ? edit : ok thank you it s work if i create a vex operator !! (my first one whoohoo) Edited February 23, 2014 by papicrunch Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted February 23, 2014 Share Posted February 23, 2014 Vex can manipulate only the data that you pass to it. So to get operator number you need to pass it somehow. Quote Link to comment Share on other sites More sharing options...
papicrunch Posted February 23, 2014 Author Share Posted February 23, 2014 thank you, the working hip if interested have fun intrinsic4.hip Quote Link to comment Share on other sites More sharing options...
magneto Posted February 23, 2014 Share Posted February 23, 2014 Your file has incomplete asset definition but you don't need a new SOP to do this. Just use something like this in AttribWrangle string s = primintrinsic(ch("parm"),"fragmentname",@primnum); s@__foo=s; string items[] = split(s, "_"); s@first= items[0]; 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.