mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 06:58:56 +00:00
BCF Viewpoint - clear selection before hiding IfcSpaces #4031
This commit is contained in:
@@ -979,12 +979,14 @@ class ActivateBcfViewpoint(bpy.types.Operator):
|
|||||||
self.hide_spaces(context)
|
self.hide_spaces(context)
|
||||||
self.set_openings_visibility(False, context)
|
self.set_openings_visibility(False, context)
|
||||||
|
|
||||||
|
# set selection at the end not to conflict with .hide_spaces
|
||||||
self.set_selection(viewpoint)
|
self.set_selection(viewpoint)
|
||||||
self.set_colours(viewpoint)
|
self.set_colours(viewpoint)
|
||||||
|
|
||||||
def hide_spaces(self, context):
|
def hide_spaces(self, context):
|
||||||
old = context.area.type
|
old = context.area.type
|
||||||
context.area.type = "VIEW_3D"
|
context.area.type = "VIEW_3D"
|
||||||
|
bpy.ops.object.select_all(action="DESELECT")
|
||||||
bpy.ops.object.select_pattern(pattern="IfcSpace/*")
|
bpy.ops.object.select_pattern(pattern="IfcSpace/*")
|
||||||
bpy.ops.object.hide_view_set()
|
bpy.ops.object.hide_view_set()
|
||||||
context.area.type = old
|
context.area.type = old
|
||||||
|
|||||||
Reference in New Issue
Block a user