Have save/cancel filter on top as well--helps with long filters.

This commit is contained in:
Ryan Schultz
2025-06-03 07:29:19 -05:00
parent 3180004a28
commit e1c1b828ad
2 changed files with 18 additions and 4 deletions
+10 -1
View File
@@ -411,7 +411,16 @@ def draw_filter(
if data.data["saved_searches"]:
row.operator("bim.load_search", text="", icon="IMPORT").module = module
row.operator("bim.save_search", text="", icon="EXPORT").module = module
if module != 'search':
if module == 'drawing_include':
row.operator("bim.edit_element_filter", icon="CHECKMARK", text="").filter_mode = (
"INCLUDE"
)
if module == 'drawing_exclude':
row.operator("bim.edit_element_filter", icon="CHECKMARK", text="").filter_mode = (
"EXCLUDE"
)
row.operator("bim.enable_editing_element_filter", icon="CANCEL", text="").filter_mode = "NONE"
row = layout.row(align=True)
row.operator("bim.add_filter_group", text="Add Search Group", icon="ADD").module = module
row.operator("bim.edit_filter_query", text="", icon="FILTER").module = module
@@ -3470,12 +3470,16 @@ class SelectAssignedProduct(bpy.types.Operator, tool.Ifc.Operator):
class EnableEditingElementFilter(bpy.types.Operator, tool.Ifc.Operator):
bl_idname = "bim.enable_editing_element_filter"
bl_label = "Enable Editing Element Filter"
bl_description = "Enable editing options for the include or exclude filter"
bl_label = "Element Filter Mode"
bl_options = {"REGISTER", "UNDO"}
filter_mode: bpy.props.StringProperty()
@classmethod
def description(cls, context, properties):
if properties.filter_mode == 'NONE':
return "Cancel filter"
return "Enable editing options for the include or exclude filter"
def _execute(self, context):
assert context.scene
obj = context.scene.camera
@@ -3497,6 +3501,7 @@ class EnableEditingElementFilter(bpy.types.Operator, tool.Ifc.Operator):
class EditElementFilter(bpy.types.Operator, tool.Ifc.Operator):
bl_idname = "bim.edit_element_filter"
bl_label = "Edit Element Filter"
bl_description = "Saves the filter"
bl_options = {"REGISTER", "UNDO"}
filter_mode: bpy.props.StringProperty()