diff options
author | Bastien Montagne <bastien@blender.org> | 2020-09-21 11:47:20 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-09-21 11:49:39 +0300 |
commit | d72b5785eb02741ff14121cf4bb8dcdd019ee786 (patch) | |
tree | 3abd64caff4552b9672f1c7bb033e90c46a6a99a /source | |
parent | b8b60e132d0382bb360855e52f2f7c522625ca98 (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')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image.c | 3 |
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) { |