Skip to content

Commit 1bcfdc1

Browse files
authored
Merge pull request #2572 from alicevision/fix/scenePreview
[blender] Adapt `ScenePreview`'s Blender script to pixel ratio
2 parents d296e6c + 9f41a75 commit 1bcfdc1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

meshroom/nodes/blender/scripts/preview.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def setupCamera(intrinsic, pose):
102102
bpy.context.scene.render.pixel_aspect_x = float(intrinsic['pixelRatio'])
103103

104104
camData.sensor_width = float(intrinsic['sensorWidth'])
105-
camData.lens = float(intrinsic['focalLength'])
105+
camData.lens = float(intrinsic['focalLength']) / float(intrinsic['pixelRatio'])
106106

107107
#shift is normalized with the largest resolution
108108
fwidth = float(intrinsic['width'])

0 commit comments

Comments
 (0)