Previous Thread  Next Thread

chat icon Absolute Keyframe limit

scourage

Posted: Wed Mar 31, 2004 11:11 am
Joined: 07 Jan 2004
Posts: 92
I'm trying to import keyframes from a MD2 (or MD3) file. Currently, when I load any more than 100 absolute keyframes through python they all pile up at the 100 mark. Is there anyway to keep this from happening, or resorting all my keyframes so that they are evenly spaced out? If this is a code issue, who should I drop a line to see about getting it resolved.

Cheers,

Bob
_________________
Halfway down the trail to hell....
Reply with quote


Hos

Posted: Thu Apr 01, 2004 5:18 am
Joined: 15 Oct 2002
Posts: 215
I'm not aware of this problem (haven't python-ed in a long while).

I'd maybe consult the python mailing list:

http://www.blender.org/mailman/listinfo/bf-python

Chris
Reply with quote


zaz

Posted: Thu Apr 01, 2004 1:47 pm
Joined: 01 Dec 2003
Posts: 12
I ran into this problem while working on the topix cloth python code. The only solution I found was to add the vertex keys as relative and then have the user change them to absolute after I added them.

Its not too difficult to do, although it isn't as good of a solution as I wanted. It was pretty simple to include a small set of instructions to guide the user to do the conversion from relative to absolute.

You can get a link to the topix cloth implementation from the news article here and grab the code to see how I handled it if that helps.
Reply with quote


scourage

Posted: Fri Apr 09, 2004 4:59 pm
Joined: 07 Jan 2004
Posts: 92
I found a work around for the 100 keyframe limit. I changed the speed ipo curve so that it was a straight line after I made it and the keyframes didn't all pile up at 100. Here's my code:

Code:

      #hack to evenly space out the vertex keyframes on the IPO chart   
      #it does-Happy Dance!
      if i==1:
         #after an IPO curve is created, make it a strait line so it
         #doesn't peak out inserted frames position at 100
         #get the IPO for the model, it's ugly, but it works
         ob=Blender.Ipo.Get("KeyIpo")   
         
         #get the curve for the IPO, again ugly
         ipo=ob.getCurves()

         #make the first (and only) curve straight
         ipo[0].setExtrapolation("Extrapolation")   
         
         #recalculate it
         ipo[0].Recalc()


Cheers,

Bob
_________________
Halfway down the trail to hell....
Reply with quote


 
Jump to:  
Powered by phpBB © 2001, 2005 phpBB Group