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>2022-03-08 13:01:34 +0300
committerBastien Montagne <bastien@blender.org>2022-03-08 13:02:22 +0300
commit0df8c22c8a369e8dd2d7ad6653556e622f98471b (patch)
tree6d4a31cd7605e5bb5e2a953c81937b68d3875483 /source/blender/makesrna
parent1c1efe3ac605b187254377058c93fd34c94aaf9a (diff)
LibOverrides: Tweak to ensure no overrides can be created on linked data.
Was already mostly the case, but from RNA API there was no proper check.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_ID.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index 94ffa330064..a9725da7841 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -744,6 +744,11 @@ static void rna_ID_override_library_operations_update(ID *id,
return;
}
+ if (ID_IS_LINKED(id)) {
+ BKE_reportf(reports, RPT_ERROR, "ID '%s' is linked, cannot edit its overrides", id->name);
+ return;
+ }
+
BKE_lib_override_library_operations_create(bmain, id);
WM_main_add_notifier(NC_WM | ND_LIB_OVERRIDE_CHANGED, NULL);