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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2014-02-05 16:16:15 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2014-02-05 16:16:46 +0400
commit8acf717b6d14231e99c6755d8f88eec835a33126 (patch)
treed109fc7ed407c7d04f8a41f1a688714d77d9e767 /source/blender/editors/space_outliner/outliner_edit.c
parent27d482425d20c7099d352cb3cfa018e061e688f7 (diff)
Fix T38471: parenting in the outliner was possible with library linked objects.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_edit.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_edit.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index f80937bf63f..91b8554a789 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -1469,6 +1469,11 @@ static int parent_drop_exec(bContext *C, wmOperator *op)
RNA_string_get(op->ptr, "child", childname);
ob = (Object *)BKE_libblock_find_name(ID_OB, childname);
+ if (ob->id.lib) {
+ BKE_report(op->reports, RPT_INFO, "Can't edit library linked object");
+ return OPERATOR_CANCELLED;
+ }
+
ED_object_parent_set(op->reports, bmain, scene, ob, par, partype, false, false, NULL);
DAG_relations_tag_update(bmain);
@@ -1512,6 +1517,10 @@ static int parent_drop_invoke(bContext *C, wmOperator *op, const wmEvent *event)
if (ob == par) {
return OPERATOR_CANCELLED;
}
+ if (ob->id.lib) {
+ BKE_report(op->reports, RPT_INFO, "Can't edit library linked object");
+ return OPERATOR_CANCELLED;
+ }
scene = (Scene *)outliner_search_back(soops, te, ID_SCE);