feresteanud Posted April 2, 2015 Share Posted April 2, 2015 Hello, I hope this is the right place to ask this question. It is about the prim expression. I did not understand very well what prim_num and attrib_index are in this expression. prim($OBJID, 0, "Cd", 1) In my understanding is returning the value of the attribute color of the specific object id. But 0 referes to what (prim_num) and 1 is what (attrib_index) So i did not understand those two from the expression attrib index and prim num (I have read in the help file but...). Thank you very much Quote Link to comment Share on other sites More sharing options...
jkunz07 Posted April 2, 2015 Share Posted April 2, 2015 I'm not sure if your referring to the vex function or the hscript expression. Prim num is the number of the primitive you want to get the attribute value from, this would be the number that would show up if you toggled prim numbers on in the viewport or the far left column in the details view of prim attributes. Index refers to the component of the attribute, if you have a float it would always be zero, but if you have a vector like Cd it could be 0, 1, or 2 for the x, y, and z components. Quote Link to comment Share on other sites More sharing options...
feresteanud Posted April 2, 2015 Author Share Posted April 2, 2015 (edited) I am not refering to vex function. Ok, I think I get it. So in my case 1 means color green, right? And thank you for your quick answer. Edited April 2, 2015 by feresteanud Quote Link to comment Share on other sites More sharing options...
jkunz07 Posted April 2, 2015 Share Posted April 2, 2015 yes, 0=red, 1=green, 2=blue in regards to color Quote Link to comment Share on other sites More sharing options...
feresteanud Posted April 3, 2015 Author Share Posted April 3, 2015 Thank you. 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.