[Bf-blender-cvs] [d72b5785eb0] master: Fix T79373: Forbid painting on linked image.

Bastien Montagne noreply at git.blender.org
Mon Sep 21 10:49:53 CEST 2020


Commit: d72b5785eb02741ff14121cf4bb8dcdd019ee786
Author: Bastien Montagne
Date:   Mon Sep 21 10:47:20 2020 +0200
Branches: master
https://developer.blender.org/rBd72b5785eb02741ff14121cf4bb8dcdd019ee786

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.

===================================================================

M	source/blender/editors/sculpt_paint/paint_image.c

===================================================================

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) {



More information about the Bf-blender-cvs mailing list