Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2019-12-16 20:54:36 +0300
committerAntonio Vazquez <blendergit@gmail.com>2019-12-16 20:54:36 +0300
commit714e48ec55b6d787e2caa844eb9b1c14a45fc6da (patch)
tree48bedc9a10c6fe99e2e3d32576c031c3d40cc56e
parent043cac5d20e24e711860dd0afa51932b2c7c542e (diff)
GPencil: Fix unreported missing onion skin in renders
When the option was enabled, the onion was not render as expected.
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_draw_utils.c7
1 files changed, 5 insertions, 2 deletions
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);