Remove object from named selection set

Hi guys,
is there a way to remove an object (or objects) from a named selection set using maxscript? i mean, remove from any named selection set, not an especific one.
Thanks in advance,

Jsrocha

Comments

Comment viewing options

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

...

(
	objToRemoveArr = #($Sphere007, $Sphere008, $Sphere009)
 
	objsBA = #{}
	for o in objToRemoveArr do append objsBA (getHandleByAnim o)	
	for i = 1 to selectionSets.count where (objsCnt = (getNamedSelSetItemCount i)) != 0 do
	(		
		selectionSets[(getNamedSelSetName i)] = (for n = 1 to objsCnt where not objsBA[getHandleByAnim (obj = getNamedSelSetItem i n)] collect obj	)
	)
)
jsrocha's picture

Thanks Miauu!!

Thanks Miauu!!

Comment viewing options

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