Parse atom file data

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 10 October 2012   #1
Parse atom file data

Just dropping a line to see if anyone has any advice for parsing the data in the new Animation ATOM files. I remember seeing a video that says they were XML format files...but they don't look like it to me. Below is a test sample any suggestions for a parsing this data in Python would be appreciated.
PHP Code:
 atomVersion 1.0;
 
mayaVersion 2013 x64;
 
mayaSceneFile /dev/genericwork/work/fx/maya/scenes/Atom_testing_v001.mb;
 
timeUnit film;
 
linearUnit cm;
 
angularUnit deg;
 
startTime 1001;
 
endTime 1001;
 
dagNode {
   
directionalLight1 1 1;
   
anim rotate.rotateX rotateX 0;
   
animData {
     
input time;
     
output angular;
     
weighted 1;
     
preInfinity constant;
     
postInfinity constant;
     
keys {
       
1001 -32.618694 linear linear 1 1 0;
     }
   }
   
anim rotate.rotateY rotateY 1;
   
animData {
     
input time;
     
output angular;
     
weighted 1;
     
preInfinity constant;
     
postInfinity constant;
     
keys {
       
1001 18.212414 linear linear 1 1 0;
     }
   }
   
anim rotate.rotateZ rotateZ 2;
   
animData {
     
input time;
     
output angular;
     
weighted 1;
     
preInfinity constant;
     
postInfinity constant;
     
keys {
       
1001 -4.1932775 linear linear 1 1 0;
     } 
 
Old 10 October 2012   #2
There's a technical description of the ATOM file format in the Maya user guide:

http://download.autodesk.com/global...mber=d30e246726

Also there is an example atomImportExport plugin in the devkit that you can use as reference.

Last edited by Keilun : 10 October 2012 at 06:55 PM.
 
Old 10 October 2012   #3
Thanks dude,
Lots of good info in there.
There are so many data options that it definitely confirms my need for a parser if I wanted to do some serious tapping of that data for nefarious purposes.
 
Old 10 October 2012   #4
Don't know how far along you are with this but possibly this simple example might be good to take apart for some ideas, it's the 'Atom Info' script here - http://www.graphite9.com/MayaDownloads.html

It's MEL so a little clunky probably compared to Python for this kind of thing, but it works OK..

Cheers,
Brian
 
Old 10 October 2012   #5
Originally Posted by animatedfox: Thanks dude,
Lots of good info in there.
There are so many data options that it definitely confirms my need for a parser if I wanted to do some serious tapping of that data for nefarious purposes.


Yeah check the atomImportExport devkit plug-in. Although it is in C++, maybe you can pull some of the parsing logic from that. It's a pretty big plug-in to sift through though. Or better yet if you're comfortable with C++ just extend that for your needs.
 
Old 10 October 2012   #6
C++ is way out of my comfort zone...just started learning Python a couple weeks ago!
Horganovski, thanks for the script. (And the awesome ghosting tool!)
I am trying to use the data from an Atom file to pass light anim\settings into Houdini.
It is all there, just need a Python way to get it.
The logic of your approach helps though.
But many questions between now and success.
Thanks.
~Ben
 
Old 10 October 2012   #7
You're welcome, glad that helps.

Cheers,
Brian
 
Old 10 October 2012   #8
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 02:47 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.