Notifications
Clear all

[Closed] Callback before "Missing bitmaps" window

Hello!

I’m working on a script that should check for missing bitmap files and attempt to find them every time you open a max file.

Currently I’m using “#filePostOpen” and it’s working fine. Except for the fact that the “Missing Bitmap” window pops up first, and after closing it the script runs and finds the bitmaps. It’s a bit confusing for the user since he gets the message first, but then all the bitmaps are found by the script behind the scenes.

Is there anyway I could run the script while opening a max file, but before 3dsMax attempts to look for the bitmaps itself?

Cheers!

10 Replies
 lo1

have you tried with #filePostOpenProcess ?

If it doesn’t work, you can use dialogmonitorops and uiaccessor in an additional #filePreOpen callback, to automatically close the missing bitmaps dialog the second it appears.

Hey!
Thanks for the suggestion, I also tried with #filePostOpenProcess but 3dsMax still checks for the missing bitmaps first.

I cannot use dialogmonitorops to close the window since no script will be execute before that window appear… The script only runs after closing the window manually, which is exactly my problem. I need to run a script before the window appears, so I can’t even run a script that closes that window :C

I guess there is not much you can do, I would need a callback that notifies the script while opening a scene, after it gathers the bitmap paths but before it checks if they are infact there.

 lo1

I don’t understand why #filePREOpen would not work… doesn’t it run before the bitmap window??

I already tried it, seems that whatever script you want to run using filePreOpen will affect the “previous” scene rather than the scene you are about to open.

I guess you can do stuff like automatically save the file before opening a new max scene, so yeah, it seems like the callbacks are either for before or for after opening, but not during the opening.

:banghead:

However you can prevent the dialog from popping up with

[left]<bool>SetQuietMode <bool>
[/left]

aha!
thank you very much! I think I read something about -silent mode, but that was only for the command line, quiet mode will do just fine

Now I’ll just have to create a filePreOpen callback script that turns quiet mode on and another filePostOpen that grabs the missing files and turn quiet mode off again.

 lo1

while the quiet mode solution sounds better than mine, what I was actually proposing is that you use the preopen callback only to turn on dialogmonitorops, and still do all your file operations in the post open callback.

1 Reply
(@norman3d)
Joined: 11 months ago

Posts: 0

Oh so you are saying I could theoretically turn on dialogmonitorops before, then let it wait for the missing bitmap window to pop up and close it as soon as it finds it?
Yeah that could work too!

Thanks again to you both

 lo1

yes, exactly, but as I said, the quiet mode solution sounds much more elegant if it works.

But keep in mind to turn QuietMode off after you loaded your file
QuietMode turns of the querybox and messagebox functionality completely!