From d72b5785eb02741ff14121cf4bb8dcdd019ee786 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 21 Sep 2020 10:47:20 +0200 Subject: Fix T79373: Forbid painting on linked image. There is just no reason to support that kind of useless behavior. Some remote TODO could be to define a process based on liboverride and layers. --- source/blender/editors/sculpt_paint/paint_image.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/editors') diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 6bdc072ff64..5bfb03ee42f 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -288,6 +288,9 @@ static bool image_paint_poll_ex(bContext *C, bool check_tool) SpaceImage *sima = CTX_wm_space_image(C); if (sima) { + if (sima->image != NULL && ID_IS_LINKED(sima->image)) { + return false; + } ARegion *region = CTX_wm_region(C); if ((sima->mode == SI_MODE_PAINT) && region->regiontype == RGN_TYPE_WINDOW) { -- cgit v1.2.3