Skip to content

Instantly share code, notes, and snippets.

@berniebernie
Created December 30, 2015 15:10
Show Gist options
  • Select an option

  • Save berniebernie/244247f010f109bcc881 to your computer and use it in GitHub Desktop.

Select an option

Save berniebernie/244247f010f109bcc881 to your computer and use it in GitHub Desktop.
Shows a window with all icon ressources, more accessible than scrolling through the icons in the shelf options http://i.imgur.com/0WSBD90.png
if (`window -exists AllIconsWin`) deleteUI AllIconsWin;
if (`windowPref -exists AllIconsWin`) windowPref -remove AllIconsWin;
string $window = `window -title "All icons" -rtf 1 -widthHeight 840 550 AllIconsWin`;
columnLayout -adj 1;
$labels = `textFieldGrp -label "Resources: " -text "click icons to get icon names"`;
$scrollLayout = `scrollLayout -verticalScrollBarThickness 16 -h 500`;
rowColumnLayout -numberOfColumns 25;
string $icons[] = `resourceManager -nameFilter "*"`;
for($icon in $icons){
nodeIconButton -w 32 -h 32 -style "iconOnly" -command ("displayname $labels \""+$icon+"\"") -image1 $icon;
}
showWindow $window;
proc displayname(string $textfield,string $string){
textFieldGrp -edit -text $string $textfield;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment