BCF Viewpoint - clear selection before hiding IfcSpaces #4031

This commit is contained in:
Andrej730
2023-11-21 22:12:26 +05:00
parent 6fd629f707
commit b369c5e06e
@@ -979,12 +979,14 @@ class ActivateBcfViewpoint(bpy.types.Operator):
self.hide_spaces(context)
self.set_openings_visibility(False, context)
# set selection at the end not to conflict with .hide_spaces
self.set_selection(viewpoint)
self.set_colours(viewpoint)
def hide_spaces(self, context):
old = context.area.type
context.area.type = "VIEW_3D"
bpy.ops.object.select_all(action="DESELECT")
bpy.ops.object.select_pattern(pattern="IfcSpace/*")
bpy.ops.object.hide_view_set()
context.area.type = old