PDA

View Full Version : Newbee Question about Data Import



wrkoons
10-22-2009, 09:20 PM
I'm very new to LW and LScript. I have a requirement to read the TIME, VALUE information in a MS Excel file or a final .txt file. I would like to be able to create a null with a channel of keyframes from the file data.

I'm not sure where to begin on this. Any help I can get to enable me to import keyframes and data into a channel would be a great help.

Thanks

Blypht
11-07-2009, 04:45 PM
I've never tried attaching a file to a reply, so I hope this works.

Here is an LScript I wrote some time ago that imports channel info from a text file (I cringe looking at it now -- it's more complex than it needed to be).

Importing from an Excel spreadsheet will be a good deal more difficult unless you can somehow use the MS SDK for Excel (I don't know if that's possible).

Anyway, look particularly at the "generic" function and the use of "filImport" for file handling info.

Then look at the "CreateKeys" function.

Hopefully that'll give you some insights. Good luck.

wrkoons
11-10-2009, 08:08 AM
Thanks for the info. I've looked at the file and there's a lot going on there. I'll digest what you have and see how it works or what portion of it will be useful for me.

Thanks,

wrkoons

UnCommonGrafx
11-10-2009, 09:25 AM
Old Skool:
Look at a scene file to see how motions are handled. In the Excel file, make it as close as possible; export as text and massage as needed.
I haven't looked at the import file share but big thanks for the lesson.