PDA

View Full Version : Callback before "Missing bitmaps" window


Norman3D
11-22-2010, 04:19 PM
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!

lo
11-23-2010, 07:19 AM
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.

Norman3D
11-23-2010, 12:27 PM
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.

lo
11-23-2010, 12:56 PM
I don't understand why #filePREOpen would not work... doesn't it run before the bitmap window??

Norman3D
11-23-2010, 02:13 PM
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:

tarcus
11-23-2010, 02:13 PM
However you can prevent the dialog from popping up with

<bool>SetQuietMode <bool>

Norman3D
11-23-2010, 02:54 PM
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.

:beer:

lo
11-23-2010, 04:35 PM
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.

Norman3D
11-23-2010, 06:26 PM
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.

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

lo
11-23-2010, 06:28 PM
yes, exactly, but as I said, the quiet mode solution sounds much more elegant if it works.

tarcus
11-25-2010, 09:14 AM
But keep in mind to turn QuietMode off after you loaded your file :)
QuietMode turns of the querybox and messagebox functionality completely!

CGTalk Moderation
11-25-2010, 09:15 AM
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.