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>2021-10-22 15:57:34 +0300
committerBastien Montagne <bastien@blender.org>2021-10-22 15:59:40 +0300
commit01e2a532f55ee2de3bfd1c0d97d063976546a036 (patch)
tree4f50c7fe7e8397a8ea3a6eb3a87e6e3a1706d2fb /source/blender/editors/sculpt_paint
parent029cf23d71b3557e1a9cacc39bde59ec99263458 (diff)
Fix T92290: Linked Color Palette datablocks can not be used.
* Forbid editing linked palettes. * Make `color` RNA property of ColorPalette '`LIB_EXCEPTION`', so that the color buttons in the palette template remain active on linked data. NOTE: This incidently makes linked palettes' colors editable from RNA, not from UI though, so think this is OK for now.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_ops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index f08771292a8..c6b519f711f 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -233,7 +233,8 @@ static bool palette_poll(bContext *C)
{
Paint *paint = BKE_paint_get_active_from_context(C);
- if (paint && paint->palette != NULL) {
+ if (paint && paint->palette != NULL && !ID_IS_LINKED(paint->palette) &&
+ !ID_IS_OVERRIDE_LIBRARY(paint->palette)) {
return true;
}