Blender Git Commit Log

Git Commits -> Revision f167226

Revision f167226 by Dalai Felinto (master)
March 28, 2018, 20:14 (GMT)
Move to Collection - initial operator

How to use: Select a few objects, and press "M" in the viewport.

If you hold ctrl the objects will be added to the selected collection.
Otherwise they are removed from all their original collections and moved
to the selected one instead.

Development Notes
=================
The ideal solution would be to implement an elegant generic multi-level
menu system similar to toolbox_generic() in 2.49.

Instead I used `uiItemMenuF` to acchieve the required nesting of the menus.

The downside is that `uiItemMenuF` requires the data its callback uses to be
always valid until the menu is discarded. But since there is no callback we
can call when the menu is discarded for operators that exited with
`OPERATOR_INTERFACE`.

That means we are using static allocated data, that is only freed next time
the operator is called. Which also means there will always be some
memory leakage.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D3117

Commit Details:

Full Hash: f167226b793e5dd39816f0b250771177d088dc54
Parent Commit: 205fe8a
Lines Changed: +287, -12

4 Modified Paths:

/source/blender/blenkernel/intern/collection.c (+36, -12) (Diff)
/source/blender/editors/object/object_edit.c (+245, -0) (Diff)
/source/blender/editors/object/object_intern.h (+2, -0) (Diff)
/source/blender/editors/object/object_ops.c (+4, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021