[Bf-blender-cvs] [8acd58a1a91] master: Cleanup: Remove dead code for keymap Outliner display mode

Julian Eisel noreply at git.blender.org
Mon Feb 8 10:33:53 CET 2021


Commit: 8acd58a1a910663503b661d6cde40ead8302861b
Author: Julian Eisel
Date:   Mon Feb 8 03:05:23 2021 +0100
Branches: master
https://developer.blender.org/rB8acd58a1a910663503b661d6cde40ead8302861b

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.

===================================================================

M	source/blender/editors/space_outliner/outliner_select.c
M	source/blender/editors/space_outliner/outliner_tree.c
M	source/blender/makesdna/DNA_outliner_types.h

===================================================================

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))



More information about the Bf-blender-cvs mailing list