[Bf-blender-cvs] [6ac79a7dfbc] soc-2020-outliner: Outliner: Remove need to hold shift when parenting

Nathan Craddock noreply at git.blender.org
Wed Jul 8 22:26:54 CEST 2020


Commit: 6ac79a7dfbcc03e8ee77ee4e2c291bd360aa0073
Author: Nathan Craddock
Date:   Tue Jul 7 11:32:58 2020 -0600
Branches: soc-2020-outliner
https://developer.blender.org/rB6ac79a7dfbcc03e8ee77ee4e2c291bd360aa0073

Outliner: Remove need to hold shift when parenting

https://developer.blender.org/D3812 discussed reasons why holding shift
to parent was needed. Now in the outliner we show child-parent
relationships clearly in View Layer mode so this extra modifer key is
not needed.

When dropping over an object name the parent operator is used, and when
dropping anywhere outside the object name will move to collection.

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

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

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

diff --git a/source/blender/editors/space_outliner/outliner_dragdrop.c b/source/blender/editors/space_outliner/outliner_dragdrop.c
index dc6e4571944..aa5842fafc5 100644
--- a/source/blender/editors/space_outliner/outliner_dragdrop.c
+++ b/source/blender/editors/space_outliner/outliner_dragdrop.c
@@ -294,18 +294,6 @@ static bool parent_drop_allowed(TreeElement *te, Object *potential_child)
   return true;
 }
 
-static bool allow_parenting_without_modifier_key(SpaceOutliner *soops)
-{
-  switch (soops->outlinevis) {
-    case SO_VIEW_LAYER:
-      return soops->filter & SO_FILTER_NO_COLLECTION;
-    case SO_SCENES:
-      return true;
-    default:
-      return false;
-  }
-}
-
 static bool parent_drop_poll(bContext *C,
                              wmDrag *drag,
                              const wmEvent *event,
@@ -323,12 +311,6 @@ static bool parent_drop_poll(bContext *C,
     return false;
   }
 
-  if (!allow_parenting_without_modifier_key(soops)) {
-    if (!event->shift) {
-      return false;
-    }
-  }
-
   TreeElement *te = outliner_drop_find(C, event);
   if (!te) {
     return false;
@@ -450,14 +432,6 @@ static bool parent_clear_poll(bContext *C,
                               const wmEvent *event,
                               const char **UNUSED(r_tooltip))
 {
-  SpaceOutliner *soops = CTX_wm_space_outliner(C);
-
-  if (!allow_parenting_without_modifier_key(soops)) {
-    if (!event->shift) {
-      return false;
-    }
-  }
-
   Object *ob = (Object *)WM_drag_ID(drag, ID_OB);
   if (!ob) {
     return false;



More information about the Bf-blender-cvs mailing list