Lost Adventurer, Aleks Kirilenko (3D)
LC #42 Pipers Alley

View Full Version : Menu/Kolve particlesampler question, probably quite simple

09-22-2005, 10:02 AM

We want to use the particlesampler from Carsten Kolve (http://www.kolve.com....really cool btw) to get some curves out of animated particles. The command to execute is this :

particleMotion2Curve <startTime> <endTime> <sampleStep> <curveDegree>;

Works perfect, but a bit non-effective to type this every single time when this needs to be executed. So I build a little menu for it :

window -title "Particles to motionpath" -widthHeight 450 150;
$Start = `floatFieldGrp -numberOfFields 1 -label "Sampling Startframe :"`;
$St = `floatFieldGrp -q -value $Start`;
$End = `floatFieldGrp -numberOfFields 1 -label "Sampling Endframe :"`;
$En = `floatFieldGrp -q -value $End`;
$sampleStep = `floatFieldGrp -numberOfFields 1 -label "Samplerate (in frames)"`;
$Sa = `floatFieldGrp -q -value $sampleStep`;
$curveDegree = `floatFieldGrp -numberOfFields 1 -label "Degree created curves"`;
$Cu = `floatFieldGrp -q -value $curveDegree`;
button -label "Execute" -command "particleMotion2Curve $St $En $Sa $Cu";

There are 2 problems :

when I do a

button -label "Execute" -command "print $St";

The value is 0, no matter what I type in the Startframe ($St). What goes wrong?

Second problem is that "print $St"; works fine, but "print $St $En $Sa $Cu"; does not. Just as "particleMotion2Curve $St"; would work fine, but "particleMotion2Curve $St $En $Sa $Cu"; doesn't. There must be a way to get all the variables needed behind particleMotion2Curve, but I don't know how at this moment. Anyone got an idea ?

CGTalk Moderation
09-22-2005, 10:02 AM
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.