mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 02:47:48 +00:00
Have save/cancel filter on top as well--helps with long filters.
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user