[Bf-blender-cvs] [0d599ce95a8] blender-v2.92-release: GPencil: Fix unreported NaN value for UV Rotation in Primitives

Antonio Vazquez noreply at git.blender.org
Wed Jan 20 16:53:49 CET 2021


Commit: 0d599ce95a8e81c8fe4f2461f49068639e4beb2f
Author: Antonio Vazquez
Date:   Wed Jan 20 16:53:42 2021 +0100
Branches: blender-v2.92-release
https://developer.blender.org/rB0d599ce95a8e81c8fe4f2461f49068639e4beb2f

GPencil: Fix unreported NaN value for UV Rotation in Primitives

Using primitive drawings, the point UV rotation was not initialized.

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

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

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

diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c
index b457cd819d2..33497429331 100644
--- a/source/blender/editors/gpencil/gpencil_primitive.c
+++ b/source/blender/editors/gpencil/gpencil_primitive.c
@@ -1018,7 +1018,7 @@ static void gpencil_primitive_update_strokes(bContext *C, tGPDprimitive *tgpi)
       tpt->uv_fac = 0.0f;
     }
 
-    tpt->uv_rot = p2d->uv_rot;
+    tpt->uv_rot = 0.0f;
 
     gpd->runtime.sbuffer_used++;
 
@@ -1040,6 +1040,7 @@ static void gpencil_primitive_update_strokes(bContext *C, tGPDprimitive *tgpi)
     pt->time = 0.0f;
     pt->flag = 0;
     pt->uv_fac = tpt->uv_fac;
+    pt->uv_rot = 0.0f;
     ED_gpencil_point_vertex_color_set(ts, brush, pt, tpt);
 
     if (gps->dvert != NULL) {



More information about the Bf-blender-cvs mailing list