From 01e2a532f55ee2de3bfd1c0d97d063976546a036 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 22 Oct 2021 14:57:34 +0200 Subject: 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. --- source/blender/editors/sculpt_paint/paint_ops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/sculpt_paint') 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; } -- cgit v1.2.3