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:
authorDalai Felinto <dfelinto@gmail.com>2018-03-28 20:54:17 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-03-28 23:14:51 +0300
commitf167226b793e5dd39816f0b250771177d088dc54 (patch)
tree96b569a678b998f4f8b869192bd4bedf19219663 /source/blender/editors/object/object_intern.h
parent205fe8afd7011ca8db2dc14579dec6a088b9086f (diff)
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
Diffstat (limited to 'source/blender/editors/object/object_intern.h')
-rw-r--r--source/blender/editors/object/object_intern.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_intern.h b/source/blender/editors/object/object_intern.h
index a3bb01b0f24..ef51452a983 100644
--- a/source/blender/editors/object/object_intern.h
+++ b/source/blender/editors/object/object_intern.h
@@ -95,6 +95,8 @@ void OBJECT_OT_game_property_move(struct wmOperatorType *ot);
void OBJECT_OT_logic_bricks_copy(struct wmOperatorType *ot);
void OBJECT_OT_game_physics_copy(struct wmOperatorType *ot);
+void OBJECT_OT_move_to_collection(struct wmOperatorType *ot);
+
/* object_select.c */
void OBJECT_OT_select_all(struct wmOperatorType *ot);
void OBJECT_OT_select_random(struct wmOperatorType *ot);