[Bf-blender-cvs] [ac197f50d59] greasepencil-object: Fix problem with onion in multiwindow mode
Antonioya
noreply at git.blender.org
Mon Nov 19 20:09:26 CET 2018
Commit: ac197f50d598fa5a5239cc8f9381786819ce3b42
Author: Antonioya
Date: Mon Nov 19 20:09:18 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rBac197f50d598fa5a5239cc8f9381786819ce3b42
Fix problem with onion in multiwindow mode
===================================================================
M source/blender/draw/engines/gpencil/gpencil_cache_utils.c
M source/blender/draw/engines/gpencil/gpencil_engine.c
===================================================================
diff --git a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c
index 01840960787..15ac3f37add 100644
--- a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c
@@ -182,6 +182,13 @@ static bool gpencil_batch_cache_valid(GpencilBatchCache *cache, bGPdata *gpd, in
else if (gpd->flag & GP_DATA_CACHE_IS_DIRTY) {
valid = false;
}
+ else if (gpd->flag & GP_DATA_SHOW_ONIONSKINS) {
+ /* if onion, set as dirty always
+ * This reduces performance, but avoid any crash in the multiple
+ * overlay and multiwindow options and keep all windows working
+ */
+ valid = false;
+ }
else if (cache->is_editmode) {
valid = false;
}
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index aa424bf0e4b..7be06d501f1 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -540,14 +540,6 @@ void GPENCIL_cache_populate(void *vedata, Object *ob)
if (ob->type == OB_GPENCIL && ob->data) {
bGPdata *gpd = (bGPdata *)ob->data;
- /* if onion, set as dirty always
- * This reduces performance, but avoid any crash in the multiple
- * overlay and multiwindow options
- */
- if (gpd->flag & GP_DATA_SHOW_ONIONSKINS) {
- gpd->flag |= GP_DATA_CACHE_IS_DIRTY;
- }
-
/* when start/stop animation the cache must be set as dirty to reset all data */
if (stl->storage->reset_cache) {
gpd->flag |= GP_DATA_CACHE_IS_DIRTY;
More information about the Bf-blender-cvs
mailing list