[Bf-blender-cvs] [6c7bd14ac33] greasepencil-object: Cleanup - This code shouldn't be needed anymore
Joshua Leung
noreply at git.blender.org
Tue Nov 21 00:17:52 CET 2017
Commit: 6c7bd14ac335030d65882372727df11df0bc6189
Author: Joshua Leung
Date: Tue Nov 21 00:39:24 2017 +1300
Branches: greasepencil-object
https://developer.blender.org/rB6c7bd14ac335030d65882372727df11df0bc6189
Cleanup - This code shouldn't be needed anymore
===================================================================
M source/blender/draw/engines/gpencil/gpencil_engine.c
===================================================================
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 37996cf2b5c..9cfe5df5760 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -255,21 +255,10 @@ static void GPENCIL_cache_init(void *vedata)
psl->edit_pass = DRW_pass_create("GPencil Edit Pass", DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND);
/* detect if playing animation */
- // XXX: Why? Can this be done in a simpler way (covering less of the main DB)?
int oldsts = stl->storage->playing;
stl->storage->playing = 0;
if (draw_ctx->evil_C) {
- struct Main *bmain = CTX_data_main(draw_ctx->evil_C);
- if (ED_screen_animation_playing(CTX_wm_manager(draw_ctx->evil_C))) {
- stl->storage->playing = 1;
- BKE_gpencil_batch_cache_alldirty_main(bmain);
- }
- else {
- /* if change animation status, cache is dirty */
- if (oldsts != stl->storage->playing) {
- BKE_gpencil_batch_cache_alldirty_main(bmain);
- }
- }
+ stl->storage->playing = ED_screen_animation_playing(CTX_wm_manager(draw_ctx->evil_C));
}
/* detect if painting session */
bGPdata *obact_gpd = NULL;
More information about the Bf-blender-cvs
mailing list