diff options
author | Antonioya <blendergit@gmail.com> | 2018-12-20 18:52:03 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-12-20 18:52:42 +0300 |
commit | 36121a1bdcd8b0122996d9125e0cd4972dd51ff0 (patch) | |
tree | e9cf70c206d0f0d10d2b69529d69c4d1509f3c0d /source/blender/draw/engines/gpencil/gpencil_cache_utils.c | |
parent | d08db7aef06764392aeac7a70d66cf414aa8fa59 (diff) |
GP: Changes in API to make internal update
Now, the internal data is recalculated when add or remove a point.
The change in the API affect to stroke.points.add() that now requires a datablock parameter. This parameter is required to identify the datablock affected.
For example: stroke.points.add(gpencil, 1) instead of stroke.points.add(1)
This is the second try to fix T59600
Diffstat (limited to 'source/blender/draw/engines/gpencil/gpencil_cache_utils.c')
-rw-r--r-- | source/blender/draw/engines/gpencil/gpencil_cache_utils.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c index 63af8ecc141..e733b7e0f1f 100644 --- a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c +++ b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c @@ -186,6 +186,10 @@ 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_PYTHON_UPDATED) { + gpd->flag &= ~GP_DATA_PYTHON_UPDATED; + valid = false; + } else if (DRW_gpencil_onion_active(gpd)) { /* if onion, set as dirty always * This reduces performance, but avoid any crash in the multiple |