// =========================================================================== // 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. // =========================================================================== // // // Creation Date: Date // // Description: // // description // ////////////////////////////////////////////////////////////////////// // // Procedure Name: // NAME // // Description: // description // // Input Arguments: // $argument - description // // Return Value: // None. // proc createUpdateShadowMapsWindow(string $callback) { window -title (uiRes("m_updateShadowMaps.kUpdatedShadowMaps")) updateShadowMapsWindow; formLayout mainForm; formLayout textForm; text -label (uiRes("m_updateShadowMaps.kSelectLights")) text; formLayout -edit -attachForm "text" "left" 5 -attachForm "text" "right" 5 -attachForm "text" "top" 5 -attachForm "text" "bottom" 5 textForm; setParent ..; formLayout listBoxForm; textScrollList -allowMultiSelection true listBox; string $lights[] = `ls -lights`; int $i; for ($i = 0; $i < size($lights); $i++) { textScrollList -edit -append $lights[$i] listBox; } formLayout -edit -attachForm "listBox" "left" 5 -attachForm "listBox" "right" 5 -attachForm "listBox" "top" 5 -attachForm "listBox" "bottom" 5 listBoxForm; setParent ..; formLayout -numberOfDivisions 2 buttonForm; button -label (uiRes("m_updateShadowMaps.kOK")) -command ($callback + " updateShadowMapsWindow") buttonOk; button -label (uiRes("m_updateShadowMaps.kCancel")) -command ("deleteUI updateShadowMapsWindow") buttonCancel; formLayout -edit -attachForm "buttonOk" "left" 5 -attachPosition "buttonOk" "right" 5 1 -attachForm "buttonOk" "top" 5 -attachForm "buttonOk" "bottom" 5 -attachPosition "buttonCancel" "left" 5 1 -attachForm "buttonCancel" "right" 5 -attachForm "buttonCancel" "top" 5 -attachForm "buttonCancel" "bottom" 5 buttonForm; setParent ..; formLayout -edit -attachForm "textForm" "left" 0 -attachForm "textForm" "right" 0 -attachForm "textForm" "top" 0 -attachForm "listBoxForm" "left" 0 -attachForm "listBoxForm" "right" 0 -attachControl "listBoxForm" "top" 0 "textForm" -attachControl "listBoxForm" "bottom" 0 "buttonForm" -attachForm "buttonForm" "left" 0 -attachForm "buttonForm" "right" 0 -attachForm "buttonForm" "bottom" 0 mainForm; setParent ..; showWindow updateShadowMapsWindow; } global proc updateShadowMapsCallback(string $window) { setParent $window; deleteUI $window; } global proc updateShadowMaps() { createUpdateShadowMapsWindow("updateShadowMapsCallback"); }