From ec2ca4bcf4156b964e58ea117121524cd7c3c392 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Wed, 12 Jul 2023 12:37:53 +1000 Subject: [PATCH] Fix #3417. Apply 50mm offset to camera to ensure text isn't "behind" the camera. This 50mm convention is used in quite a few places, we should standardise it. --- src/blenderbim/blenderbim/tool/drawing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/blenderbim/blenderbim/tool/drawing.py b/src/blenderbim/blenderbim/tool/drawing.py index dc2e990ad2..66f75d29d5 100644 --- a/src/blenderbim/blenderbim/tool/drawing.py +++ b/src/blenderbim/blenderbim/tool/drawing.py @@ -93,7 +93,7 @@ class Drawing(blenderbim.core.tool.Drawing): camera = get_camera_from_annotation_object(obj) or bpy.context.scene.camera current_pos = camera.matrix_world.inverted() @ obj.location - current_pos.z = -camera.data.clip_start + current_pos.z = -camera.data.clip_start - 0.05 current_pos = camera.matrix_world @ current_pos obj.location = current_pos @@ -1497,6 +1497,7 @@ class Drawing(blenderbim.core.tool.Drawing): drawing = tool.Ifc.get_entity(camera) filtered_elements = cls.get_drawing_elements(drawing) | cls.get_drawing_spaces(drawing) + filtered_elements.add(drawing) for view_layer_object in bpy.context.view_layer.objects: element = tool.Ifc.get_entity(view_layer_object) if not element: