PDA

View Full Version : confirmDialog before Batch render


Mules
01-09-2013, 10:10 AM
I'm trying to create a very basic mel script that displays (only once) a warning dialog before batch render is started from Maya. The mel script (a simple confirmDialog command) to create the dialog I already have, but when entering this in the pre render MEL input boxes, the script doesn't seem to be executed, or does not show the dialog box inside Maya, before the batch render is started from within Maya. When doing a render in the render view, the script works and the dialog is shown inside Maya.

Is this because batch render is an external program ?

Is it possible to create a basic confirm dialog, shown inside Maya, before starting a batch render inside Maya ?

Tnx,
M.

berniebernie
01-09-2013, 12:17 PM
I'm trying to create a very basic mel script that displays (only once) a warning dialog before batch render is started from Maya. The mel script (a simple confirmDialog command) to create the dialog I already have, but when entering this in the pre render MEL input boxes, the script doesn't seem to be executed, or does not show the dialog box inside Maya, before the batch render is started from within Maya. When doing a render in the render view, the script works and the dialog is shown inside Maya.

Is this because batch render is an external program ?

Is it possible to create a basic confirm dialog, shown inside Maya, before starting a batch render inside Maya ?

Tnx,
M.

as far as I understand you're using the maya UI to confirm/deny the process, but when doing a render>batch render maya starts a new UI-deprived version of mayabatch.exe. So you should either hijack the render>batch render command (ie change the menu item mel) but that's not very deployable on other machines; or perhaps there is a shell solution (using a system command) but I'm not even sure that might work.

Mules
01-09-2013, 02:00 PM
Thanks for the reply. I created a simple solution that works for me. I already had the
bath render command in a shelf, I just added the dialog command before the batch render command and that fixed it for me. :-)

greets,
M.

CGTalk Moderation
01-09-2013, 02:00 PM
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.