mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Status Filters - add explicit button to refresh status filter
Button location - https://files.catbox.moe/yuk2e6.png See the reasoning in https://github.com/IfcOpenShell/IfcOpenShell/pull/6826#issuecomment-3004090797
This commit is contained in:
@@ -94,6 +94,11 @@ class ActivateStatusFilters(bpy.types.Operator):
|
|||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
props = tool.Sequence.get_status_props()
|
props = tool.Sequence.get_status_props()
|
||||||
|
|
||||||
|
if not props.is_enabled:
|
||||||
|
# In case if operator was added to Quick Favorites.
|
||||||
|
bpy.ops.bim.disable_status_fitlers()
|
||||||
|
return {"FINISHED"}
|
||||||
|
|
||||||
visible_statuses = {s.name for s in props.statuses if s.is_visible}
|
visible_statuses = {s.name for s in props.statuses if s.is_visible}
|
||||||
tool.Sequence.set_visibility_by_status(visible_statuses)
|
tool.Sequence.set_visibility_by_status(visible_statuses)
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ class BIM_PT_status(Panel):
|
|||||||
|
|
||||||
row = self.layout.row(align=True)
|
row = self.layout.row(align=True)
|
||||||
row.label(text="Statuses found in the project:")
|
row.label(text="Statuses found in the project:")
|
||||||
|
row.operator("bim.activate_status_filters", icon="FILE_REFRESH", text="")
|
||||||
row.operator("bim.disable_status_filters", icon="CANCEL", text="")
|
row.operator("bim.disable_status_filters", icon="CANCEL", text="")
|
||||||
|
|
||||||
for status in self.props.statuses:
|
for status in self.props.statuses:
|
||||||
|
|||||||
Reference in New Issue
Block a user