mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 14:41:25 +00:00
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.
This commit is contained in:
@@ -93,7 +93,7 @@ class Drawing(blenderbim.core.tool.Drawing):
|
|||||||
camera = get_camera_from_annotation_object(obj) or bpy.context.scene.camera
|
camera = get_camera_from_annotation_object(obj) or bpy.context.scene.camera
|
||||||
|
|
||||||
current_pos = camera.matrix_world.inverted() @ obj.location
|
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
|
current_pos = camera.matrix_world @ current_pos
|
||||||
obj.location = current_pos
|
obj.location = current_pos
|
||||||
|
|
||||||
@@ -1497,6 +1497,7 @@ class Drawing(blenderbim.core.tool.Drawing):
|
|||||||
drawing = tool.Ifc.get_entity(camera)
|
drawing = tool.Ifc.get_entity(camera)
|
||||||
|
|
||||||
filtered_elements = cls.get_drawing_elements(drawing) | cls.get_drawing_spaces(drawing)
|
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:
|
for view_layer_object in bpy.context.view_layer.objects:
|
||||||
element = tool.Ifc.get_entity(view_layer_object)
|
element = tool.Ifc.get_entity(view_layer_object)
|
||||||
if not element:
|
if not element:
|
||||||
|
|||||||
Reference in New Issue
Block a user