Re: [script] Creating relative values fcurve

Date : Fri, 27 Apr 2007 19:17:00 -0500
To : XSI(at)Softimage.COM
From : "Bernard Lebel" <3dbernard(at)gmail.com>
Subject : Re: [script] Creating relative values fcurve
And why should that be a problem? If I use 25.0 at the time, isn't it
an exact frame? Just curious.

I'll try what you suggested on Monday, thanks for the advice!

Bernard



On 4/27/07, Bradley Gabe <withanar(at)stanwinston.com> wrote:

Bernard, not a showstopper. Check the documentation on the addkey() method and you'll see what's happening. The third parameter is for tolerance, which you have set to 0, and that forces the key to be set on exact frames.

 -Brad




Hello,

I'm running into this show-stopper.

I'm trying to re-create the fcurve of a relative value expression.
I create the expression, no problem at all.
Then I get its relative fcurve parameter, no problem.
Then I loop over a one dimensional array of time/value numbers, and
create the keyframes:


oFcurve.beginedit(); iLength = oFcurveKeys.length;

for( i = 0; i < iLength; i=i+2 ) {
 fTime = oFcurveKeys[i];
 fValue = oFcurveKeys[i+1];
 oFcurve.addkey( fTime, fValue, 0, true );
}

oFcurve.endedit();

(in this example I use a loop, but the SetKeys method gives the same
result I'm about to describe)


Now, I get all the keyframes. In this particular, I have two keyframes. The first one is all right. BUT the second one, for the life of me, refuses to be placed anywhere else than at frame 1.0.

If I then print its frame, it's the frame I specified (25, for
example). But in the animation editor, it's located at 1/1. Also, when
viewing its effect in viewport, I can *see* it's 1/1. Yet printing its
frame says 25.

ARGGGGHHHH


Any idea?


Thanks Bernard --- Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body: unsubscribe xsi


---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.