diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2018-01-05 23:09:58 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2018-01-05 23:23:55 +0300 |
commit | fb4cd136a7cf94f2fda2d3a2c8fb01d73eb878cb (patch) | |
tree | 5bb945d9d64b67c2de0c89149feaa0769a37d0e9 /source/blender/editors/space_outliner/outliner_ops.c | |
parent | 9d134a22c225d5b57933efaba6c62c42377ebd18 (diff) |
Outliner: Support multiple-objects drag'n'drop into collections
We now can drag multiple objects at once in the outliner. You we restricted to
working within a single outliner. Be sure to drag from the objects name, not
from its icon (otherwise it will try to parent it).
We don't use the same drag'n'drop system as IDs here. Which although I dislike
allowed for this solution to be local, and not dependent on the entire
drag'n'drop system of Blender.
This is a feature Andy Goralczyk has requested a long time ago.
Kudos for him for his request.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_ops.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_ops.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_outliner/outliner_ops.c b/source/blender/editors/space_outliner/outliner_ops.c index a40abb5fd3b..57c93e19612 100644 --- a/source/blender/editors/space_outliner/outliner_ops.c +++ b/source/blender/editors/space_outliner/outliner_ops.c @@ -164,7 +164,7 @@ static void outliner_item_drag_handle( te_dragged->drag_data->insert_handle = te_insert_handle; } -static bool outliner_item_drag_drop_apply(Main *bmain, TreeElement *dragged_te) +static bool outliner_item_drag_drop_apply(Main *bmain, SpaceOops *soops, TreeElement *dragged_te) { TreeElement *insert_handle = dragged_te->drag_data->insert_handle; TreeElementInsertType insert_type = dragged_te->drag_data->insert_type; @@ -178,7 +178,7 @@ static bool outliner_item_drag_drop_apply(Main *bmain, TreeElement *dragged_te) /* call of assert above should not have changed insert_handle and insert_type at this point */ BLI_assert(dragged_te->drag_data->insert_handle == insert_handle && dragged_te->drag_data->insert_type == insert_type); - dragged_te->reinsert(bmain, dragged_te, insert_handle, insert_type); + dragged_te->reinsert(bmain, soops, dragged_te, insert_handle, insert_type); return true; } @@ -198,7 +198,7 @@ static int outliner_item_drag_drop_modal(bContext *C, wmOperator *op, const wmEv switch (event->type) { case EVT_MODAL_MAP: if (event->val == OUTLINER_ITEM_DRAG_CONFIRM) { - if (outliner_item_drag_drop_apply(bmain, te_dragged)) { + if (outliner_item_drag_drop_apply(bmain, soops, te_dragged)) { skip_rebuild = false; } retval = OPERATOR_FINISHED; |