diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-04-17 23:02:47 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-04-17 23:03:46 +0300 |
commit | 76b3aac802f9feb2c32f2afcb54b86240a59766e (patch) | |
tree | 6a8349b925e98f5ed5b21c48dcc96d72a669ec27 /source/blender/draw | |
parent | 156319d2b30c222728e22e361cd75b1bd68345f0 (diff) |
Fix T75842: GPencil Edit mode of unselected object is visible
The overlay must be enabled only for the active object.
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_gpencil.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_gpencil.c b/source/blender/draw/engines/overlay/overlay_gpencil.c index c96c448c63b..0dbb0542b18 100644 --- a/source/blender/draw/engines/overlay/overlay_gpencil.c +++ b/source/blender/draw/engines/overlay/overlay_gpencil.c @@ -267,6 +267,11 @@ static void OVERLAY_edit_gpencil_cache_populate(OVERLAY_Data *vedata, Object *ob const DRWContextState *draw_ctx = DRW_context_state_get(); View3D *v3d = draw_ctx->v3d; + /* Overlay is only for active object. */ + if (ob != draw_ctx->obact) { + return; + } + if (pd->edit_gpencil_wires_grp) { DRWShadingGroup *grp = DRW_shgroup_create_sub(pd->edit_gpencil_wires_grp); DRW_shgroup_uniform_vec4_copy(grp, "gpEditColor", gpd->line_color); |