delete empty named selection sets

Hi guys, i need a script to clean unused named selection sets. I use this tool a lot, and max keeps the list from the last opened files, so i often need to delete each one by hand.
I don´t know if is hard to wrote a script like this, but if someone want to try, i´ll be thankfull! ;)
cheers,

Jsrocha

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
barigazy's picture

...

Here we go

try(destroyDialog ::bgaRoll)catch()
rollout bgaRoll "C-E-S"
(
	button btn "Clear Empty Sets" pos:[5,5] width:100 height:20
	on btn pressed do
	(
		if selectionSets.count != 0 do for s = selectionSets.count to 1 by -1 where selectionSets[s].count == 0 do deleteItem selectionSets s
	)
)
createDialog bgaRoll 110 30 style:#(#style_titlebar, #style_sysmenu, #style_toolwindow)

barigazy

jsrocha's picture

Hey Barigazy, thanks a lot,

Hey Barigazy, thanks a lot, works just fine!!
Cheers man,

Jsrocha

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.