[Bf-blender-cvs] [ccfda7dc2c5] master: GP: Disable Onion calculation when Overlay is OFF

Antonioya noreply at git.blender.org
Sun Feb 24 17:02:10 CET 2019


Commit: ccfda7dc2c5d7fe26f0461df2c8209fa6698f9c3
Author: Antonioya
Date:   Sun Feb 24 16:03:03 2019 +0100
Branches: master
https://developer.blender.org/rBccfda7dc2c5d7fe26f0461df2c8209fa6698f9c3

GP: Disable Onion calculation when Overlay is OFF

Now, it's not required to disable the Onion in Overlay panel.

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

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 2e9a3cf1fc7..816bc554bc7 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -69,8 +69,9 @@ static void gpencil_calc_vertex(
 	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 overlay = draw_ctx->v3d != NULL ? (bool)((draw_ctx->v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) : true;
 	const bool do_onion = (bool)((gpd->flag & GP_DATA_STROKE_WEIGHTMODE) == 0) &&
-		main_onion && DRW_gpencil_onion_active(gpd) && !playing;
+		overlay && main_onion && DRW_gpencil_onion_active(gpd) && !playing;
 
 	const bool time_remap = BKE_gpencil_has_time_modifiers(ob);
 	const bool is_multiedit = (bool)GPENCIL_MULTIEDIT_SESSIONS_ON(gpd);



More information about the Bf-blender-cvs mailing list