View Full Version : fbx import - getting take names?

10 October 2009, 12:19 PM
hey everyone
i'm writing a script to automate some basic fbx import stuff for our animators. the idea is that the user selects an fbx file, and can select what takes to import and it will batch the import process rather than having to manually import each desired take.

i can do multiple imports with a simple for loop using
for i=1 to (FBXImporterGetParam "TakeCount" fbxFile) do blahblah
but i want to populate a listbox with take names so that users can choose which takes to import. currently i don't see a way to access that data. is anyone aware of a way to extract take names based on the TakeCount index?


10 October 2009, 01:48 PM

Is the fbx binary or in ASCII format?
If it is ASCII, you can just get the take names by loading the xml in (I think fbx uses XML format) via dotNet.

10 October 2009, 02:36 PM
i could save as ascii.. it looks like it would be relatively easy to get the take names. i haven't used dotnet in maxscript yet though, looks like i have some learning to do if i want to try this route.

10 October 2009, 02:39 PM
Well, you can read the file with a fileStream too if you know where to search :)
But the XML implementation is quite simple and mainstream, just keep in mind, that arrays start with 0, not with in maxscript typical 1.

10 October 2009, 02:44 PM
something tells me that parsing a 4000 line file (and that's for 2 takes of about 50 frames each) through filestream would be relatively slow =)

CGTalk Moderation
10 October 2009, 02:44 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.