[Bf-blender-cvs] [4abfa4f467e] temp-gpencil-io: GPencil: Add invert axis to previous commit

Antonio Vazquez noreply at git.blender.org
Tue Jan 19 19:23:26 CET 2021


Commit: 4abfa4f467e62ef6a82c73670bb9e144273cea1a
Author: Antonio Vazquez
Date:   Tue Jan 19 19:23:23 2021 +0100
Branches: temp-gpencil-io
https://developer.blender.org/rB4abfa4f467e62ef6a82c73670bb9e144273cea1a

GPencil: Add invert axis to previous commit

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

M	source/blender/io/gpencil/intern/gpencil_io_base.cc

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

diff --git a/source/blender/io/gpencil/intern/gpencil_io_base.cc b/source/blender/io/gpencil/intern/gpencil_io_base.cc
index 8c4dcee42a8..3297e87678b 100644
--- a/source/blender/io/gpencil/intern/gpencil_io_base.cc
+++ b/source/blender/io/gpencil/intern/gpencil_io_base.cc
@@ -252,6 +252,15 @@ void GpencilIO::gpencil_3d_point_to_project_space(const float mat[4][4],
   mul_m4_v4(mat, tmp);
 
   copy_v2_v2(r_co, tmp);
+
+  /* Invert X axis. */
+  if (invert_axis_[0]) {
+    r_co[0] = winx_ - r_co[0];
+  }
+  /* Invert Y axis. */
+  if (invert_axis_[1]) {
+    r_co[1] = winy_ - r_co[1];
+  }
 }
 
 /**



More information about the Bf-blender-cvs mailing list