// =========================================================================== // 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. // =========================================================================== global proc initRenderSequence() { // In case Maya crashed unexpectedly during render sequence, we want // to get rid of the "OverrideFileOutputDirectory" optionVar on start // up. if(`optionVar -exists "OverrideFileOutputDirectory"`) { optionVar -remove "OverrideFileOutputDirectory"; } // Note: The SceneOpened event works on both file->new and file->open, // unlike NewSceneOpened which only works on file->new scriptJob -permanent -event "SceneOpened" "removeRenderSequenceAlternateOutputFileLocation"; } global proc removeRenderSequenceAlternateOutputFileLocation() { global string $gRenderSequenceOptionsWindow; // We want to clear out the RenderSequenceAlternateOutputFileLocation // optionVar when a scene is opened (file->new or file->open). if(`optionVar -exists "RenderSequenceAlternateOutputFileLocation"`) { optionVar -remove "RenderSequenceAlternateOutputFileLocation"; } // Reopen the render sequence window if it was already opened as the // alternate output file location may no longer be valid. if(`window -exists $gRenderSequenceOptionsWindow`) { deleteUI $gRenderSequenceOptionsWindow; renderSequenceOptionsWindow(); } }