[Closed] Merge Callback
Is there any way to get the filename of a file being merged in (via the regular merge dialog)? I’ve hunted the help files but couldn’t find anything about it. I see the merge callbacks, but not really any helpful info I can get from them. I would like to add a callback to get the filename of the file merged into the scene, so I can store that in the current maxfile. If I can’t do that then I would either have to A: Rewrite a merge dialog (easy enough) or B: Store a helper object in the maxfile with the info I need, and then read that info after the merge. (also easy enough) Any ideas!? Thanks!
doesn’t look like that’s info you can get directly
I’d just replace the “File > Merge…” option with a custom macroscript that uses getMAXOpenFileName and ‘mergeMAXFile “test.max” #prompt’; functionality will be exactly the same, but you get the benefit of being able to get at the filename being merged from getMAXOpenFileName.
If you want to get fancy, you can change the openfilename dialog’s title to “Merge File”, but eh.
This only applies for internal tools… not sure random people would be happy with the merge file menu option being replaced – even though it should be perfectly transparent %)
Thanks for the reply… it’s pretty much what I figured… already started too! Should be a quick fix. It is an internal tool… for asset tracking info. We can’t rely on the fact that people will always merge from our “other tool” for merging assets (which already does the info save), so I was looking for an easy way to check the merged file when doing it manually.
Now i just have to find an easy way overwrite everybody’s file menu. hrmmm…I think we might already have a way though…
It’s not too bad – check out this thread if you need it;
http://forums.cgsociety.org/showthread.php?t=684303
It doesn’t deal with deleting the existing option, but that relies on much the same methods (looking for the “Merge File…” entry, then deleting it).