PDA

View Full Version : realflow Mesh help


misterwolfy
11-18-2010, 02:22 PM
I have a set of bin files that run just fine.

I am trying to trigger the animation by watching particle collisions.

I am getting this error when I try to build the expression, not sure why:


// Error: The attribute 'realflowMeshSource1.time' is locked or connected and cannot be modified. //
// Error: An execution error occurred in the runtime before dynamics expression for particleShape1. //


I originally detached the .time attribute from time-line to allow the expression to drive the animation.

What is the proper way to drive the realflowMeshSource1.time attribute with an expression?

float $colU = particleShape1.collisionU;
float $colV = particleShape1.collisionV;
int $time = `currentTime -q`;
if ($colU > 0) {
particleShape1.lifespanPP=0;
realflowMeshSource1.time = 1;
}

if (realflowMeshSource1.time > 0)
{
int $rft = (`getAttr realflowMeshSource1.time` + 1);
setAttr realflowMeshSource1.time $rft;
//realflowMeshSource1.time = realflowMeshSource1.time +1;
print ($rft + "\n");
}

if (realflowMeshSource1.time > 100)
{
setAttr realflowMeshSource1.time 0;
}


Thanks for reading!!!

misterwolfy
11-19-2010, 12:13 PM
I solved this by instead of using variables, I used an attribute to store the "frame" value. Not sure if that is the best way, but it worked.

(http://www.youtube.com/watch?v=1ZDQdrswyHc)

CGTalk Moderation
11-19-2010, 12:13 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.