[Bf-blender-cvs] [b7d84fc310a] temp-gpencil-camera-reproject: Fix render size calculation

Falk David noreply at git.blender.org
Sat May 29 16:53:41 CEST 2021


Commit: b7d84fc310a0addf922e5e708ba465292e3e89cc
Author: Falk David
Date:   Sat May 29 16:53:29 2021 +0200
Branches: temp-gpencil-camera-reproject
https://developer.blender.org/rBb7d84fc310a0addf922e5e708ba465292e3e89cc

Fix render size calculation

===================================================================

M	source/blender/editors/gpencil/gpencil_utils.c

===================================================================

diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c
index d570fd6875e..04287840a18 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -1017,9 +1017,8 @@ bool gpencil_point_render_xy_to_3d(const GP_SpaceConversion *gsc,
       V3D_PROJ_RET_OK) {
     sub_v2_v2v2(mval_f, mval_prj, mval_f);
 
-    float dx, dy;
-    dx = 2.0f * mval_f[0] * zfac / (scene->r.xsch * scene->r.size);
-    dy = 2.0f * mval_f[1] * zfac / (scene->r.ysch * scene->r.size);
+    float dx = 2.0f * mval_f[0] * zfac / (scene->r.xsch * scene->r.size / 100.0f) ;
+    float dy = 2.0f * mval_f[1] * zfac / (scene->r.ysch * scene->r.size / 100.0f);
     dvec[0] = (persinv[0][0] * dx + persinv[1][0] * dy);
     dvec[1] = (persinv[0][1] * dx + persinv[1][1] * dy);
     dvec[2] = (persinv[0][2] * dx + persinv[1][2] * dy);



More information about the Bf-blender-cvs mailing list