Page 1 of 1

AS-file change interpolation? [solved]

Posted: Fri Jun 05, 2009 11:45 am
by rylleman
I need to change all Point motion keys in an anme-file from smooth to linear.
I've poked around the file but couldn't find out what to do.

So, what should I look for and what should I change to change the interpolation? (There's a lot of layers so doing this manually is not an option.)

I need to change the smooth keys only, I've got cycle keys in the file as well and don't want to change those.

Posted: Fri Jun 05, 2009 12:38 pm
by slowtiger
Tricky one. Just created a file and then looked inside (put in some more blanks for readability):

Code: Select all

	### transforms
	translation
	[
		keys 9
			 0 1 0.1 0.5   0 0 0
			 1 1 0.1 0.5   0 0 0
			 6 0  -1  -1   0 0 0
			12 3  -1  -1   0 0 0
			18 1 0.1 0.5   0 0 0
			24 1 0.1 0.5   0.496348 -0.161689 0
			30 0  -1  -1   0.639236 -0.669318 0
			36 3  -1  -1   0.150408 -0.70692  0
			42 1 0.1 0.5  -0.454986 -0.251934 0
			48 4 0.1 0.5  -0.454986 -0.251934 0
			54 1 0.1 0.5  -0.454986 -0.251934 0
			60 4 0.5 0.25 -0.454986 -0.251934 0
			66 1 0.1 0.5  -0.454986 -0.251934 0
Comparing this with the open file in AS, I find that the second value in a row seems to be the interpolation method.
1 = smooth
0 = linear
3 = step
4 = noisy

So a keyframe parses like this:
1. = frame number
2. = interpolation method
3. = value for interpolation
4. = value for interpolation
5. = x position
6. = y
7. = z

I'm afraid you'd need to use RegExps to automatically find and replace all.

Posted: Fri Jun 05, 2009 3:28 pm
by rylleman
Thank you!

I figured it was the second number that needed a change. Didn't realise it was 3 and 4 as well.

Now I did the change in seconds using a search and replace in gedit.