doc Posted June 22, 2007 Share Posted June 22, 2007 (edited) Hi I've got a couple of questions about evalString, first off what are the last two parameters(int vi and float t) suppose to represent/ control void evalString(UT_String &val, int pi , int vi, float t); void evalString(UT_String &val, const char *pn, int vi, float t); my second question is about int *pi in the following: void evalString(UT_String &val, const char *pn, int *pi, int vi, float t); What does it represent and when would you use instead of the other two? Many, Many, thanks L Edited June 22, 2007 by doc Quote Link to comment Share on other sites More sharing options...
sibarrick Posted June 23, 2007 Share Posted June 23, 2007 As I understand it (and I may be wrong) float t is time - ie in channels that can be keyframed it tells the eval function when on the timeline to evaluate the parameter. I don't think you can key frame strings so I'm not sure if its their just for possible future compatibility, i always set it to 0. int vi is the component you want to evaluate - ie in a 3 float vector it would be 0, 1 or 2 Again in a string I'm not sure you can have more than 1 component so again I always set it to 0. As for your second question, I'm not sure... sorry Quote Link to comment Share on other sites More sharing options...
rjpieke Posted June 25, 2007 Share Posted June 25, 2007 (edited) my second question is about int *pi in the following:void evalString(UT_String &val, const char *pn, int *pi, int vi, float t); (extracted from OP_Parameters.h) ***** vi : vector index pi : parameter index pn : parmeter name v: vector component (if v == -1, all components are affected) ***** If you know the parameter index, it might be faster to use it for the lookup, rather than the parameter name. But, unless you're doing this thousands of times, it's probably not worth it. Cheers! Edited June 25, 2007 by rjpieke Quote Link to comment Share on other sites More sharing options...
edward Posted June 25, 2007 Share Posted June 25, 2007 You should always pass the proper time when evaluating parameters even though most legacy code didn't. Even in H8, it could cause cooking problems. For example, if your string parameter uses vtorigin() for some reason, then it will return the result at time 0 instead. Quote Link to comment Share on other sites More sharing options...
doc Posted June 25, 2007 Author Share Posted June 25, 2007 Thanks for the help guys. L 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.