// =========================================================================== // 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 sequencerPanelBarSection1Callback(string $btnName, string $editor, string $parent) { if (`clipEditor -q -exists $editor`) { setParent $parent; if ("CreateBtn" == $btnName) { sequencerCreateShot; doReload $editor; } else if ("FrameAllBtn" == $btnName) { FrameAll; } setParent ..; } } proc updateSection1(string $editor) { // Nothing to do } global proc sequencerPanelBarSection2Callback(string $btnName, string $editor, string $parent) { if (`clipEditor -q -exists $editor`) { setParent $parent; if ("TrimBeforeBtn" == $btnName) { shotTrim 0 {}; } else if ("TrimAfterBtn" == $btnName) { shotTrim 1 {}; } else if ("SplitBtn" == $btnName) { splitShots 0; } setParent ..; } } proc updateSection2(string $editor) { // Nothing to do } global proc sequencerPanelBarSection3Callback(string $btnName, string $editor, string $parent) { if (`clipEditor -q -exists $editor`) { setParent $parent; if ("RippleBtn" == $btnName) { int $ripple = 0; if (`optionVar -exists rippleEditModeEnabled`) { $ripple = `optionVar -q rippleEditModeEnabled`; } $ripple = !$ripple; optionVar -iv rippleEditModeEnabled $ripple; } else if ("ExpandBtn" == $btnName) { shotExpand 2 -1; } else if ("CompressBtn" == $btnName) { shotCompress 2 -1; } else if ("AlignBtn" == $btnName) { shotExpandAndCompress 2 -1; } else if ("SMLBtn" == $btnName) { // Cycle through small/med/large int $state = `clipEditor -q -cs $editor`; switch($state) { case 1: $state = 2; iconTextButton -e -image "smlMed.png" SMLBtn; break; case 3: $state = 1; iconTextButton -e -image "smlSmall.png" SMLBtn; break; case 2: default: $state = 3; iconTextButton -e -image "smlLarge.png" SMLBtn; break; } clipEditor -e -cs $state $editor; } setParent ..; } } proc updateSection3(string $editor) { int $ripple = 0; if (`optionVar -exists rippleEditModeEnabled`) { $ripple = `optionVar -q rippleEditModeEnabled`; } iconTextCheckBox -e -value $ripple RippleBtn; } global proc sequencerPanelBarSection4Callback(string $btnName, string $editor, string $parent) { if (`clipEditor -q -exists $editor`) { setParent $parent; if ("SwapShotLeftBtn" == $btnName) { swapShotLeft ""; } else if ("SwapShotRightBtn" == $btnName) { swapShotRight ""; } setParent ..; } } proc updateSection4(string $editor) { // Nothing to do } global proc updateSequenceEditorPanelBar(string $editor) { if (!`clipEditor -q -exists $editor`) return; string $parent = `clipEditor -q -panel $editor`; if (!`panel -q -exists $parent`) return; if ("" == `panel -q -control $parent`) return; setParent $parent; updateSection1($editor); updateSection2($editor); updateSection3($editor); updateSection4($editor); setParent ..; }