Commit: 065013a9576c7564fff5d510eb43a173a67169bf
Author: Antonio Vazquez
Date: Sun Jul 2 16:49:27 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rB065013a9576c7564fff5d510eb43a173a67169bf
Fix error when play animation
If the same datablock was used, there was a crash. The frame change must be
evaluated before other checks.
===================================================================
M source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
===================================================================
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
index d4ad9c189e2..8797c71f3d6 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
@@ -105,6 +105,10 @@ static bool gpencil_batch_cache_valid(bGPdata *gpd, int
cfra)
cache->is_editmode = gpd->flag & (GP_DATA_STROKE_EDITMODE |
GP_DATA_STROKE_SCULPTMODE);
+ if (cfra != cache->cache_frame) {
+ return false;
+ }
+
if (gpd->flag & GP_DATA_CACHE_REUSE) {
return true;
}
@@ -117,10 +121,6 @@ static bool gpencil_batch_cache_valid(bGPdata *gpd, int
cfra)
return false;
}
- if (cfra != cache->cache_frame) {
- return false;
- }
-
return true;
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs