New print IFC file debug operator

This commit is contained in:
Dion Moult
2021-07-03 10:02:26 +10:00
parent eb89308019
commit d5539399e8
3 changed files with 13 additions and 0 deletions
@@ -2,6 +2,7 @@ import bpy
from . import ui, prop, operator
classes = (
operator.PrintIfcFile,
operator.ValidateIfcFile,
operator.ProfileImportIFC,
operator.CreateAllShapes,
@@ -5,6 +5,15 @@ import blenderbim.bim.import_ifc as import_ifc
from blenderbim.bim.ifc import IfcStore
class PrintIfcFile(bpy.types.Operator):
bl_idname = "bim.print_ifc_file"
bl_label = "Print IFC File"
def execute(self, context):
print(IfcStore.get_file().wrapped_data.to_string())
return {"FINISHED"}
class ValidateIfcFile(bpy.types.Operator):
bl_idname = "bim.validate_ifc_file"
bl_label = "Validate IFC File"
@@ -20,6 +20,9 @@ class BIM_PT_debug(Panel):
row.operator("bim.validate_ifc_file", icon="CHECKMARK", text="")
row.operator("bim.select_ifc_file", icon="FILE_FOLDER", text="")
row = layout.row()
row.operator("bim.print_ifc_file")
row = layout.row()
row.operator("bim.create_all_shapes")