//JustListMaterials // // Date: 2004/01/06 // Author: Dai Sato dstruevision@dstruevision.com http://www.dstruevision.com // Procedure Name: JustListMaterials // // Description: This scripts list up all materials in your scene to text scroll list. // By clicking a name of material in that list, attribute editor will open. // How to use: Just type JustListMaterials in comand line. global proc string[] collectMaterials (){ string $sceneMaterials[] = `ls -mat`; return $sceneMaterials; } global proc addItems (){ textScrollList -edit -ra myScrollList; int $materialNumber = size(collectMaterials()); int $counter = 0; string $allMat[] = collectMaterials(); while ($counter<$materialNumber) { textScrollList -edit -append $allMat[$counter] myScrollList; $counter +=1 ; } } global proc whenSelected () { string $selection[] = `textScrollList -q -si myScrollList`; select -cl; select -add $selection[0]; if (`isUIComponentVisible("Attribute Editor")`) { updateMainWindowComponentState(); findNewCurrentModelView; restoreLastPanelWithFocus();updatePrefsMenu(); autoUpdateAttrEd; } else { toggleUIComponentVisibility("Attribute Editor"); updateMainWindowComponentState(); findNewCurrentModelView; restoreLastPanelWithFocus();updatePrefsMenu(); autoUpdateAttrEd; } } global proc assignMaterial () { string $selection[] = `textScrollList -q -si myScrollList`; string $sceneSelection[] = `ls -sl`; for($i=0;$i