mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 22:11:36 +00:00
New debug feature to override the display type.
This commit is contained in:
@@ -20,18 +20,19 @@ import bpy
|
|||||||
from . import ui, prop, operator
|
from . import ui, prop, operator
|
||||||
|
|
||||||
classes = (
|
classes = (
|
||||||
|
operator.ConvertToBlender,
|
||||||
operator.CopyDebugInformation,
|
operator.CopyDebugInformation,
|
||||||
operator.CreateAllShapes,
|
operator.CreateAllShapes,
|
||||||
operator.CreateShapeFromStepId,
|
operator.CreateShapeFromStepId,
|
||||||
operator.InspectFromObject,
|
operator.InspectFromObject,
|
||||||
operator.InspectFromStepId,
|
operator.InspectFromStepId,
|
||||||
|
operator.OverrideDisplayType,
|
||||||
operator.ParseExpress,
|
operator.ParseExpress,
|
||||||
operator.PrintIfcFile,
|
operator.PrintIfcFile,
|
||||||
operator.PrintObjectPlacement,
|
operator.PrintObjectPlacement,
|
||||||
operator.ProfileImportIFC,
|
operator.ProfileImportIFC,
|
||||||
operator.PurgeHdf5Cache,
|
operator.PurgeHdf5Cache,
|
||||||
operator.PurgeIfcLinks,
|
operator.PurgeIfcLinks,
|
||||||
operator.ConvertToBlender,
|
|
||||||
operator.RewindInspector,
|
operator.RewindInspector,
|
||||||
operator.SelectExpressFile,
|
operator.SelectExpressFile,
|
||||||
operator.SelectHighPolygonMeshes,
|
operator.SelectHighPolygonMeshes,
|
||||||
|
|||||||
@@ -443,3 +443,14 @@ class PurgeHdf5Cache(bpy.types.Operator):
|
|||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
core.purge_hdf5_cache(tool.Debug)
|
core.purge_hdf5_cache(tool.Debug)
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|
||||||
|
class OverrideDisplayType(bpy.types.Operator):
|
||||||
|
bl_idname = "bim.override_display_type"
|
||||||
|
bl_label = "Override Display Type"
|
||||||
|
display: bpy.props.StringProperty()
|
||||||
|
|
||||||
|
def execute(self, context):
|
||||||
|
for obj in context.selected_objects:
|
||||||
|
obj.display_type = self.display
|
||||||
|
return {"FINISHED"}
|
||||||
|
|||||||
@@ -40,3 +40,13 @@ class BIMDebugProperties(PropertyGroup):
|
|||||||
inverse_attributes: CollectionProperty(name="Inverse Attributes", type=Attribute)
|
inverse_attributes: CollectionProperty(name="Inverse Attributes", type=Attribute)
|
||||||
inverse_references: CollectionProperty(name="Inverse References", type=Attribute)
|
inverse_references: CollectionProperty(name="Inverse References", type=Attribute)
|
||||||
express_file: StringProperty(name="Express File")
|
express_file: StringProperty(name="Express File")
|
||||||
|
display_type: EnumProperty(
|
||||||
|
items=[
|
||||||
|
("BOUNDS", "Bounds", ""),
|
||||||
|
("WIRE", "Wire", ""),
|
||||||
|
("SOLID", "Solid", ""),
|
||||||
|
("TEXTURED", "Textured", ""),
|
||||||
|
],
|
||||||
|
name="Display Type",
|
||||||
|
default="BOUNDS",
|
||||||
|
)
|
||||||
|
|||||||
@@ -83,6 +83,10 @@ class BIM_PT_debug(Panel):
|
|||||||
).percentile = context.scene.BIMDebugProperties.percentile_of_polygons
|
).percentile = context.scene.BIMDebugProperties.percentile_of_polygons
|
||||||
row.prop(props, "percentile_of_polygons", text="")
|
row.prop(props, "percentile_of_polygons", text="")
|
||||||
|
|
||||||
|
row = layout.split(factor=0.5, align=True)
|
||||||
|
row.prop(props, "display_type", text="")
|
||||||
|
row.operator("bim.override_display_type").display = context.scene.BIMDebugProperties.display_type
|
||||||
|
|
||||||
if context.active_object and context.active_object.data:
|
if context.active_object and context.active_object.data:
|
||||||
mprops = context.active_object.data.BIMMeshProperties
|
mprops = context.active_object.data.BIMMeshProperties
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
|
|||||||
Reference in New Issue
Block a user