New feature to only apply section planes to specific objects

This commit is contained in:
Dion Moult
2020-04-25 19:17:47 +10:00
parent 82e38e3abe
commit 3d45f9afeb
3 changed files with 11 additions and 1 deletions
@@ -1927,7 +1927,12 @@ class AddSectionPlane(bpy.types.Operator):
material = bpy.data.materials.new('Section Override')
material.use_nodes = True
for obj in bpy.context.visible_objects:
if bpy.context.scene.BIMProperties.should_section_selected_objects:
objects = bpy.context.selected_objects
else:
objects = bpy.context.visible_objects
for obj in objects:
if not (obj.data \
and hasattr(obj.data, 'materials') \
and obj.data.materials \