PDA

View Full Version : keyframecurve ?



atomik35
03-24-2004, 04:49 AM
Like tax the type of setkeycurve
example:
LINEAR
TCB
How?

You excuse to me but I do not know English well.
I'm italian.
Thanks.

GregMalick
04-14-2004, 01:17 AM
use: setKeyCurve(<key>,<shape>)
<key> is the keyframe
<shape> can use the constants:
CHAN_TCB,
CHAN_HERMITE,
CHAN_BEZIER,
CHAN_LINEAR,
CHAN_STEPPED

OR use the strings:
"TCB"
"Hermite"
"Bezier"
"Linear"
"Stepped"

lots more in LScript Reference - Ch26 Channel Object Agents

atomik35
04-14-2004, 07:02 AM
many Thanks in order to have to me answered.

you can makes a small example me, why I do not succeed to us.

Grazie. (Thank you)

GregMalick
04-14-2004, 09:22 PM
I've never actually needed to do this but....here's what I might try if I wanted to set the Position.X channel of an object called "Null" to have a Bezier curve at the currentTime.


obj=mesh(“Null”);
c=obj.firstChannel();

while ( c )
{
&nbsp&nbsp&nbsp&nbsp if (c.name == “Position.X” ) c.setKeyCurve(Scene().currenttime, “Bezier”);
&nbsp&nbsp&nbsp&nbsp&nbspc=obj.nextChannel();
}


Maybe someone will respond with a cleaner more direct way. I hate that while (c) part.