Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2018-10-20 20:40:29 +0300
committerAntonioya <blendergit@gmail.com>2018-10-20 20:40:29 +0300
commit8c9f8d6cbb3ad176d4731649b22e97344f407aa4 (patch)
tree3e89d37bab9d1febd2acb098517e6af45ad4e1c0 /source/blender/draw
parent541d07045b79cef52bdcf8bd1d90fc60793c9872 (diff)
GP: Fix duplication when draw strokes in multiple windows
The stroke must be visible only in the current region and only visible when the stroke is completed.
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_engine.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index f371de066a9..71e3c6a22ef 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -579,8 +579,12 @@ void GPENCIL_cache_populate(void *vedata, Object *ob)
gpencil_add_draw_data(vedata, ob);
}
- /* draw current painting strokes */
- if (draw_ctx->obact == ob) {
+ /* draw current painting strokes
+ * (only if region is equal to originated paint region)
+ */
+ if ((draw_ctx->obact == ob) &&
+ ((gpd->runtime.ar == NULL) || (gpd->runtime.ar == draw_ctx->ar)))
+ {
DRW_gpencil_populate_buffer_strokes(&e_data, vedata, ts, ob);
}