Fix T75842: GPencil Edit mode of unselected object is visible
The overlay must be enabled only for the active object.
This commit is contained in:
parent
156319d2b3
commit
76b3aac802
Notes:
blender-bot
2023-06-26 11:58:59 +02:00
Referenced by issue #76117, Smooth Modifer Crash - TDR Referenced by issue #76121, Driver depending on animated modifier property does not update Referenced by issue #75911, Crash when switching to sculpt mode with multiresolution modifier is enabled Referenced by issue #75842, [ Grease Pencil ] Edit mode of unselected object is visible on the active one
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue