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:
authorBastien Montagne <bastien@blender.org>2020-09-21 11:47:20 +0300
committerBastien Montagne <bastien@blender.org>2020-09-21 11:49:39 +0300
commitd72b5785eb02741ff14121cf4bb8dcdd019ee786 (patch)
tree3abd64caff4552b9672f1c7bb033e90c46a6a99a /source/blender/editors/sculpt_paint
parentb8b60e132d0382bb360855e52f2f7c522625ca98 (diff)
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.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c3
1 files changed, 3 insertions, 0 deletions
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) {