Notifications
Clear all

[Closed] how to get node properties from external .max fie

Hi guys,

I’ve been watching this forum for quite a while, but it’s the first time I post something, so hello everybody!

I have a simple question and maybe what I’m looking for is not even possible via maxscript. I simply want to get list of all nodes/objects in given max file with their properties – without opening the file itself. So there is getMAXFileObjectNames, but that gives me only the names, not properties; getMAXFileAssetMetadata works only with external assets not scene objects, however provides some more information about the file.

Basically what I try to create is enhanced version of File>Merge operation. Somehow max gets some information about which object is a light or camera and displays parenting trees in that Merge dialog box. I want to get similar functionality in my script.

thanks for help!

Wojciech

6 Replies

Pretty sure you can’t actually do this. I know there was a thread a few months ago where someone did a very hacky workaround to this, but its not something you can do straight out of the box with standard script stuff if memory serves…

Matt, thank you very much for your reply.

So it is what I thought… Maybe it is possible to do it via SDK? Grab the whole Merge dialog box and tweak it? I don’t know if that makes sense, I only know the theory of SDK, never done anything with it.

If all else fails: what about simply writing out the necessary metadata to an accompanying file or a database on file save? Is that an option for what you’re doing?

Thanks Julius, that’s a good point.

I’m not sure if that would work in my case. Basically I’m trying to do ‘3D Assets Browser’. So I have it working pretty well together with my folder structure. It loads max files from specified directories in one listbox and then when I select file it lists objects in another listbox. From that second listbox I can select objects and merge them. What I want to do now is let’s say to be able to not import lights or cameras from other scenes.

Since 3d assets library is updated every day and those files are changing constantly I can’t keep a track of all metadata and export it to external files. Unless there is another script that does that every time someone saves a file. But feels like Merge dialog is a simpler solution.

A simple solution would be to give all your coworker a script that create a callback that write the metadata on each save.

callbacks.addScript #filePostSave "writeMetaData()" id:#MetaData

Don’t know if it could do the trick for you?

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

this is absolutely right solution. at least it’s how i would do it. but i would use #filePreSaveProcess callback for some reasons