From 0d599ce95a8e81c8fe4f2461f49068639e4beb2f Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Wed, 20 Jan 2021 16:53:42 +0100 Subject: GPencil: Fix unreported NaN value for UV Rotation in Primitives Using primitive drawings, the point UV rotation was not initialized. --- source/blender/editors/gpencil/gpencil_primitive.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/gpencil') 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) { -- cgit v1.2.3