diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2017-03-02 19:11:09 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2017-03-02 19:15:30 +0300 |
commit | 0322700d875a1d518a730512531a881f1278124b (patch) | |
tree | b668e69e366d6621256603c3ef7f8dc4219ab3af /source/blender/editors/space_outliner/outliner_intern.h | |
parent | 146a88dd60aa20b526ecae2f3f4c2512e1f4d4f0 (diff) |
Get UI ready for using drag & drop to nest a collection into another one
Nothing happen yet when it's supposed to insert the collection into
another one, that part will be handled by @dfelinto.
See gif for demo of how it works UI wise: {F500337}
Also fixed off-by-one error in utility function.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_intern.h')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_intern.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h index 731b5041bd9..4cee0e44fca 100644 --- a/source/blender/editors/space_outliner/outliner_intern.h +++ b/source/blender/editors/space_outliner/outliner_intern.h @@ -49,6 +49,12 @@ struct EditBone; struct wmKeyConfig; +typedef enum TreeElementInsertType { + /* no INSERT_BEFORE needed for now */ + TE_INSERT_AFTER, + TE_INSERT_INTO, +} TreeElementInsertType; + typedef enum TreeTraversalAction { /* Continue traversal regularly, don't skip children. */ TRAVERSE_CONTINUE = 0, @@ -63,7 +69,7 @@ typedef enum TreeTraversalAction { * Passing scene right now, may be better to allow some custom data. */ typedef void (*TreeElementReinsertFunc)(const struct Scene *scene, struct TreeElement *insert_element, - struct TreeElement *insert_after); + struct TreeElement *insert_handle, TreeElementInsertType action); typedef TreeTraversalAction (*TreeTraversalFunc)(struct TreeElement *te, void *customdata); @@ -84,8 +90,9 @@ typedef struct TreeElement { TreeElementReinsertFunc reinsert; struct { + TreeElementInsertType insert_type; /* the element after which we may insert the dragged one (NULL to insert at top) */ - struct TreeElement *insert_te; + struct TreeElement *insert_handle; } *drag_data; } TreeElement; |