mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 14:06:26 +00:00
Fix bug where saved drawing filters didn't load in the UI.
This commit is contained in:
@@ -2570,8 +2570,16 @@ class EnableEditingElementFilter(bpy.types.Operator, Operator):
|
|||||||
|
|
||||||
def _execute(self, context):
|
def _execute(self, context):
|
||||||
obj = bpy.context.scene.camera
|
obj = bpy.context.scene.camera
|
||||||
if obj:
|
if not obj:
|
||||||
obj.data.BIMCameraProperties.filter_mode = self.filter_mode
|
return
|
||||||
|
obj.data.BIMCameraProperties.filter_mode = self.filter_mode
|
||||||
|
element = tool.Ifc.get_entity(obj)
|
||||||
|
if query := ifcopenshell.util.element.get_pset(element, "EPset_Drawing", self.filter_mode.title()):
|
||||||
|
filter_groups = tool.Search.get_filter_groups(f"drawing_{self.filter_mode.lower()}")
|
||||||
|
try:
|
||||||
|
tool.Search.import_filter_query(query, filter_groups)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
class EditElementFilter(bpy.types.Operator, Operator):
|
class EditElementFilter(bpy.types.Operator, Operator):
|
||||||
|
|||||||
Reference in New Issue
Block a user