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:
authorNathan Craddock <nzcraddock@gmail.com>2020-06-19 21:35:09 +0300
committerNathan Craddock <nzcraddock@gmail.com>2020-06-19 21:43:01 +0300
commit702e00f91088031f83cfed1528d5ed22069a9d35 (patch)
tree4a97e1ce2e86d9c18086f80f659d6c7a48a33019 /source/blender/editors/space_outliner/outliner_intern.h
parentec963d9d7d179e3ba12f5bdf748818939c2f17d8 (diff)
Outliner: Selection cleanup
No functional changes. The outliner selection operators shared many different functions for selection, activation, mode toggling, and other actions, but the code paths were not always clear, making any changes difficult. This cleans up the code and uses outliner_item_select() as the base function for selection, activation, mode toggling between the different selection operators. It also prepares for future features and fixes. Reviewed By: Severin Differential Revision: https://developer.blender.org/D5817
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_intern.h')
-rw-r--r--source/blender/editors/space_outliner/outliner_intern.h23
1 files changed, 15 insertions, 8 deletions
diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h
index 32a67d57d0f..dae8f8a91ce 100644
--- a/source/blender/editors/space_outliner/outliner_intern.h
+++ b/source/blender/editors/space_outliner/outliner_intern.h
@@ -216,6 +216,16 @@ typedef struct TreeViewContext {
Object *ob_pose;
} TreeViewContext;
+typedef enum TreeItemSelectAction {
+ OL_ITEM_DESELECT = 0, /* Deselect the item */
+ OL_ITEM_SELECT = (1 << 0), /* Select the item */
+ OL_ITEM_SELECT_DATA = (1 << 1), /* Select object data */
+ OL_ITEM_ACTIVATE = (1 << 2), /* Activate the item */
+ OL_ITEM_EXTEND = (1 << 3), /* Extend the current selection */
+ OL_ITEM_RECURSIVE = (1 << 4), /* Select recursively */
+ OL_ITEM_TOGGLE_MODE = (1 << 5) /* Temporary */
+} TreeItemSelectAction;
+
/* outliner_tree.c ----------------------------------------------- */
void outliner_free_tree(ListBase *tree);
@@ -268,20 +278,17 @@ eOLDrawState tree_element_active(struct bContext *C,
const eOLSetState set,
const bool handle_all_types);
-void outliner_item_do_activate_from_tree_element(
- struct bContext *C, TreeElement *te, TreeStoreElem *tselem, bool extend, bool recursive);
-
-void outliner_item_select(struct SpaceOutliner *soops,
- const struct TreeElement *te,
- const bool extend,
- const bool toggle);
+void outliner_item_select(struct bContext *C,
+ struct SpaceOutliner *soops,
+ struct TreeElement *te,
+ const short select_flag);
void outliner_object_mode_toggle(struct bContext *C,
Scene *scene,
ViewLayer *view_layer,
Base *base);
-void outliner_element_activate(struct SpaceOutliner *soops, struct TreeStoreElem *tselem);
+void outliner_set_walk_element(struct SpaceOutliner *soops, struct TreeStoreElem *tselem);
bool outliner_item_is_co_over_name_icons(const TreeElement *te, float view_co_x);
bool outliner_item_is_co_within_close_toggle(const TreeElement *te, float view_co_x);