mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 10:06:47 +00:00
Minor Feature: Add ability to hide the clash decorator in the 3D view.
This commit is contained in:
@@ -24,6 +24,7 @@ classes = (
|
||||
operator.AddClashSource,
|
||||
operator.ExecuteIfcClash,
|
||||
operator.ExportClashSets,
|
||||
operator.HideClash,
|
||||
operator.ImportClashSets,
|
||||
operator.LoadSmartGroupsForActiveClashSet,
|
||||
operator.RemoveClashSet,
|
||||
|
||||
@@ -443,6 +443,27 @@ class SelectClash(bpy.types.Operator):
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
class HideClash(bpy.types.Operator):
|
||||
bl_idname = "bim.hide_clash"
|
||||
bl_label = "Hide Clash"
|
||||
bl_options = {"REGISTER", "UNDO"}
|
||||
bl_description = "Hide the clash decorator"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
if not ClashDecorator.is_installed:
|
||||
cls.poll_message_set("No clash selected.")
|
||||
return False
|
||||
return True
|
||||
|
||||
def execute(self, context):
|
||||
ClashDecorator.uninstall()
|
||||
for area in context.screen.areas:
|
||||
if area.type=="VIEW_3D":
|
||||
area.tag_redraw()
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
class SmartClashGroup(bpy.types.Operator):
|
||||
bl_idname = "bim.smart_clash_group"
|
||||
bl_label = "Smart Group Clashes"
|
||||
|
||||
@@ -165,6 +165,7 @@ class BIM_PT_ifcclash(Panel):
|
||||
layout.template_list("BIM_UL_clashes", "", props.active_clash_set, "clashes", props, "active_clash_index")
|
||||
row = layout.row()
|
||||
row.operator("bim.select_clash")
|
||||
row.operator("bim.hide_clash", text="", icon="HIDE_ON")
|
||||
else:
|
||||
row.label(text="Clashes Are Not Loaded", icon="PIVOT_CURSOR")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user