PDA

View Full Version : mel script evauation question


JayWalker
02-28-2009, 04:21 AM
I have a problem and wonder if anyone can help me out with it. I need to get this script to work in real time and not just at playback....

//Output[i] = traget1[i] * Blender[i] + traget2[i] * (1.0 - Blender[i])

float $Target1[]=`xform -q -ws -t pCube1`;
float $Target2[]=`xform -q -ws -t pCube2`;
float $mixer1;
$mixer1 = con.mix/10;
pSphere1.translateX= ($Target1[0] * $mixer1 + $Target2[0] * (1.0 - $mixer1) );
pSphere1.translateY= ($Target1[1] * $mixer1 + $Target2[1] * (1.0 - $mixer1) );
pSphere1.translateZ= ($Target1[2] * $mixer1 + $Target2[2] * (1.0 - $mixer1) );

to sum up the script it always me to tween between two points in world space. a double parent constraint for some reason will not solve correctly in one area of the rig.

Wick3dParticle
02-28-2009, 03:42 PM
Hey Jason.

Have you tried running a scriptJob with that script? You can trigger it with an attributeChange event.

~Ilan

JayWalker
02-28-2009, 07:35 PM
thank you, ill give it a try

BigRoyNL
03-01-2009, 05:43 PM
Your script actually does the same as 'two point constraints' right?
So using this as a 'different way of doing double parent constraints' will not work.

Or am I wrong here?
Tell me if I understood you in a wrong way.

JayWalker
03-01-2009, 08:53 PM
with the double parent there was something causing a problem with the way it evaluated. so instead of going point to point it shot all over the Area before going where it should. changing how it run like no flip and so on had no effect so i needed a completely linear solution

CGTalk Moderation
03-01-2009, 08:53 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.