[Bf-blender-cvs] [714e48ec55b] master: GPencil: Fix unreported missing onion skin in renders
Antonio Vazquez
noreply at git.blender.org
Mon Dec 16 18:54:51 CET 2019
Commit: 714e48ec55b6d787e2caa844eb9b1c14a45fc6da
Author: Antonio Vazquez
Date: Mon Dec 16 18:54:36 2019 +0100
Branches: master
https://developer.blender.org/rB714e48ec55b6d787e2caa844eb9b1c14a45fc6da
GPencil: Fix unreported missing onion skin in renders
When the option was enabled, the onion was not render as expected.
===================================================================
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 7e75edfddf3..4c6ce896ebc 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -1948,9 +1948,12 @@ void gpencil_populate_datablock(GPENCIL_e_data *e_data,
bGPdata *gpd = (bGPdata *)ob->data;
- const bool main_onion = stl->storage->is_main_onion;
+ /* If render mode, instead to use view switches, test if the datablock has
+ * the onion activated for render. */
+ const bool render_onion = (gpd && gpd->onion_flag & GP_ONION_GHOST_ALWAYS);
+ const bool main_onion = (stl->storage->is_render) ? render_onion : stl->storage->is_main_onion;
+ const bool overlay = (stl->storage->is_render) ? render_onion : stl->storage->is_main_overlay;
const bool playing = stl->storage->is_playing;
- const bool overlay = stl->storage->is_main_overlay;
const bool do_onion = (bool)((gpd->flag & GP_DATA_STROKE_WEIGHTMODE) == 0) && overlay &&
main_onion && !playing && gpencil_onion_active(gpd);
More information about the Bf-blender-cvs
mailing list