Jump to content

Error On Parameter Evaluation


Recommended Posts

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

Link to comment
Share on other sites

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(),&amp;AttribID,pos,time);
	std::cout &lt;&lt; "evaluating Float "&lt;&lt; AttribID &lt;&lt; "  " &lt;&lt; pos &lt;&lt;   "  " &lt;&lt; ret_val &lt;&lt; std::endl;
	return ret_val;
}

int SOP_myNode::getAttribValInt(int AttribID,int pos,float time)
{
	int ret_val =  evalIntInst(vaNames[vaVal].getToken(),&amp;AttribID,pos,time);
	std::cout &lt;&lt; "evaluating Int "&lt;&lt; AttribID &lt;&lt; "  " &lt;&lt; pos &lt;&lt; "  " &lt;&lt; ret_val &lt;&lt; std::endl;
	return ret_val;
}

UT_String SOP_myNode::getAttribValString(int AttribID,float time)
{
	UT_String ret_val;
	evalStringInst(vaNames[vaStr].getToken(),&amp;AttribID,ret_val,0,time);
	std::cout &lt;&lt; "evaluating String  "&lt;&lt; AttribID &lt;&lt; "  " &lt;&lt; ret_val &lt;&lt; std::endl;
	return ret_val;
}

any idea ?

thx

Sebastian

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...