View Full Version : "on cancel" operation?
12-27-2010, 05:48 PM
I made a batch script but when you try and cancel it, it still runs through the "for each" operations until you cancel each one. Is there a way to say "on cancel" and then tell it to skip to the restore scene state portion of the script?
12-27-2010, 08:10 PM
Could you explain what type of batch script you mean?
Mayabatch? Mel? bat File? bash File? python script?
12-27-2010, 08:48 PM
here's the MEL code for the portion that handles the batch bake portion:
global proc daveBake420()
string $currentRenderName = `textFieldGrp -q -text -forceChangeCommand vrayFileNamePrefix`;
$mySelection = `ls -sl`;
for($each in $mySelection)
select -r $each;
textFieldGrp -e -text $each -forceChangeCommand vrayFileNamePrefix;
print ($each + "baked\n");
textFieldGrp -e -text "" -forceChangeCommand vrayFileNamePrefix;
textFieldGrp -e -text $currentRenderName -forceChangeCommand vrayFileNamePrefix;
12-27-2010, 08:49 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.