Commit: 8acf717b6d14231e99c6755d8f88eec835a33126
Author: Brecht Van Lommel
Date:   Wed Feb 5 13:16:15 2014 +0100
https://developer.blender.org/rB8acf717b6d14231e99c6755d8f88eec835a33126

Fix T38471: parenting in the outliner was possible with library linked objects.

===================================================================

M       source/blender/editors/space_outliner/outliner_edit.c

===================================================================

diff --git a/source/blender/editors/space_outliner/outliner_edit.c 
b/source/blender/editors/space_outliner/outliner_edit.c
index f80937b..91b8554 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);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to