pedantic naming: wmKeyMapItem wasnt called 'kmi' in some cases.
authorCampbell Barton <ideasman42@gmail.com>
Thu, 24 Dec 2009 09:36:15 +0000 (09:36 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 24 Dec 2009 09:36:15 +0000 (09:36 +0000)
source/blender/editors/object/object_ops.c
source/blender/makesrna/intern/rna_wm.c
source/blender/windowmanager/intern/wm_operators.c

index 7b11bc5895011ea890e20eb274132c928fe41662..8272d989718c23cd097cd4624870c518f29b835a 100644 (file)
@@ -336,23 +336,23 @@ void ED_keymap_object(wmKeyConfig *keyconf)
 
 void ED_object_generic_keymap(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap, int do_pet)
 {
-       wmKeyMapItem *km;
+       wmKeyMapItem *kmi;
 
        /* used by mesh, curve & lattice only */
        if(do_pet) {
                /* context ops */
-               km = WM_keymap_add_item(keymap, "WM_OT_context_cycle_enum", OKEY, KM_PRESS, KM_SHIFT, 0);
-               RNA_string_set(km->ptr, "path", "tool_settings.proportional_editing_falloff");
-
-               km = WM_keymap_add_item(keymap, "WM_OT_context_toggle_enum", OKEY, KM_PRESS, 0, 0);
-               RNA_string_set(km->ptr, "path", "tool_settings.proportional_editing");
-               RNA_string_set(km->ptr, "value_1", "DISABLED");
-               RNA_string_set(km->ptr, "value_2", "ENABLED");
-
-               km = WM_keymap_add_item(keymap, "WM_OT_context_toggle_enum", OKEY, KM_PRESS, KM_ALT, 0);
-               RNA_string_set(km->ptr, "path", "tool_settings.proportional_editing");
-               RNA_string_set(km->ptr, "value_1", "DISABLED");
-               RNA_string_set(km->ptr, "value_2", "CONNECTED");
+               kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_enum", OKEY, KM_PRESS, KM_SHIFT, 0);
+               RNA_string_set(kmi->ptr, "path", "tool_settings.proportional_editing_falloff");
+
+               kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle_enum", OKEY, KM_PRESS, 0, 0);
+               RNA_string_set(kmi->ptr, "path", "tool_settings.proportional_editing");
+               RNA_string_set(kmi->ptr, "value_1", "DISABLED");
+               RNA_string_set(kmi->ptr, "value_2", "ENABLED");
+
+               kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle_enum", OKEY, KM_PRESS, KM_ALT, 0);
+               RNA_string_set(kmi->ptr, "path", "tool_settings.proportional_editing");
+               RNA_string_set(kmi->ptr, "value_1", "DISABLED");
+               RNA_string_set(kmi->ptr, "value_2", "CONNECTED");
        }
 }
 
index ca6d8959d000894c0b43cfcada21e2c22accb70a..3a708cc856349081e9ded001ac10b276b19f6852 100644 (file)
@@ -453,9 +453,9 @@ static EnumPropertyItem *rna_KeyMapItem_propvalue_itemf(bContext *C, PointerRNA
 
        /* check user keymaps */
        for(km=U.keymaps.first; km; km=km->next) {
-               wmKeyMapItem *ki;
-               for (ki=km->items.first; ki; ki=ki->next) {
-                       if (ki == ptr->data) {
+               wmKeyMapItem *kmi;
+               for (kmi=km->items.first; kmi; kmi=kmi->next) {
+                       if (kmi == ptr->data) {
                                if (!km->modal_items) {
                                        if (!WM_keymap_user_init(wm, km)) {
                                                return keymap_propvalue_items; /* ERROR */
@@ -471,9 +471,9 @@ static EnumPropertyItem *rna_KeyMapItem_propvalue_itemf(bContext *C, PointerRNA
                for(km=kc->keymaps.first; km; km=km->next) {
                        /* only check if it's a modal keymap */
                        if (km->modal_items) {
-                               wmKeyMapItem *ki;
-                               for (ki=km->items.first; ki; ki=ki->next) {
-                                       if (ki == ptr->data) {
+                               wmKeyMapItem *kmi;
+                               for (kmi=km->items.first; kmi; kmi=kmi->next) {
+                                       if (kmi == ptr->data) {
                                                return km->modal_items;
                                        }
                                }
index d65580681eb4916c3d40c95f5e7f3fb33c64220b..4ad067e874362c74707b488e515300e62feb9c83 100644 (file)
@@ -2802,7 +2802,7 @@ static void gesture_border_modal_keymap(wmKeyConfig *keyconf)
 void wm_window_keymap(wmKeyConfig *keyconf)
 {
        wmKeyMap *keymap= WM_keymap_find(keyconf, "Window", 0, 0);
-       wmKeyMapItem *km;
+       wmKeyMapItem *kmi;
        
        /* note, this doesn't replace existing keymap items */
        WM_keymap_verify_item(keymap, "WM_OT_window_duplicate", WKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
@@ -2820,8 +2820,8 @@ void wm_window_keymap(wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "WM_OT_open_mainfile", OKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "WM_OT_open_mainfile", F1KEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "WM_OT_link_append", OKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
-       km= WM_keymap_add_item(keymap, "WM_OT_link_append", F1KEY, KM_PRESS, KM_SHIFT, 0);
-       RNA_boolean_set(km->ptr, "link", FALSE);
+       kmi= WM_keymap_add_item(keymap, "WM_OT_link_append", F1KEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_boolean_set(kmi->ptr, "link", FALSE);
 
        WM_keymap_add_item(keymap, "WM_OT_save_mainfile", SKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "WM_OT_save_mainfile", WKEY, KM_PRESS, KM_CTRL, 0);
@@ -2839,49 +2839,49 @@ void wm_window_keymap(wmKeyConfig *keyconf)
        /* Space switching */
 
 
-       km = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F2KEY, KM_PRESS, KM_SHIFT, 0); /* new in 2.5x, was DXF export */
-       RNA_string_set(km->ptr, "path", "area.type");
-       RNA_string_set(km->ptr, "value", "LOGIC_EDITOR");
+       kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F2KEY, KM_PRESS, KM_SHIFT, 0); /* new in 2.5x, was DXF export */
+       RNA_string_set(kmi->ptr, "path", "area.type");
+       RNA_string_set(kmi->ptr, "value", "LOGIC_EDITOR");
 
-       km = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F3KEY, KM_PRESS, KM_SHIFT, 0);
-       RNA_string_set(km->ptr, "path", "area.type");
-       RNA_string_set(km->ptr, "value", "NODE_EDITOR");
+       kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F3KEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_string_set(kmi->ptr, "path", "area.type");
+       RNA_string_set(kmi->ptr, "value", "NODE_EDITOR");
 
-       km = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F4KEY, KM_PRESS, KM_SHIFT, 0); /* new in 2.5x, was data browser */
-       RNA_string_set(km->ptr, "path", "area.type");
-       RNA_string_set(km->ptr, "value", "CONSOLE");
+       kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F4KEY, KM_PRESS, KM_SHIFT, 0); /* new in 2.5x, was data browser */
+       RNA_string_set(kmi->ptr, "path", "area.type");
+       RNA_string_set(kmi->ptr, "value", "CONSOLE");
 
-       km = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F5KEY, KM_PRESS, KM_SHIFT, 0);
-       RNA_string_set(km->ptr, "path", "area.type");
-       RNA_string_set(km->ptr, "value", "VIEW_3D");
+       kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F5KEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_string_set(kmi->ptr, "path", "area.type");
+       RNA_string_set(kmi->ptr, "value", "VIEW_3D");
 
-       km = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F6KEY, KM_PRESS, KM_SHIFT, 0);
-       RNA_string_set(km->ptr, "path", "area.type");
-       RNA_string_set(km->ptr, "value", "GRAPH_EDITOR");
+       kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F6KEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_string_set(kmi->ptr, "path", "area.type");
+       RNA_string_set(kmi->ptr, "value", "GRAPH_EDITOR");
 
-       km = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F7KEY, KM_PRESS, KM_SHIFT, 0);
-       RNA_string_set(km->ptr, "path", "area.type");
-       RNA_string_set(km->ptr, "value", "PROPERTIES");
+       kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F7KEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_string_set(kmi->ptr, "path", "area.type");
+       RNA_string_set(kmi->ptr, "value", "PROPERTIES");
 
-       km = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F8KEY, KM_PRESS, KM_SHIFT, 0);
-       RNA_string_set(km->ptr, "path", "area.type");
-       RNA_string_set(km->ptr, "value", "SEQUENCE_EDITOR");
+       kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F8KEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_string_set(kmi->ptr, "path", "area.type");
+       RNA_string_set(kmi->ptr, "value", "SEQUENCE_EDITOR");
 
-       km = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F9KEY, KM_PRESS, KM_SHIFT, 0);
-       RNA_string_set(km->ptr, "path", "area.type");
-       RNA_string_set(km->ptr, "value", "OUTLINER");
+       kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F9KEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_string_set(kmi->ptr, "path", "area.type");
+       RNA_string_set(kmi->ptr, "value", "OUTLINER");
 
-       km = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F10KEY, KM_PRESS, KM_SHIFT, 0);
-       RNA_string_set(km->ptr, "path", "area.type");
-       RNA_string_set(km->ptr, "value", "IMAGE_EDITOR");
+       kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F10KEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_string_set(kmi->ptr, "path", "area.type");
+       RNA_string_set(kmi->ptr, "value", "IMAGE_EDITOR");
 
-       km = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F11KEY, KM_PRESS, KM_SHIFT, 0);
-       RNA_string_set(km->ptr, "path", "area.type");
-       RNA_string_set(km->ptr, "value", "TEXT_EDITOR");
+       kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F11KEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_string_set(kmi->ptr, "path", "area.type");
+       RNA_string_set(kmi->ptr, "value", "TEXT_EDITOR");
 
-       km = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F12KEY, KM_PRESS, KM_SHIFT, 0);
-       RNA_string_set(km->ptr, "path", "area.type");
-       RNA_string_set(km->ptr, "value", "DOPESHEET_EDITOR");
+       kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F12KEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_string_set(kmi->ptr, "path", "area.type");
+       RNA_string_set(kmi->ptr, "value", "DOPESHEET_EDITOR");
 
        gesture_circle_modal_keymap(keyconf);
        gesture_border_modal_keymap(keyconf);