Create Named Selectoin Sets based on scene's materials

Selection sets names should match corresponding materials names, of course.
Could someone help please?
Thanks

Comments

Comment viewing options

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

.

(	
	for sceneMat in sceneMaterials do
	(
		theObjsArr = for n in (refs.dependents sceneMat) where superClassOf n == GeometryClass collect n
		selectionSets[sceneMat.name] = theObjsArr
	)
)

Comment viewing options

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