Infernalspawn Posted September 25, 2007 Share Posted September 25, 2007 Hi, i dont know if somebody has this problem before, but i dont know where to search anymore maybe someone got that problem and could point me in a direction. i have a sop node with some parameters, there are float and string parameters, i want to use some local variables in this parameters thats why i`ve written getVariableValue(int index,int thread) function. the problem now is, that this evaluation works for the string parameter but not for the float parameters, ... for the float parameters houdini tells me with a mmb on the node Error: Unable to evaluate expression File <stdin>, line 1 $ID syntax error, invalid syntax (/obj/geo/mynode/attrValue11) but it evaluates when i use my string paramenter. Does somebody has an idea? thx in advance Sebastian Quote Link to comment Share on other sites More sharing options...
edward Posted September 26, 2007 Share Posted September 26, 2007 For your float parameters, did you use PRM_FLT_J or PRM_XYZ_J? Note that the _J is important. Quote Link to comment Share on other sites More sharing options...
Infernalspawn Posted September 26, 2007 Author Share Posted September 26, 2007 Hi edward, yes, i use PRM_FLT_J for the parameters, and this is the code i use for read the values from the UI, AttribID is used because their is a dynamic list of parameters, and pos describes the position where to access an e.g. 4 float parameter float SOP_myNode::getAttribValFloat(int AttribID,int pos,float time) { float ret_val =evalFloatInst(vaNames[vaVal].getToken(),&AttribID,pos,time); std::cout << "evaluating Float "<< AttribID << " " << pos << " " << ret_val << std::endl; return ret_val; } int SOP_myNode::getAttribValInt(int AttribID,int pos,float time) { int ret_val = evalIntInst(vaNames[vaVal].getToken(),&AttribID,pos,time); std::cout << "evaluating Int "<< AttribID << " " << pos << " " << ret_val << std::endl; return ret_val; } UT_String SOP_myNode::getAttribValString(int AttribID,float time) { UT_String ret_val; evalStringInst(vaNames[vaStr].getToken(),&AttribID,ret_val,0,time); std::cout << "evaluating String "<< AttribID << " " << ret_val << std::endl; return ret_val; } any idea ? thx Sebastian Quote Link to comment Share on other sites More sharing options...
edward Posted September 26, 2007 Share Posted September 26, 2007 Not sure. Make sure your parameters are in hscript and not python mode? Also that your AttribID value is correct? 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.