[Bf-blender-cvs] [80caab7f5d9] greasepencil-object: Don't show edit lines while play animation

Antonio Vazquez noreply at git.blender.org
Wed Jan 3 19:31:33 CET 2018


Commit: 80caab7f5d9d8dfc29192c6d45c0b2620561c32e
Author: Antonio Vazquez
Date:   Wed Jan 3 19:31:15 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rB80caab7f5d9d8dfc29192c6d45c0b2620561c32e

Don't show edit lines while play animation

The edit lines and points are hidden when the animation is playing.

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

M	source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
M	source/blender/draw/engines/gpencil/gpencil_engine.c

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

diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
index 48d7f951331..9026f2c7d1c 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
@@ -790,8 +790,8 @@ static void gpencil_draw_strokes(GpencilBatchCache *cache, GPENCIL_e_data *e_dat
 			}
 		}
 
-		/* edit points (only in edit mode) */
-		if (src_gps) {
+		/* edit points (only in edit mode and not play animation) */
+		if ((src_gps) && (!playing)) {
 			if (!stl->g_data->shgrps_edit_line) {
 				stl->g_data->shgrps_edit_line = DRW_shgroup_create(e_data->gpencil_line_sh, psl->edit_pass);
 				stl->g_data->tot_sh++;
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index acb6edcd74d..4c34ef8e242 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -805,7 +805,9 @@ static void GPENCIL_draw_scene(void *vedata)
 				}
 			}
 			/* edit points */
-			DRW_draw_pass(psl->edit_pass);
+			if (!playing) {
+				DRW_draw_pass(psl->edit_pass);
+			}
 		}
 	}
 	/* free memory */



More information about the Bf-blender-cvs mailing list