Notifications
Clear all

[Closed] fbx import – getting take names?

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?

thanks!

4 Replies

Hi

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.

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.

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.

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 =)