diff options
author | Julian Eisel <julian@blender.org> | 2021-02-08 05:05:23 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2021-02-08 12:32:18 +0300 |
commit | 8acd58a1a910663503b661d6cde40ead8302861b (patch) | |
tree | 92f6f3480411bd2565a16b12cab1efd078db85c2 | |
parent | 04be1e9980a1f413446353393e713b4660176ca7 (diff) |
Cleanup: Remove dead code for keymap Outliner display mode
This wasn't used for a long time and there are no plans to bring this back.
-rw-r--r-- | source/blender/editors/space_outliner/outliner_select.c | 21 | ||||
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tree.c | 47 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_outliner_types.h | 18 |
3 files changed, 8 insertions, 78 deletions
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index 1ef5735d7d2..4a58736966c 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -927,25 +927,6 @@ static eOLDrawState tree_element_active_sequence_dup(Scene *scene, return OL_DRAWSEL_NONE; } -static eOLDrawState tree_element_active_keymap_item(bContext *UNUSED(C), - Scene *UNUSED(scene), - ViewLayer *UNUSED(sl), - TreeElement *te, - TreeStoreElem *UNUSED(tselem), - const eOLSetState set) -{ - wmKeyMapItem *kmi = te->directdata; - - if (set == OL_SETSEL_NONE) { - if (kmi->flag & KMI_INACTIVE) { - return OL_DRAWSEL_NONE; - } - return OL_DRAWSEL_NORMAL; - } - kmi->flag ^= KMI_INACTIVE; - return OL_DRAWSEL_NONE; -} - static eOLDrawState tree_element_active_master_collection(bContext *C, TreeElement *UNUSED(te), const eOLSetState set) @@ -1071,8 +1052,6 @@ eOLDrawState tree_element_type_active(bContext *C, return tree_element_active_sequence(C, tvc->scene, te, tselem, set); case TSE_SEQUENCE_DUP: return tree_element_active_sequence_dup(tvc->scene, te, tselem, set); - case TSE_KEYMAP_ITEM: - return tree_element_active_keymap_item(C, tvc->scene, tvc->view_layer, te, tselem, set); case TSE_GP_LAYER: return tree_element_active_gplayer(C, tvc->scene, te, tselem, set); break; diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index 7df6115cb06..f94f19246fa 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -991,9 +991,6 @@ TreeElement *outliner_add_element(SpaceOutliner *space_outliner, else if (type == TSE_ID_BASE) { /* pass */ } - else if (ELEM(type, TSE_KEYMAP, TSE_KEYMAP_ITEM)) { - /* pass */ - } else { /* Other cases must be caught above. */ BLI_assert(TSE_IS_REAL_ID(tselem)); @@ -1214,50 +1211,6 @@ TreeElement *outliner_add_element(SpaceOutliner *space_outliner, te->flag |= TE_FREE_NAME; } } - else if (type == TSE_KEYMAP) { - wmKeyMap *km = (wmKeyMap *)idv; - char opname[OP_MAX_TYPENAME]; - - te->directdata = idv; - te->name = km->idname; - - if (TSELEM_OPEN(tselem, space_outliner)) { - int a; - LISTBASE_FOREACH_INDEX (wmKeyMapItem *, kmi, &km->items, a) { - const char *key = WM_key_event_string(kmi->type, false); - - if (key[0]) { - wmOperatorType *ot = NULL; - - if (kmi->propvalue) { - /* pass */ - } - else { - ot = WM_operatortype_find(kmi->idname, 0); - } - - if (ot || kmi->propvalue) { - TreeElement *ten = outliner_add_element( - space_outliner, &te->subtree, kmi, te, TSE_KEYMAP_ITEM, a); - - ten->directdata = kmi; - - if (kmi->propvalue) { - ten->name = IFACE_("Modal map, not yet"); - } - else { - WM_operator_py_idname(opname, ot->idname); - ten->name = BLI_strdup(opname); - ten->flag |= TE_FREE_NAME; - } - } - } - } - } - else { - te->flag |= TE_LAZY_CLOSED; - } - } return te; } diff --git a/source/blender/makesdna/DNA_outliner_types.h b/source/blender/makesdna/DNA_outliner_types.h index 8a8a40a5069..44d808138d9 100644 --- a/source/blender/makesdna/DNA_outliner_types.h +++ b/source/blender/makesdna/DNA_outliner_types.h @@ -103,14 +103,14 @@ enum { #define TSE_SEQ_STRIP 27 /* NO ID */ #define TSE_SEQUENCE_DUP 28 /* NO ID */ #define TSE_LINKED_PSYS 29 -#define TSE_RNA_STRUCT 30 /* NO ID */ -#define TSE_RNA_PROPERTY 31 /* NO ID */ -#define TSE_RNA_ARRAY_ELEM 32 /* NO ID */ -#define TSE_NLA_TRACK 33 /* NO ID */ -#define TSE_KEYMAP 34 /* NO ID */ -#define TSE_KEYMAP_ITEM 35 /* NO ID */ -#define TSE_ID_BASE 36 /* NO ID */ -#define TSE_GP_LAYER 37 /* NO ID */ +#define TSE_RNA_STRUCT 30 /* NO ID */ +#define TSE_RNA_PROPERTY 31 /* NO ID */ +#define TSE_RNA_ARRAY_ELEM 32 /* NO ID */ +#define TSE_NLA_TRACK 33 /* NO ID */ +/* #define TSE_KEYMAP 34 */ /* UNUSED */ +/* #define TSE_KEYMAP_ITEM 35 */ /* UNUSED */ +#define TSE_ID_BASE 36 /* NO ID */ +#define TSE_GP_LAYER 37 /* NO ID */ #define TSE_LAYER_COLLECTION 38 #define TSE_SCENE_COLLECTION_BASE 39 #define TSE_VIEW_COLLECTION_BASE 40 @@ -132,8 +132,6 @@ enum { TSE_RNA_STRUCT, \ TSE_RNA_PROPERTY, \ TSE_RNA_ARRAY_ELEM, \ - TSE_KEYMAP, \ - TSE_KEYMAP_ITEM, \ TSE_ID_BASE, \ TSE_GP_LAYER)) |