// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== // Description: This procedure is called to stop all Ipr rendering. // global proc stopIprRendering(string $editor) { if (`about -batch`) { // There is no IPR during batch rendering. Nothing to be done. // return; } // Check which renderer is running IPR and stop its IPR rendering. // string $renderers[] = `renderer -query -namesOfAvailableRenderers`; int $i; for ($i = 0; $i < size($renderers); $i += 1) { string $renderer = $renderers[$i]; string $isRunningIprProc = `renderer -q -isRunningIprProcedure $renderer`; if ($isRunningIprProc !="" && eval($isRunningIprProc) ) { string $stopIprProc = `renderer -q -stopIprRenderProcedure $renderer`; if ($stopIprProc != "") { catch( `eval $stopIprProc` ); // Turn IPR tuning off. // global int $gIprTuningPaused; $gIprTuningPaused = false; // Issue a refresh so that the IPR related UIs get // updated. // if ($editor == "") { string $renderPanels[] = `getPanel -scriptType "renderWindowPanel"`; if( size($renderPanels) != 0 ) { $editor = $renderPanels[0]; } } if (`layout -exists $editor`) { refreshIprRelatedUI($editor); renderWindowEditor -e -resetRegion -caption "" $editor; renderWindowRefreshLayout($editor); } } } } // Resume material view renderer if it was suspended by IPR. // It is suspended when IPR start in renderWindowPanel.mel. global int $gMaterialViewSuspendedByIpr; if ($gMaterialViewSuspendedByIpr > 0) { $gMaterialViewSuspendedByIpr--; renderer -materialViewRendererSuspend false; } }