Commit: 6635886df4d1685a1fe07c3a046dab810f1edc23
Author: Antonio Vazquez
Date:   Mon Apr 9 10:16:33 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB6635886df4d1685a1fe07c3a046dab810f1edc23

Fix error drawing in 2D editors

The UV calculation is only valid for 3D view.

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

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

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

diff --git a/source/blender/editors/gpencil/gpencil_paint.c 
b/source/blender/editors/gpencil/gpencil_paint.c
index 9b6d2fbf95e..d6c27c386ce 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -694,8 +694,8 @@ static short gp_stroke_addpoint(
                /* point time */
                pt->time = (float)(curtime - p->inittime);
                
-               /* point uv */
-               if (gpd->sbuffer_size > 1) {
+               /* point uv (only 3d view) */
+               if ((p->sa->spacetype == SPACE_VIEW3D) && (gpd->sbuffer_size > 
1)) {
                        float pixsize = palcolor->t_pixsize / 1000000.0f;
                        tGPspoint *ptb = (tGPspoint *)gpd->sbuffer + 
gpd->sbuffer_size - 2;
                        bGPDspoint spt, spt2;

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to