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 <montagne29@wanadoo.fr>2017-03-16 18:47:56 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-03-16 19:05:48 +0300
commitfa9bd044833ba70c64356b1803abcb594a756a62 (patch)
tree81c0e6e6155d8f88d5a8bc2212f2b63d1bd34dee /source/blender
parent0434053f1329384c312fd07812bce48ec9c28f50 (diff)
Fix outliner contextual menu allowing to delete indirect libraries.
There is no way currently to prevent the option from showing in menu, so instead report a warning to user (and curse again current nightmarish system of operation in outliner...). Reported by @sergey, thanks.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/space_outliner/outliner_edit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index 345ac353c11..8c3b9a55089 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -309,9 +309,12 @@ static void id_delete(bContext *C, ReportList *reports, TreeElement *te, TreeSto
ID *id = tselem->id;
BLI_assert(te->idcode != 0 && id != NULL);
- BLI_assert(te->idcode != ID_LI || ((Library *)id)->parent == NULL);
UNUSED_VARS_NDEBUG(te);
+ if (te->idcode == ID_LI && ((Library *)id)->parent != NULL) {
+ BKE_reportf(reports, RPT_WARNING, "Cannot delete indirectly linked library '%s'", id->name);
+ return;
+ }
if (id->tag & LIB_TAG_INDIRECT) {
BKE_reportf(reports, RPT_WARNING, "Cannot delete indirectly linked id '%s'", id->name);
return;