Absolute Keyframe limit

Animation tools, character animation, non linear animation

Moderators: jesterKing, stiv

Post Reply
scourage
Posts: 92
Joined: Wed Jan 07, 2004 12:54 pm

Absolute Keyframe limit

Post by scourage » Wed Mar 31, 2004 12:11 pm

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....

Hos
Posts: 215
Joined: Wed Oct 16, 2002 12:06 am

Post by Hos » Thu Apr 01, 2004 6:18 am

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

zaz
Posts: 13
Joined: Mon Dec 01, 2003 5:44 am

Post by zaz » Thu Apr 01, 2004 2:47 pm

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.

scourage
Posts: 92
Joined: Wed Jan 07, 2004 12:54 pm

Post by scourage » Fri Apr 09, 2004 5:59 pm

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: Select all

		#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....

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests