Parse contents of a max file through code.

Parse contents of a max file through code.

Anonymous
Not applicable
1,252 Views
2 Replies
Message 1 of 3

Parse contents of a max file through code.

Anonymous
Not applicable

I'm looking for a way to parse a max file and read its contents. I would like to read any data I want out of it, wihout needing to open it.

 

Is there a way to do this in the SDK? My research into this leads me down the road of parsing the binary, which i'm not even sure is a good Idea.

 

I was hoping the SDK opens some functionality up to developers to do this reasonably easily, but I have been unable to find anything thus far.

 

Any leads on this subject would be a great help.

 

Thanks.

1,253 Views
2 Replies
Replies (2)
Message 2 of 3

Swordslayer
Advisor
Advisor

Have a look at get/set_max_file_asset_metadata_cf(Value** arg_list, int count) functions in avg_dlx.cpp from the maxscript\mxsagni SDK samples folder. It's only asset metadata so it might not be what you are after, and even if it is all you need it's not perfect - for example render element assets are marked as bitmap type (just like texture bitmaps) and not render output.

Message 3 of 3

Anonymous
Not applicable

Thanks for the reply.

 

I don't think the asset metadata will give me what i want, though i will look in to it.

 

I should have specified earlier, what I really want to parse is the scene node tree, accessing object properties and custom attributes.

 

More and more it sounds like this is not easy to do.

 

Appreciate it, thanks.