// =========================================================================== // 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 initPanels () { // Declare global variables being used. // global string $gMainPane; global string $gNewScenePanelConfig; global int $gUseNewScenePanelConfig; global int $gUseScenePanelConfig; global int $gUseSaveScenePanelConfig; global int $gIsMarkingMenuOn; global int $gUseMenusInPanels; string $retStr; $gUseNewScenePanelConfig = `optionVar -q "useNewScenePanelConfig"`; $gUseScenePanelConfig = `optionVar -q "useScenePanelConfig"`; $gUseSaveScenePanelConfig = `optionVar -q "useSaveScenePanelConfig"`; // Set the ui config state in the scene. file -uiConfiguration $gUseSaveScenePanelConfig; // do we want menus in the panels? // $gUseMenusInPanels = `optionVar -q allowMenusInPanels`; $gIsMarkingMenuOn = `optionVar -q "isMarkingMenuOn"`; string $currentLayout = localizedPanelLabel("Current Layout"); string $singlePerspView = localizedPanelLabel("Single Perspective View"); string $frontPerspView = localizedPanelLabel("Front/Persp"); string $hypershadePersp = localizedPanelLabel("Hypershade/Persp"); string $fourView = localizedPanelLabel("Four View"); string $perspHypergraph = localizedPanelLabel("Persp/Hypergraph"); string $perspGraphHypergraph = localizedPanelLabel("Persp/Graph/Hypergraph"); string $hypershadeRenderPersp = localizedPanelLabel("Hypershade/Render/Persp"); string $hypershadeOutlinerPersp = localizedPanelLabel("Hypershade/Outliner/Persp"); string $perspGraphOutliner = localizedPanelLabel("Persp/Graph/Outliner"); string $webBrowserPersp = localizedPanelLabel("Web Browser/Persp"); string $perspSequence = localizedPanelLabel("Persp/Camera Sequencer"); string $perspTrax = localizedPanelLabel("Persp/Trax"); string $perspTraxOutliner = localizedPanelLabel("Persp/Trax/Outliner"); string $perspGraph = localizedPanelLabel("Persp/Graph"); string $perspRelationshipEditor = localizedPanelLabel("Persp/Relationship Editor"); string $perspUVTextureEditor = localizedPanelLabel("Persp/UV Editor"); string $hypershade = localizedPanelLabel("Hypershade"); string $renderView = localizedPanelLabel("Render View"); string $perspView = localizedPanelLabel("Persp View"); string $scriptEditorPersp = localizedPanelLabel("Script Editor/Persp"); string $stereoPersp = localizedPanelLabel("Stereo Persp"); string $stereoPerspOutliner = localizedPanelLabel("Stereo Persp/Outliner"); string $nodeEditorView = localizedPanelLabel("Node Editor"); // Commands to return UI name of default panel arrangments // string $hypershadeCmd = "(localizedPanelLabel(\"Hypershade\"))"; string $renderViewCmd = "(localizedPanelLabel(\"Render View\"))"; string $perspViewCmd = "(localizedPanelLabel(\"Persp View\"))"; string $perspectiveCmd = "(localizedPanelLabel(\"Perspective\"))"; string $topViewCmd = "(localizedPanelLabel(\"Top View\"))"; string $sideViewCmd = "(localizedPanelLabel(\"Side View\"))"; string $frontViewCmd = "(localizedPanelLabel(\"Front View\"))"; string $hypergraphCmd = "(localizedPanelLabel(\"Hypergraph\"))"; string $graphEditorCmd = "(localizedPanelLabel(\"Graph Editor\"))"; string $outlinerCmd = "(localizedPanelLabel(\"Outliner\"))"; string $sequenceEditorCmd = "(localizedPanelLabel(\"Camera Sequencer\"))"; string $traxEditorCmd = "(localizedPanelLabel(\"Trax Editor\"))"; string $relationshipEditorCmd = "(localizedPanelLabel(\"Relationship Editor\"))"; string $UVTextureEditorCmd = "(localizedPanelLabel(\"UV Editor\"))"; string $scriptEditorCmd = "(localizedPanelLabel(\"Script Editor\"))"; string $nodeEditorCmd = "(localizedPanelLabel(\"Node Editor\"))"; $retStr = `getPanel -configWithLabel $currentLayout`; if ("" == $retStr) { panelConfiguration -label $currentLayout -sc false -cfs "paneLayout -e -cn \"single\" $gMainPane" -ap false $perspView "modelPanel" ("{global int $gUseMenusInPanels;\ modelPanel -mbv $gUseMenusInPanels " + "-unParent -label " + $perspectiveCmd + " -cam `findStartUpCamera persp`;}") ("modelPanel -e -label " + $perspectiveCmd + " -cam `findStartUpCamera persp` $panelName"); panelConfiguration -label $singlePerspView -sc false -cfs "paneLayout -e -cn \"single\" $gMainPane" -ap true $perspView "modelPanel" ("{global int $gUseMenusInPanels;\ modelPanel -mbv $gUseMenusInPanels " + "-unParent -label " + $perspectiveCmd + " -cam `findStartUpCamera persp`;}" ) ("modelPanel -e -label " + $perspViewCmd + " -cam `findStartUpCamera persp` $panelName"); panelConfiguration -label $fourView -sc false -cfs "paneLayout -e -cn \"quad\" $gMainPane" -ap true (localizedPanelLabel("Top View")) "modelPanel" ("{global int $gUseMenusInPanels;\ modelPanel -mbv $gUseMenusInPanels " + "-unParent -label " + $topViewCmd + " -cam `findStartUpCamera top`;}" ) ("modelPanel -e -label " + $topViewCmd + " -cam `findStartUpCamera top` $panelName") -ap true $perspView "modelPanel" ("{global int $gUseMenusInPanels;\ modelPanel -mbv $gUseMenusInPanels " + "-unParent -label " + $perspectiveCmd + " -cam `findStartUpCamera persp`;}" ) ("modelPanel -e -label " + $perspViewCmd + " -cam `findStartUpCamera persp` $panelName") -ap true (localizedPanelLabel("Side View")) "modelPanel" ("{global int $gUseMenusInPanels;\ modelPanel -mbv $gUseMenusInPanels " + "-unParent -label " + $sideViewCmd + " -cam `findStartUpCamera side`;}" ) ("modelPanel -e -label " + $sideViewCmd + " -cam `findStartUpCamera side` $panelName") -ap true (localizedPanelLabel("Front View")) "modelPanel" ("{global int $gUseMenusInPanels;\ modelPanel -mbv $gUseMenusInPanels " + "-unParent -label " + $frontViewCmd + " -cam `findStartUpCamera front`;}" ) ("modelPanel -e -label " + $frontViewCmd + " -cam `findStartUpCamera front` $panelName"); panelConfiguration -label $frontPerspView -sc false -cfs "paneLayout -e -cn \"vertical2\" $gMainPane" -ap true (localizedPanelLabel("Front View")) "modelPanel" ("{global int $gUseMenusInPanels;\ modelPanel -mbv $gUseMenusInPanels " + "-unParent -label " + $frontViewCmd + " -cam `findStartUpCamera front`;}" ) ("modelPanel -e -label " + $frontViewCmd + " -cam `findStartUpCamera front` $panelName") -ap true $perspView "modelPanel" ("{global int $gUseMenusInPanels;\ modelPanel -mbv $gUseMenusInPanels " + "-unParent -label " + $perspectiveCmd + " -cam `findStartUpCamera persp`;}" ) ("modelPanel -e -label " + $perspViewCmd + " -cam `findStartUpCamera persp` $panelName"); panelConfiguration -label $perspHypergraph //-defaultImage "defaultTwoStackedLayout.png" //-image "" -sc false -configString "global string $gMainPane; paneLayout -e -cn \"horizontal2\" -ps 1 100 64 -ps 2 100 36 $gMainPane;" -ap true $perspView "modelPanel" ("{global int $gUseMenusInPanels;\ modelPanel -mbv $gUseMenusInPanels " + "-unParent -label " + $perspectiveCmd + " -cam `findStartUpCamera persp`;}" ) ("modelPanel -e -label " + $perspViewCmd + " -cam `findStartUpCamera persp` $panelName") -ap false (localizedPanelLabel("Hypergraph")) "hyperGraphPanel" ("{global int $gUseMenusInPanels;\ scriptedPanel -mbv $gUseMenusInPanels -type hyperGraphPanel " + "-unParent -label " + $hypergraphCmd + ";}") ("scriptedPanel -e -label " + $hypergraphCmd + " $panelName"); panelConfiguration -label $perspGraphHypergraph -sc false -cfs "paneLayout -e -cn \"top3\" $gMainPane" -ap true $perspView "modelPanel" ("{global int $gUseMenusInPanels;\ modelPanel -mbv $gUseMenusInPanels " + "-unParent -label " + $perspectiveCmd + " -cam `findStartUpCamera persp`;}" ) ("modelPanel -e -label " + $perspViewCmd + " -cam `findStartUpCamera persp` $panelName") -ap true (localizedPanelLabel("Hypergraph")) "hyperGraphPanel" ("{global int $gUseMenusInPanels;\ scriptedPanel -mbv $gUseMenusInPanels -type hyperGraphPanel " + "-unParent -label " + $hypergraphCmd + ";}") ("scriptedPanel -e -label " + $hypergraphCmd + " $panelName") -ap true (localizedPanelLabel("Graph Editor")) "graphEditorPanel" ("{global int $gUseMenusInPanels;\ scriptedPanel -mbv $gUseMenusInPanels -type graphEditor " + "-unParent -label " + $graphEditorCmd + ";}") ("scriptedPanel -e -label " + $graphEditorCmd + " $panelName"); // Hypershade stuff panelConfiguration -label $hypershadeRenderPersp -sceneConfig false -configString ("paneLayout " + "-edit " + "-configuration \"bottom3\" " + "-paneSize 1 100 55 " + "-paneSize 2 50 45 " + "-paneSize 3 50 45 " + "$gMainPane;") -addPanel true $hypershade "scriptedPanel" ("{global int $gUseMenusInPanels;\ scriptedPanel -mbv $gUseMenusInPanels\ -type hyperShadePanel " + "-unParent -label " + $hypershadeCmd + ";}" ) ("scriptedPanel -edit -label " + $hypershadeCmd + " $panelName") -addPanel false $perspView "modelPanel" ("{global int $gUseMenusInPanels;\ modelPanel -mbv $gUseMenusInPanels " + "-unParent -label " + $perspViewCmd + "\ -cam `findStartUpCamera persp`;}" ) ("modelPanel -edit -label " + $perspViewCmd + "\ -cam `findStartUpCamera persp` $panelName") -addPanel false $renderView "scriptedPanel" ("{global int $gUseMenusInPanels;\ scriptedPanel -mbv $gUseMenusInPanels\ -type renderWindowPanel " + "-unParent -label " + $renderViewCmd + ";}" ) ("scriptedPanel -edit -label " + $renderViewCmd + " $panelName"); panelConfiguration -label $hypershadeOutlinerPersp -sceneConfig false -configString ("paneLayout " + "-edit " + "-configuration \"bottom3\" " + "-paneSize 1 100 55 " + "-paneSize 2 50 45 " + "-paneSize 3 50 45 " + "$gMainPane;") -addPanel true $hypershade "scriptedPanel" ("{global int $gUseMenusInPanels;\ scriptedPanel -mbv $gUseMenusInPanels -type hyperShadePanel " + "-unParent -label " + $hypershadeCmd + ";}" ) ("scriptedPanel -edit -label " + $hypershadeCmd + " $panelName") -addPanel false $perspView "modelPanel" ("{global int $gUseMenusInPanels;\ modelPanel -mbv $gUseMenusInPanels " + "-unParent -label " + $perspViewCmd + " -cam `findStartUpCamera persp`;}" ) ("modelPanel -edit -label " + $perspViewCmd + " -cam `findStartUpCamera persp` $panelName") -addPanel false (localizedPanelLabel("Outliner")) "outlinerPanel" ("{global int $gUseMenusInPanels; " + "$panelName = `outlinerPanel -mbv $gUseMenusInPanels -unParent -label " + $outlinerCmd + "`;\ outlinerEditor -e -highlightActive true $panelName;}") ("outlinerPanel -edit -label " + $outlinerCmd + " $panelName"); panelConfiguration -label $hypershadePersp -sceneConfig false -configString ("paneLayout " + "-edit " + "-configuration \"vertical2\" " + "-ps 1 50 100 " + "-ps 2 50 100 " + "$gMainPane;") -addPanel true $hypershade "scriptedPanel" ("{global int $gUseMenusInPanels;\ scriptedPanel -mbv $gUseMenusInPanels -type hyperShadePanel " + "-unParent -label " + $hypershadeCmd + ";}" ) ("scriptedPanel -edit -label " + $hypershadeCmd + " $panelName") -addPanel false $perspView "modelPanel" ("{global int $gUseMenusInPanels;\ modelPanel -mbv $gUseMenusInPanels " + "-unParent -label " + $perspViewCmd + " -cam `findStartUpCamera persp`;}" ) ("modelPanel -edit -label " + $perspViewCmd + " -cam `findStartUpCamera persp` $panelName"); panelConfiguration -label $perspGraphOutliner -sc false -configString "paneLayout -e -cn \"bottom3\" -ps 1 100 55 -ps 2 78 45 -ps 3 22 45 $gMainPane;" -ap true $perspView "modelPanel" ("{global int $gUseMenusInPanels;\ modelPanel -mbv $gUseMenusInPanels " + "-unParent -label " + $perspViewCmd + " -cam `findStartUpCamera persp`;}" ) ("modelPanel -edit -label " + $perspViewCmd + " -cam `findStartUpCamera persp` $panelName") -ap false (localizedPanelLabel("Graph Editor")) "scriptedPanel" ("{global int $gUseMenusInPanels;\ scriptedPanel -mbv $gUseMenusInPanels -type graphEditor " + "-unParent -label " + $graphEditorCmd + ";}") ("scriptedPanel -edit -label " + $graphEditorCmd + " $panelName") -ap false (localizedPanelLabel("Outliner")) "outlinerPanel" ("{global int $gUseMenusInPanels; " + "$panelName = `outlinerPanel -mbv $gUseMenusInPanels -unParent -label " + $outlinerCmd + "`;\ outlinerEditor -e -highlightActive true $panelName;}") ("outlinerPanel -edit -label " + $outlinerCmd + " $panelName"); panelConfiguration -label $perspTrax //-defaultImage "" //-image "" -sc false -configString "paneLayout -e -cn \"horizontal2\" -ps 1 100 64 -ps 2 100 36 $gMainPane;" -ap true $perspView "modelPanel" ("{global int $gUseMenusInPanels;\ modelPanel -mbv $gUseMenusInPanels " + "-unParent -label " + $perspViewCmd + " -cam `findStartUpCamera persp`;}" ) ("modelPanel -edit -label " + $perspViewCmd + " -cam `findStartUpCamera persp` $panelName") -ap false (localizedPanelLabel("Trax Editor")) "scriptedPanel" ("{global int $gUseMenusInPanels;\ scriptedPanel -mbv $gUseMenusInPanels -type clipEditorPanel " + "-unParent -label " + $traxEditorCmd + ";}") ("scriptedPanel -edit -label " + $traxEditorCmd + " $panelName"); panelConfiguration -label $perspSequence //-defaultImage "" //-image "" -sc false -configString "paneLayout -e -cn \"horizontal2\" -ps 1 100 64 -ps 2 100 36 $gMainPane;" -ap true $perspView "modelPanel" ("{global int $gUseMenusInPanels;\ modelPanel -mbv $gUseMenusInPanels " + "-unParent -label " + $perspViewCmd + " -cam `findStartUpCamera persp`;}" ) ("modelPanel -edit -label " + $perspViewCmd + " -cam `findStartUpCamera persp` $panelName") -ap false (localizedPanelLabel("Camera Sequencer")) "scriptedPanel" ("{global int $gUseMenusInPanels;\ scriptedPanel -mbv $gUseMenusInPanels -type sequenceEditorPanel " + "-unParent -label " + $sequenceEditorCmd + ";}") ("scriptedPanel -edit -label " + $sequenceEditorCmd + " $panelName"); panelConfiguration -label $perspTraxOutliner -sc false -configString "paneLayout -e -cn \"bottom3\" -ps 1 100 55 -ps 2 78 45 -ps 3 22 45 $gMainPane;" -ap true $perspView "modelPanel" ("{global int $gUseMenusInPanels;\ modelPanel -mbv $gUseMenusInPanels " + "-unParent -label " + $perspViewCmd + " -cam `findStartUpCamera persp`;}" ) ("modelPanel -edit -label " + $perspViewCmd + " -cam `findStartUpCamera persp` $panelName") -ap false (localizedPanelLabel("Trax Editor")) "scriptedPanel" ("{global int $gUseMenusInPanels;\ scriptedPanel -mbv $gUseMenusInPanels -type clipEditorPanel " + "-unParent -label " + $traxEditorCmd + ";}") ("scriptedPanel -edit -label " + $traxEditorCmd + " $panelName") -ap false (localizedPanelLabel("Outliner")) "outlinerPanel" ("{global int $gUseMenusInPanels; " + "$panelName = `outlinerPanel -mbv $gUseMenusInPanels -unParent -label " + $outlinerCmd + "`;\ outlinerEditor -e -highlightActive true $panelName;}") ("outlinerPanel -edit -label " + $outlinerCmd + " $panelName"); panelConfiguration -label $perspGraph -sc false -configString "paneLayout -e -cn \"horizontal2\" -ps 1 100 46 -ps 2 100 54 $gMainPane;" -ap true $perspView "modelPanel" ("{global int $gUseMenusInPanels;\ modelPanel -mbv $gUseMenusInPanels " + "-unParent -label " + $perspViewCmd + " -cam `findStartUpCamera persp`;}" ) ("modelPanel -edit -label " + $perspViewCmd + " -cam `findStartUpCamera persp` $panelName") -ap false (localizedPanelLabel("Graph Editor")) "scriptedPanel" ("{global int $gUseMenusInPanels;\ scriptedPanel -mbv $gUseMenusInPanels -type graphEditor " + "-unParent -label " + $graphEditorCmd + ";}") ("scriptedPanel -edit -label " + $graphEditorCmd + " $panelName"); panelConfiguration -label $perspRelationshipEditor -sc false -configString "paneLayout -e -cn \"horizontal2\" -ps 1 100 61 -ps 2 100 39 $gMainPane;" -ap true $perspView "modelPanel" ("{global int $gUseMenusInPanels;\ modelPanel -mbv $gUseMenusInPanels " + "-unParent -label " + $perspViewCmd + " -cam `findStartUpCamera persp`;}" ) ("modelPanel -edit -label " + $perspViewCmd + " -cam `findStartUpCamera persp` $panelName") -ap false (localizedPanelLabel("Relationship Editor")) "scriptedPanel" ("{global int $gUseMenusInPanels;\ scriptedPanel -mbv $gUseMenusInPanels -type relationshipPanel " + "-unParent -label " + $relationshipEditorCmd + ";}") ("scriptedPanel -edit -label " + $relationshipEditorCmd + " $panelName"); panelConfiguration -label $perspUVTextureEditor -sc false -configString "paneLayout -e -cn \"vertical2\" -ps 1 50 100 -ps 2 50 100 $gMainPane;" -ap true $perspView "modelPanel" ("{global int $gUseMenusInPanels;\ modelPanel -mbv $gUseMenusInPanels " + "-unParent -label " + $perspViewCmd + " -cam `findStartUpCamera persp`;}" ) ("modelPanel -edit -label " + $perspViewCmd + " -cam `findStartUpCamera persp` $panelName") -ap false (localizedPanelLabel("UV Editor")) "scriptedPanel " ("global int $gUseMenusInPanels; $panelName = `scriptedPanel -unParent -type \"polyTexturePlacementPanel\" -label " + $UVTextureEditorCmd + " -mbv $gUseMenusInPanels `") ("global int $gUseMenusInPanels; scriptedPanel -edit -label " + $UVTextureEditorCmd + " -mbv $gUseMenusInPanels $panelName"); panelConfiguration -label $scriptEditorPersp -sc false -configString "paneLayout -e -cn \"vertical2\" -ps 1 50 100 -ps 2 50 100 $gMainPane;" -ap false (localizedPanelLabel("Script Editor")) "scriptedPanel " ("global int $gUseMenusInPanels; $panelName = `scriptedPanel -unParent -type \"scriptEditorPanel\" -label " + $scriptEditorCmd + " -mbv $gUseMenusInPanels `") ("global int $gUseMenusInPanels; scriptedPanel -edit -label " + $scriptEditorCmd + " -mbv $gUseMenusInPanels $panelName") -ap true $perspView "modelPanel" ("{global int $gUseMenusInPanels;\ modelPanel -mbv $gUseMenusInPanels " + "-unParent -label " + $perspViewCmd + " -cam `findStartUpCamera persp`;}" ) ("modelPanel -edit -label " + $perspViewCmd + " -cam `findStartUpCamera persp` $panelName"); optionVar -sv "newScenePanelConfiguration" $singlePerspView; } // Make a list of the layout names. // Check to see if the Hypershade/Render/Persp Vertical" layout // already exists. // string $configurationArray[] = `getPanel -allConfigs`; string $configuration; int $foundLayout = 0; string $HypershadeRenderPerspVertical = localizedPanelLabel("Hypershade/Render/Persp Vertical"); for ($configuration in $configurationArray) { if (`panelConfiguration -q -label $configuration` == $HypershadeRenderPerspVertical) { $foundLayout = 1; break; } } if (!$foundLayout) { panelConfiguration -label $HypershadeRenderPerspVertical -sceneConfig false -configString ("paneLayout " + "-edit " + "-configuration \"right3\" " + "-paneSize 1 50 100 " + "-paneSize 2 50 50 " + "-paneSize 3 50 50 " + "$gMainPane;") -addPanel true $hypershade "scriptedPanel" ("{global int $gUseMenusInPanels;\ scriptedPanel -mbv $gUseMenusInPanels\ -type hyperShadePanel " + "-unParent -label " + $hypershadeCmd + ";}" ) ("scriptedPanel -edit -label " + $hypershadeCmd + " $panelName") -addPanel false $renderView "scriptedPanel" ("{global int $gUseMenusInPanels;\ scriptedPanel -mbv $gUseMenusInPanels\ -type renderWindowPanel " + "-unParent -label " + $renderViewCmd + ";}" ) ("scriptedPanel -edit -label " + $renderViewCmd + " $panelName") -addPanel false $perspView "modelPanel" ("{global int $gUseMenusInPanels;\ modelPanel -mbv $gUseMenusInPanels " + "-unParent -label " + $perspViewCmd + "\ -cam `findStartUpCamera persp`;}" ) ("modelPanel -edit -label " + $perspViewCmd + "\ -cam `findStartUpCamera persp` $panelName"); } // At Maya 7.0, we decided that we want vertical split for // the existing Hypershade/Persp layout. If this layout was // created by the user's old pref, then we need to change // the user's old horizontal split configuration to a // vertical split. // for ($configuration in $configurationArray) { // Search for the configuration which corresponds to the // layout name. // if (`panelConfiguration -q -label $configuration` == $hypershadePersp) { break; } } panelConfiguration -label $hypershadePersp -edit -configString ("paneLayout " + "-edit " + "-configuration \"vertical2\" " + "-ps 1 50 100 " + "-ps 2 50 100 " + "$gMainPane;") $configuration; // Set up the default images for the panel configurations. You're // probably expecting these flags to be set above when the panel // configuration is defined. The problem is the above panel // conifuration initialization only occurs when there are no // user preferences. The panel configurations in user preferences // won't have the default images set. // // The following code simply goes through all the panel // configurations (regardless of where they were created, ie // here or in userPrefs.mel) and assigns the appropriate default // image. // // If you add a new panel configuration be sure to add the // image for it below. // string $label, $image, $defaultImage; string $panelConfiguration, $panelConfigurationArray[]; $panelConfigurationArray = `getPanel -allConfigs`; for ($panelConfiguration in $panelConfigurationArray) { $label = `panelConfiguration -query -label $panelConfiguration`; if($label == $singlePerspView) { $image = "singlePerspLayout.png"; } else if($label == $fourView) { $image = "fourViewLayout.png"; } else if($label == $frontPerspView) { $image = "twoViewVerticalLayout.png"; } else if($label == $perspHypergraph) { $image = "perspHypergraphLayout.png"; } else if($label == $perspGraphHypergraph) { $image = "perspGraphHypergraphLayout.png"; } else if($label == $hypershadeRenderPersp) { $image = "hypershadeRenderPerspLayout.png"; } else if($label == $HypershadeRenderPerspVertical) { $image = "hypershadeRenderPerspVerticalLayout.png"; } else if($label == $hypershadeOutlinerPersp) { $image = "hypershadeOutlinerPerspLayout.png"; } else if($label == $hypershadePersp) { $image = "hypershadePerspLayout.png"; } else if($label == $perspGraphOutliner) { $image = "perspGraphOutlinerLayout.png"; } else if($label == $webBrowserPersp) { $image = "perspBrowserLayout.png"; } else if($label == $perspTrax) { $image = "perspTraxLayout.png"; } else if($label == $perspSequence) { $image = "perspTraxLayout.png"; } else if($label == $perspTraxOutliner) { $image = "perspTraxOutlinerLayout.png"; } else if($label == $perspGraph) { $image = "perspGraphLayout.png"; } else if($label == $perspRelationshipEditor) { $image = "perspRelationshipEditorLayout.png"; } else if($label == $perspUVTextureEditor) { $image = "perspTextureLayout.png"; } else if($label == $scriptEditorPersp) { $image = "scriptEdPersp.png"; } else if($label == $stereoPersp) { $image = "stereoPersp.png"; } else if($label == $stereoPerspOutliner) { $image = "stereoPerspOutliner.png"; } else { $image = "vacantCell.png"; } $defaultImage = `panelConfiguration -query -defaultImage $panelConfiguration`; if ("" == $defaultImage && ($currentLayout != $label)) { panelConfiguration -edit -defaultImage $image $panelConfiguration; } } $gNewScenePanelConfig = `optionVar -q "newScenePanelConfiguration"`; // // Define scripted panel types. // source initScriptedPanels; // // Invoke any user supplied code. This callback is published and // needs to remain consistent in future versions of Maya. // if (exists ("initPanelsUserCallback") ) { // Use catchQuiet in case no callback is supplied, we don't want that to // show an error catchQuiet( eval("source \"initPanelsUserCallback\"") ); } // Create panel history object. // - This should be the last thing done in this proc. // panelHistory -targetPane $gMainPane mainPanelHistory; }