[Bf-blender-cvs] [c51d160ab5b] greasepencil-object: GPencil: Fix origin of UV rotation using object location

Antonio Vazquez noreply at git.blender.org
Fri Nov 8 20:53:06 CET 2019


Commit: c51d160ab5b7b1ba52b2d0cb36914092d6f8ab39
Author: Antonio Vazquez
Date:   Fri Nov 8 20:52:58 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rBc51d160ab5b7b1ba52b2d0cb36914092d6f8ab39

GPencil: Fix origin of UV rotation using object location

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

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

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

diff --git a/source/blender/editors/gpencil/gpencil_uv.c b/source/blender/editors/gpencil/gpencil_uv.c
index 82a9a1f71ee..fb97d6afb48 100644
--- a/source/blender/editors/gpencil/gpencil_uv.c
+++ b/source/blender/editors/gpencil/gpencil_uv.c
@@ -183,6 +183,8 @@ static bool gpencil_uv_transform_init(bContext *C, wmOperator *op, const bool is
     if (gps->flag & GP_STROKE_SELECT) {
       float r_center[3];
       gpencil_stroke_center(gps, r_center);
+      /* Add object location. */
+      add_v3_v3(r_center, opdata->ob->obmat[3]);
       add_v3_v3(center, r_center);
       i++;
     }



More information about the Bf-blender-cvs mailing list