New print object placement debug feature

This commit is contained in:
Dion Moult
2021-07-19 20:16:47 +10:00
parent e68c57e9ef
commit 7cb163efef
3 changed files with 15 additions and 0 deletions
@@ -1,6 +1,7 @@
import bpy
import logging
import ifcopenshell
import ifcopenshell.util.placement
import blenderbim.bim.import_ifc as import_ifc
from blenderbim.bim.ifc import IfcStore
@@ -191,3 +192,13 @@ class InspectFromObject(bpy.types.Operator):
return {"FINISHED"}
bpy.ops.bim.inspect_from_step_id(step_id=ifc_definition_id)
return {"FINISHED"}
class PrintObjectPlacement(bpy.types.Operator):
bl_idname = "bim.print_object_placement"
bl_label = "Print Object Placement"
step_id: bpy.props.IntProperty()
def execute(self, context):
print(ifcopenshell.util.placement.get_local_placement(IfcStore.get_file().by_id(self.step_id)))
return {"FINISHED"}