Exporting Key Frame Data

I’d like to export a scene object list with respective start and end key frame numbers that i can then copy or modify. Seems simple enough but i don't know where to start. Any ideas?

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Anubis's picture

start from the help

Well, everything is simple at all if you know it, but this description is still blured for me. You need only first and last key? on each animated property of all objects (and their modifiers)?

There is enough freelancers ready to write such scripts, but you said that you just looking from where to start, and I presume you want to write it alone, so... their is enough info in the help (check for controllers and keys), but lets append a few words though.

1st, here is some very basic example (just for illustration)

b = box name:"foo" -- create box
-- animate Z pos at time 10 and 30
with animate on at time 10 b.pos.z = 20
with animate on at time 30 b.pos.z = 60
 
$foo.position.z_position.isAnimated -- true
$foo.position.z_position.controller.supportsKeys -- true
 
-- put MAXKeyArray to variable:
keys = $foo.position.z_position.controller.keys
-->> #keys(0f, 10f, 30f)
-- or the same as above but more shorter:
keys = $foo[3][1][3].controller.keys
 
keys.count -- 3
keys[1] -- 1st key
keys[3] -- last key, or...
keys[keys.count]
 
c = b[3][1][3].controller
at time keys[3].time c.value -- 60.0
keys[3].value -- 60.0
keys[3].time -- 30f

For Excel you can format to CSV files. And for the keys itself need to save 2 things - their time and value (key.time , key.value). Also need to decide how will 'save' the controller. If you use the full path, like for example '$Foo.position.z_position.controller' then this data CAN be applied back to object named 'Foo' AND it should has the same controller. OR you should design your workflow on how to identify the controllers (to can apply data from one to another). And so on...

Shortly to say, similar scripts are asked many times and if they was really simple then there will been a tons of them online, but here are possible many scenarios.

Hope this helps anyway.

[EDIT]
Here is a screen shot of my simple KeyEditor script that I use to edit, save to or update from CSV my keys. Not batch optimized (edit one controller at a time) but fits my needs.

KeyEditor

AttachmentSize
keyeditor.png 3.32 KB

my recent MAXScripts RSS (archive here)

ST3D2020's picture

I could use your KeyEditor

I'm not sure I could write a script that could do all that I'd like...but I could use your KeyEditor script is it on the site?

Anubis's picture

ah, sorry

am not plane to share it, just post it to understand better what you ask.

my recent MAXScripts RSS (archive here)

ST3D2020's picture

It looks like what I'm

It looks like what I'm after.
Let me know if you'll have it available anytime. I am willing to pay for it or your services.

Anubis's picture

ok

check your mail box

my recent MAXScripts RSS (archive here)

Graph's picture

how about an example of the

how about an example of the formatting?

Raphael Steves

ST3D2020's picture

Wish lists

Something Excel would recognize or that I could cut and past showing:
Object or Group name
Keyframe in no.
Keyframe out no.

It would be nice if this list were an editable list in Max that would adjust existing animated object key frames in a table format.

Better that it could import a list of similar names and adjust the key frames of existing animated objects based on this imported list.

Even better that an imported list of objects with key frames creates dummy objects with start and end key frames using a simple modifier or visibility on and off at start and end numbers.

Imported and exported data could be interchangable.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.