[Bf-blender-cvs] [4a0063664ec] master: GP: Avoid Onion calculation when play animation

Antonioya noreply at git.blender.org
Thu Dec 27 22:01:54 CET 2018


Commit: 4a0063664ec7217548182b7527839c1ac2e8fc23
Author: Antonioya
Date:   Thu Dec 27 22:01:46 2018 +0100
Branches: master
https://developer.blender.org/rB4a0063664ec7217548182b7527839c1ac2e8fc23

GP: Avoid Onion calculation when play animation

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

M	source/blender/draw/engines/gpencil/gpencil_draw_utils.c

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

diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
index 6c3577c2794..0dc3870b11a 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -74,8 +74,9 @@ static void gpencil_calc_vertex(
 	Object *ob = cache_ob->ob;
 	const DRWContextState *draw_ctx = DRW_context_state_get();
 	const bool main_onion = draw_ctx->v3d != NULL ? (draw_ctx->v3d->gp_flag & V3D_GP_SHOW_ONION_SKIN) : true;
+	const bool playing = stl->storage->is_playing;
 	const bool do_onion = (bool)((gpd->flag & GP_DATA_STROKE_WEIGHTMODE) == 0) &&
-		main_onion && DRW_gpencil_onion_active(gpd);
+		main_onion && DRW_gpencil_onion_active(gpd) && !playing;
 
 	const bool time_remap = BKE_gpencil_has_time_modifiers(ob);



More information about the Bf-blender-cvs mailing list