diff options
author | Antonioya <blendergit@gmail.com> | 2019-06-22 18:47:00 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-06-22 18:47:00 +0300 |
commit | ab9492648398ecd9265173356d50688ddb3c9aeb (patch) | |
tree | cce3858aa059fcb8b2aef37f61ee51cbf5839ffe /source/blender/draw/engines | |
parent | d51ad19f8c8e8091cf822a279f288a0559e139a7 (diff) |
GPencil: Fix Fast Drawing and MSAA disabled in previous commit
The previous commit disable the fast drawing if the background texture was not ready, but it did not detect the Painting mode, so the fast was always disabled.
Now the check is done inside paint mode.
Diffstat (limited to 'source/blender/draw/engines')
-rw-r--r-- | source/blender/draw/engines/gpencil/gpencil_engine.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c index 61ab45eae03..fbff680e3f5 100644 --- a/source/blender/draw/engines/gpencil/gpencil_engine.c +++ b/source/blender/draw/engines/gpencil/gpencil_engine.c @@ -424,12 +424,13 @@ void GPENCIL_cache_init(void *vedata) /* detect if painting session */ if ((obact_gpd) && (obact_gpd->flag & GP_DATA_STROKE_PAINTMODE) && - (stl->storage->is_playing == false) && (stl->storage->background_ready == true)) { + (stl->storage->is_playing == false)) { /* need the original to avoid cow overhead while drawing */ bGPdata *gpd_orig = (bGPdata *)DEG_get_original_id(&obact_gpd->id); if (((gpd_orig->runtime.sbuffer_sflag & GP_STROKE_ERASER) == 0) && (gpd_orig->runtime.sbuffer_size > 0) && - ((gpd_orig->flag & GP_DATA_STROKE_POLYGON) == 0) && !DRW_state_is_depth()) { + ((gpd_orig->flag & GP_DATA_STROKE_POLYGON) == 0) && !DRW_state_is_depth() && + (stl->storage->background_ready == true)) { stl->g_data->session_flag |= GP_DRW_PAINT_PAINTING; } else { |