mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 23:29:59 +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.AddClashSource,
|
||||||
operator.ExecuteIfcClash,
|
operator.ExecuteIfcClash,
|
||||||
operator.ExportClashSets,
|
operator.ExportClashSets,
|
||||||
|
operator.HideClash,
|
||||||
operator.ImportClashSets,
|
operator.ImportClashSets,
|
||||||
operator.LoadSmartGroupsForActiveClashSet,
|
operator.LoadSmartGroupsForActiveClashSet,
|
||||||
operator.RemoveClashSet,
|
operator.RemoveClashSet,
|
||||||
|
|||||||
@@ -443,6 +443,27 @@ class SelectClash(bpy.types.Operator):
|
|||||||
return {"FINISHED"}
|
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):
|
class SmartClashGroup(bpy.types.Operator):
|
||||||
bl_idname = "bim.smart_clash_group"
|
bl_idname = "bim.smart_clash_group"
|
||||||
bl_label = "Smart Group Clashes"
|
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")
|
layout.template_list("BIM_UL_clashes", "", props.active_clash_set, "clashes", props, "active_clash_index")
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.operator("bim.select_clash")
|
row.operator("bim.select_clash")
|
||||||
|
row.operator("bim.hide_clash", text="", icon="HIDE_ON")
|
||||||
else:
|
else:
|
||||||
row.label(text="Clashes Are Not Loaded", icon="PIVOT_CURSOR")
|
row.label(text="Clashes Are Not Loaded", icon="PIVOT_CURSOR")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user