Rename to chain_filter_with_set_operations for clarity and update related preferences

This commit is contained in:
falken10vdl
2025-12-17 19:28:00 +01:00
parent 8912cca652
commit 1477d650a4
4 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -490,7 +490,7 @@ def draw_filter(
sprops = tool.Search.get_search_props()
preferences = tool.Blender.get_addon_preferences()
enable_suggestions = getattr(preferences, "search_filter_suggestions", False)
enable_suggestions = getattr(preferences, "chain_filter_with_set_operations", False)
if tool.Ifc.get():
row = layout.row(align=True)
@@ -3688,7 +3688,7 @@ class EditElementFilter(bpy.types.Operator, tool.Ifc.Operator):
assert pset
preferences = tool.Blender.get_addon_preferences()
enable_suggestions = getattr(preferences, "search_filter_suggestions", False)
enable_suggestions = getattr(preferences, "chain_filter_with_set_operations", False)
if self.filter_mode == "INCLUDE":
filter_groups = props.include_filter_groups
@@ -663,7 +663,7 @@ class EditFilterQuery(Operator, tool.Ifc.Operator):
def _execute(self, context):
module = getattr(self, "module", "search")
preferences = tool.Blender.get_addon_preferences()
enable_suggestions = getattr(preferences, "search_filter_suggestions", False)
enable_suggestions = getattr(preferences, "chain_filter_with_set_operations", False)
if not enable_suggestions:
if self.query == self.old_query:
@@ -677,7 +677,7 @@ class EditFilterQuery(Operator, tool.Ifc.Operator):
def draw(self, context):
preferences = tool.Blender.get_addon_preferences()
enable_suggestions = getattr(preferences, "search_filter_suggestions", False)
enable_suggestions = getattr(preferences, "chain_filter_with_set_operations", False)
if not enable_suggestions:
row = self.layout.row()
@@ -687,7 +687,7 @@ class EditFilterQuery(Operator, tool.Ifc.Operator):
module = getattr(self, "module", "search")
filter_groups = tool.Search.get_filter_groups(module)
preferences = tool.Blender.get_addon_preferences()
enable_suggestions = getattr(preferences, "search_filter_suggestions", False)
enable_suggestions = getattr(preferences, "chain_filter_with_set_operations", False)
if enable_suggestions:
filter_structure = []
@@ -767,7 +767,7 @@ class Search(Operator):
assert_never(self.property_group)
preferences = tool.Blender.get_addon_preferences()
enable_suggestions = getattr(preferences, "search_filter_suggestions", False)
enable_suggestions = getattr(preferences, "chain_filter_with_set_operations", False)
if enable_suggestions:
results = tool.Search.execute_filter_groups(props.filter_groups)
+5 -5
View File
@@ -690,9 +690,9 @@ class BIM_ADDON_preferences(bpy.types.AddonPreferences):
default=False,
)
search_filter_suggestions: BoolProperty(
name="Enable advanced search with filter suggestions",
description="Enable filter mode (ADD/SUBTRACT/FILTER) and value suggestions for search filters",
chain_filter_with_set_operations: BoolProperty(
name="Enable chained filters with set operations",
description="Enable chaining search filters with set operations: ADD (union: combine sets), SUBTRACT (difference: remove from set), FILTER (intersection: only elements in both sets), with autocomplete suggestions for filter values",
default=False,
)
@@ -733,7 +733,7 @@ class BIM_ADDON_preferences(bpy.types.AddonPreferences):
default_parameters: DefaultParameters
container_hide_show_isolate: bool
mass_time_units_in_wizard: bool
search_filter_suggestions: bool
chain_filter_with_set_operations: bool
def draw(self, context: bpy.types.Context) -> None:
layout = self.layout
@@ -916,7 +916,7 @@ class BIM_ADDON_preferences(bpy.types.AddonPreferences):
def draw_extras_settings(self, layout: bpy.types.UILayout, context: bpy.types.Context) -> None:
layout.prop(self, "container_hide_show_isolate")
layout.prop(self, "mass_time_units_in_wizard")
layout.prop(self, "search_filter_suggestions")
layout.prop(self, "chain_filter_with_set_operations")
# Scene panel groups