sub kill_NONEs
	ActivateObjectSelTool
	SelectAllUsingFilter &quot;geometry&quot;, siCheckComponentVisibility
	if selection.count = 0 then
		logmessage &quot;Mod Tool can't find any 3D objects.&quot;
		exit sub
	end if
	
	redim obj_array(selection.count - 1)
	counter = 0
	
	for each n in selection
		obj_array(counter) = n
		counter = counter + 1
	next
	
	for each oObj in obj_array
		SelectObj oObj

		' create &quot;script object&quot;
		set SO = selection(0)
		
		for each cl in SO.ActivePrimitive.Geometry.clusters
			if cl.type = &quot;poly&quot; then
				mesh_name = SO.name
				cluster_name = cl.name
				material_name = cl.material.name
				if cl.material.name = scan_material then
					SelectMembers mesh_name &amp; &quot;.polymsh.cls.&quot; &amp; cluster_name
					if selection.count &gt; 0 then
						ApplyTopoOp &quot;DeleteComponent&quot;, selection, siUnspecified, siPersistentOperation
						logmessage &quot;cleaned object: &quot; &amp; SO.name
					else
						logmessage SO.name &amp; &quot; was already clean&quot;
					end if
				end if
			end if
		next
	next
	
	ActivateObjectSelTool
	DeselectAll
	logmessage &quot;Scan completed.&quot;
end sub