View Full Version : Expression Nodes realtime evaluation

05 May 2006, 10:30 AM

I am facing a problem with expression node evaluation .
a simple expression like pSphere1.tx=pCube1.tx; will evaluate real time (no problem)
bearing in mind that the "Evalution" drop down menu is set to "Always".

but an expression like :

float $x1[]=`xform -q -ws -t[6]`;
float $x2[]=`xform -q -ws -t[6]`;

float $xf[];


which is also not that complex , and is connected to an attribute or in this case multiple attrs, will not evaluate untill the time have changed , (scrubing).

MY Question: How do I make my expression nodes evaluate realtime, regardless of their content.
something a bit more stable than scriptJob.

Thank You

05 May 2006, 10:18 PM
Since your sphere's translation is dependent on the evaluation of a mel command, the expression doesn't "know" of this dependancy. For an expression to know of a dependency, both the inputs and outputs must be established using "true" connections (e.g. sphere1.tx = cube1.tx; or float $tx = cube1.tx; sphere1.tx = $tx;). I'm guessing your expression is setup the way it is because you want visual feedback on both the curve and the sphere. You could easily get the same result by creating a cluster for each of the cv:s you want to manipulate, then one group for each cluster, which you snap to the cluster and then parent the cluster to (since clusters are created at 0 0 0 in worldspace), then connect the translation of the groups to the expression like so:$null1X = null1.tx;
$null1Y = null1.ty;
$null1Z =;

$null2X = null2.tx;
$null2Y = null2.ty;
$null2Z =;

pSphere1.translateX = ($null1X - $null2X)*0.5+$null2X;
pSphere1.translateY = ($null1Y - $null2Y)*0.5+$null2Y;
pSphere1.translateZ = ($null1Z - $null2Z)*0.5+$null2Z;That should make the dependencies work and give you realtime update.

CGTalk Moderation
05 May 2006, 10:18 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.