mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 21:18:49 +00:00
Rename to chain_filter_with_set_operations for clarity and update related preferences
This commit is contained in:
@@ -490,7 +490,7 @@ def draw_filter(
|
|||||||
|
|
||||||
sprops = tool.Search.get_search_props()
|
sprops = tool.Search.get_search_props()
|
||||||
preferences = tool.Blender.get_addon_preferences()
|
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():
|
if tool.Ifc.get():
|
||||||
row = layout.row(align=True)
|
row = layout.row(align=True)
|
||||||
|
|||||||
@@ -3688,7 +3688,7 @@ class EditElementFilter(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
assert pset
|
assert pset
|
||||||
|
|
||||||
preferences = tool.Blender.get_addon_preferences()
|
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":
|
if self.filter_mode == "INCLUDE":
|
||||||
filter_groups = props.include_filter_groups
|
filter_groups = props.include_filter_groups
|
||||||
|
|||||||
@@ -663,7 +663,7 @@ class EditFilterQuery(Operator, tool.Ifc.Operator):
|
|||||||
def _execute(self, context):
|
def _execute(self, context):
|
||||||
module = getattr(self, "module", "search")
|
module = getattr(self, "module", "search")
|
||||||
preferences = tool.Blender.get_addon_preferences()
|
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 not enable_suggestions:
|
||||||
if self.query == self.old_query:
|
if self.query == self.old_query:
|
||||||
@@ -677,7 +677,7 @@ class EditFilterQuery(Operator, tool.Ifc.Operator):
|
|||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
preferences = tool.Blender.get_addon_preferences()
|
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 not enable_suggestions:
|
||||||
row = self.layout.row()
|
row = self.layout.row()
|
||||||
@@ -687,7 +687,7 @@ class EditFilterQuery(Operator, tool.Ifc.Operator):
|
|||||||
module = getattr(self, "module", "search")
|
module = getattr(self, "module", "search")
|
||||||
filter_groups = tool.Search.get_filter_groups(module)
|
filter_groups = tool.Search.get_filter_groups(module)
|
||||||
preferences = tool.Blender.get_addon_preferences()
|
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:
|
if enable_suggestions:
|
||||||
filter_structure = []
|
filter_structure = []
|
||||||
@@ -767,7 +767,7 @@ class Search(Operator):
|
|||||||
assert_never(self.property_group)
|
assert_never(self.property_group)
|
||||||
|
|
||||||
preferences = tool.Blender.get_addon_preferences()
|
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:
|
if enable_suggestions:
|
||||||
results = tool.Search.execute_filter_groups(props.filter_groups)
|
results = tool.Search.execute_filter_groups(props.filter_groups)
|
||||||
|
|||||||
@@ -690,9 +690,9 @@ class BIM_ADDON_preferences(bpy.types.AddonPreferences):
|
|||||||
default=False,
|
default=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
search_filter_suggestions: BoolProperty(
|
chain_filter_with_set_operations: BoolProperty(
|
||||||
name="Enable advanced search with filter suggestions",
|
name="Enable chained filters with set operations",
|
||||||
description="Enable filter mode (ADD/SUBTRACT/FILTER) and value suggestions for search filters",
|
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,
|
default=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -733,7 +733,7 @@ class BIM_ADDON_preferences(bpy.types.AddonPreferences):
|
|||||||
default_parameters: DefaultParameters
|
default_parameters: DefaultParameters
|
||||||
container_hide_show_isolate: bool
|
container_hide_show_isolate: bool
|
||||||
mass_time_units_in_wizard: 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:
|
def draw(self, context: bpy.types.Context) -> None:
|
||||||
layout = self.layout
|
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:
|
def draw_extras_settings(self, layout: bpy.types.UILayout, context: bpy.types.Context) -> None:
|
||||||
layout.prop(self, "container_hide_show_isolate")
|
layout.prop(self, "container_hide_show_isolate")
|
||||||
layout.prop(self, "mass_time_units_in_wizard")
|
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
|
# Scene panel groups
|
||||||
|
|||||||
Reference in New Issue
Block a user