more keymap edits
authorCampbell Barton <ideasman42@gmail.com>
Mon, 16 Jan 2012 16:12:03 +0000 (16:12 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 16 Jan 2012 16:12:03 +0000 (16:12 +0000)
- make sure defaults are not assumed (so reuse last settings doesnt
override)
- replace 0/1 for TRUE/FALSE defines.

31 files changed:
source/blender/blenkernel/intern/softbody.c
source/blender/editors/animation/anim_channels_edit.c
source/blender/editors/animation/anim_markers.c
source/blender/editors/animation/keyframing.c
source/blender/editors/armature/armature_ops.c
source/blender/editors/curve/curve_ops.c
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/view2d_ops.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/mesh/mesh_ops.c
source/blender/editors/metaball/mball_ops.c
source/blender/editors/object/object_add.c
source/blender/editors/object/object_ops.c
source/blender/editors/physics/physics_ops.c
source/blender/editors/render/render_opengl.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/sculpt_paint/paint_ops.c
source/blender/editors/space_clip/clip_ops.c
source/blender/editors/space_clip/space_clip.c
source/blender/editors/space_console/space_console.c
source/blender/editors/space_graph/graph_ops.c
source/blender/editors/space_nla/nla_ops.c
source/blender/editors/space_node/node_ops.c
source/blender/editors/space_outliner/outliner_ops.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_sequencer/sequencer_ops.c
source/blender/editors/space_text/space_text.c
source/blender/editors/space_view3d/view3d_header.c
source/blender/editors/space_view3d/view3d_ops.c
source/blender/editors/uvedit/uvedit_ops.c

index 8d20a06..46a3f77 100644 (file)
@@ -3468,7 +3468,7 @@ static void makelatticesprings(Lattice *lt,       BodySpring *bs, int dostiff,Object *
                                                        bs->len= globallen((bp-dw-dv-1)->vec, bp->vec,ob);
                                                        bs++;
                                                }
-                                               if( (v < lt->pntsv-1) && (u) ) {
+                                               if( (v < lt->pntsv-1) && (u != 0) ) {
                                                        bs->v1 = bpc;
                                                        bs->v2 = bpc-dw+dv-1;
                                                        bs->springtype=SB_BEND;
@@ -3485,7 +3485,7 @@ static void makelatticesprings(Lattice *lt,       BodySpring *bs, int dostiff,Object *
                                                        bs->len= globallen((bp+dw-dv-1)->vec, bp->vec,ob);
                                                        bs++;
                                                }
-                                               if( (v < lt->pntsv-1) && (u) ) {
+                                               if( (v < lt->pntsv-1) && (u != 0) ) {
                                                        bs->v1 = bpc;
                                                        bs->v2 = bpc+dw+dv-1;
                                                        bs->springtype=SB_BEND;
index a21c394..a7c37d3 100644 (file)
@@ -2424,20 +2424,21 @@ void ED_operatortypes_animchannels(void)
 void ED_keymap_animchannels(wmKeyConfig *keyconf)
 {
        wmKeyMap *keymap = WM_keymap_find(keyconf, "Animation Channels", 0, 0);
-       
+       wmKeyMapItem *kmi;
+
        /* selection */
                /* click-select */
                // XXX for now, only leftmouse.... 
        WM_keymap_add_item(keymap, "ANIM_OT_channels_click", LEFTMOUSE, KM_PRESS, 0, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", 1);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_CTRL|KM_SHIFT, 0)->ptr, "children_only", 1);
+       RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", TRUE);
+       RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_CTRL|KM_SHIFT, 0)->ptr, "children_only", TRUE);
        
                /* rename */
        WM_keymap_add_item(keymap, "ANIM_OT_channels_rename", LEFTMOUSE, KM_PRESS, KM_CTRL, 0);
        
                /* deselect all */
        WM_keymap_add_item(keymap, "ANIM_OT_channels_select_all_toggle", AKEY, KM_PRESS, 0, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "invert", 1);
+       RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "invert", TRUE);
        
                /* borderselect */
        WM_keymap_add_item(keymap, "ANIM_OT_channels_select_border", BKEY, KM_PRESS, 0, 0);
@@ -2459,9 +2460,11 @@ void ED_keymap_animchannels(wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "ANIM_OT_channels_expand", PADPLUSKEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "ANIM_OT_channels_collapse", PADMINUS, KM_PRESS, 0, 0);
        
-       RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_expand", PADPLUSKEY, KM_PRESS, KM_CTRL, 0)->ptr, "all", 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_collapse", PADMINUS, KM_PRESS, KM_CTRL, 0)->ptr, "all", 0);
-       
+       kmi = WM_keymap_add_item(keymap, "ANIM_OT_channels_expand", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
+       RNA_boolean_set(kmi->ptr, "all", FALSE);
+       kmi = WM_keymap_add_item(keymap, "ANIM_OT_channels_collapse", PADMINUS, KM_PRESS, KM_CTRL, 0);
+       RNA_boolean_set(kmi->ptr, "all", FALSE);
+
        /* rearranging */
        RNA_enum_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_move", PAGEUPKEY, KM_PRESS, 0, 0)->ptr, "direction", REARRANGE_ANIMCHAN_UP);
        RNA_enum_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_move", PAGEDOWNKEY, KM_PRESS, 0, 0)->ptr, "direction", REARRANGE_ANIMCHAN_DOWN);
index e17aea3..216bb8d 100644 (file)
@@ -1490,7 +1490,8 @@ void ED_marker_keymap(wmKeyConfig *keyconf)
        WM_keymap_verify_item(keymap, "MARKER_OT_move", EVT_TWEAK_S, KM_ANY, 0, 0);
        WM_keymap_verify_item(keymap, "MARKER_OT_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0);
        WM_keymap_verify_item(keymap, "MARKER_OT_select", SELECTMOUSE, KM_PRESS, 0, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "MARKER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", 1);
+       kmi = WM_keymap_add_item(keymap, "MARKER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
+       RNA_boolean_set(kmi->ptr, "extend", TRUE);
 
 #ifdef DURIAN_CAMERA_SWITCH
        kmi= WM_keymap_add_item(keymap, "MARKER_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
index 5431498..84206c4 100644 (file)
@@ -1200,7 +1200,7 @@ static int insert_key_menu_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(
        else {
                /* just call the exec() on the active keyingset */
                RNA_enum_set(op->ptr, "type", 0);
-               RNA_boolean_set(op->ptr, "confirm_success", 1);
+               RNA_boolean_set(op->ptr, "confirm_success", TRUE);
                
                return op->type->exec(C, op);
        }
index 29cdf6a..7379a27 100644 (file)
@@ -182,7 +182,7 @@ void ED_operatormacros_armature(void)
        if(ot) {
                ot->description= "Create new bones from the selected joints and move them";
                otmacro=WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude");
-               RNA_boolean_set(otmacro->ptr, "forked", 0);
+               RNA_boolean_set(otmacro->ptr, "forked", FALSE);
                otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
                RNA_enum_set(otmacro->ptr, "proportional", 0);
        }
@@ -193,7 +193,7 @@ void ED_operatormacros_armature(void)
        if(ot) {
                ot->description= "Create new bones from the selected joints and move them";
                otmacro=WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude");
-               RNA_boolean_set(otmacro->ptr, "forked", 1);
+               RNA_boolean_set(otmacro->ptr, "forked", TRUE);
                otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
                RNA_enum_set(otmacro->ptr, "proportional", 0);
        }
index 60fca7a..b213f79 100644 (file)
@@ -145,14 +145,14 @@ void ED_operatormacros_curve(void)
        WM_operatortype_macro_define(ot, "CURVE_OT_duplicate");
        otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
        RNA_enum_set(otmacro->ptr, "proportional", 0);
-       RNA_boolean_set(otmacro->ptr, "mirror", 0);
+       RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
 
        ot= WM_operatortype_append_macro("CURVE_OT_extrude_move", "Extrude Curve and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
        ot->description = "Extrude curve and move result";
        WM_operatortype_macro_define(ot, "CURVE_OT_extrude");
        otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
        RNA_enum_set(otmacro->ptr, "proportional", 0);
-       RNA_boolean_set(otmacro->ptr, "mirror", 0);
+       RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
 }
 
 void ED_keymap_curve(wmKeyConfig *keyconf)
@@ -210,7 +210,8 @@ void ED_keymap_curve(wmKeyConfig *keyconf)
 
        WM_keymap_add_item(keymap, "FONT_OT_line_break", RETKEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "FONT_OT_text_insert", KM_TEXTINPUT, KM_ANY, KM_ANY, 0); // last!
-       RNA_boolean_set(WM_keymap_add_item(keymap, "FONT_OT_text_insert", BACKSPACEKEY, KM_PRESS, KM_ALT, 0)->ptr, "accent", 1); // accented characters
+       kmi = WM_keymap_add_item(keymap, "FONT_OT_text_insert", BACKSPACEKEY, KM_PRESS, KM_ALT, 0);
+       RNA_boolean_set(kmi->ptr, "accent", TRUE); /* accented characters */
 
        /* only set in editmode curve, by space_view3d listener */
        keymap= WM_keymap_find(keyconf, "Curve", 0, 0);
@@ -231,8 +232,11 @@ void ED_keymap_curve(wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "CURVE_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "CURVE_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "CURVE_OT_select_linked", LKEY, KM_PRESS, KM_CTRL, 0);
-       WM_keymap_add_item(keymap, "CURVE_OT_select_linked_pick", LKEY, KM_PRESS, 0, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "CURVE_OT_select_linked_pick", LKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "deselect", 1);
+
+       kmi = WM_keymap_add_item(keymap, "CURVE_OT_select_linked_pick", LKEY, KM_PRESS, 0, 0);
+       RNA_boolean_set(kmi->ptr, "deselect", FALSE);
+       kmi = WM_keymap_add_item(keymap, "CURVE_OT_select_linked_pick", LKEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_boolean_set(kmi->ptr, "deselect", TRUE);
 
        WM_keymap_add_item(keymap, "CURVE_OT_separate", PKEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "CURVE_OT_extrude_move", EKEY, KM_PRESS, 0, 0);
@@ -248,8 +252,10 @@ void ED_keymap_curve(wmKeyConfig *keyconf)
        RNA_enum_set(WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, KM_ALT, 0)->ptr, "mode", TFM_CURVE_SHRINKFATTEN);
 
        WM_keymap_add_item(keymap, "CURVE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0);
-       WM_keymap_add_item(keymap, "CURVE_OT_hide", HKEY, KM_PRESS, 0, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "CURVE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "unselected", 1);
+       kmi = WM_keymap_add_item(keymap, "CURVE_OT_hide", HKEY, KM_PRESS, 0, 0);
+       RNA_boolean_set(kmi->ptr, "unselected", FALSE);
+       kmi = WM_keymap_add_item(keymap, "CURVE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_boolean_set(kmi->ptr, "unselected", TRUE);
 
        WM_keymap_add_item(keymap, "OBJECT_OT_vertex_parent_set", PKEY, KM_PRESS, KM_CTRL, 0);
        
index a01efa2..c8c57c1 100644 (file)
@@ -320,7 +320,7 @@ static void ui_layer_but_cb(bContext *C, void *arg_but, void *arg_index)
        int len= RNA_property_array_length(ptr, prop);
 
        if(!shift) {
-               RNA_property_boolean_set_index(ptr, prop, index, 1);
+               RNA_property_boolean_set_index(ptr, prop, index, TRUE);
 
                for(i=0; i<len; i++)
                        if(i != index)
@@ -2783,7 +2783,7 @@ void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,in
 
                WM_operator_properties_create(&op_ptr, "WM_OT_operator_preset_add");
                RNA_string_set(&op_ptr, "operator", op->type->idname);
-               RNA_boolean_set(&op_ptr, "remove_active", 1);
+               RNA_boolean_set(&op_ptr, "remove_active", TRUE);
                op_ptr= uiItemFullO(row, "WM_OT_operator_preset_add", "", ICON_ZOOMOUT, op_ptr.data, WM_OP_INVOKE_DEFAULT, 0);
        }
 
index 96d2077..0862af2 100644 (file)
@@ -1957,10 +1957,10 @@ static void handle_layer_buttons(bContext *C, void *arg1, void *arg2)
                tot= RNA_property_array_length(&but->rnapoin, but->rnaprop);
                
                /* Normally clicking only selects one layer */
-               RNA_property_boolean_set_index(&but->rnapoin, but->rnaprop, cur, 1);
+               RNA_property_boolean_set_index(&but->rnapoin, but->rnaprop, cur, TRUE);
                for(i = 0; i < tot; ++i) {
                        if(i != cur)
-                               RNA_property_boolean_set_index(&but->rnapoin, but->rnaprop, i, 0);
+                               RNA_property_boolean_set_index(&but->rnapoin, but->rnaprop, i, FALSE);
                }
        }
        
index 2959d52..234b273 100644 (file)
@@ -1689,7 +1689,8 @@ void UI_view2d_operatortypes(void)
 void UI_view2d_keymap(wmKeyConfig *keyconf)
 {
        wmKeyMap *keymap= WM_keymap_find(keyconf, "View2D", 0, 0);
-       
+       wmKeyMapItem *kmi;
+
        /* scrollers */
        WM_keymap_add_item(keymap, "VIEW2D_OT_scroller_activate", LEFTMOUSE, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "VIEW2D_OT_scroller_activate", MIDDLEMOUSE, KM_PRESS, 0, 0);
@@ -1750,8 +1751,10 @@ void UI_view2d_keymap(wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_down", WHEELDOWNMOUSE, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_up", WHEELUPMOUSE, KM_PRESS, 0, 0);
        
-       RNA_boolean_set(WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_down", PAGEDOWNKEY, KM_PRESS, 0, 0)->ptr, "page", 1);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_up", PAGEUPKEY, KM_PRESS, 0, 0)->ptr, "page", 1);
+       kmi = WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_down", PAGEDOWNKEY, KM_PRESS, 0, 0);
+       RNA_boolean_set(kmi->ptr, "page", TRUE);
+       kmi = WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_up", PAGEUPKEY, KM_PRESS, 0, 0);
+       RNA_boolean_set(kmi->ptr, "page", TRUE);
        
        WM_keymap_add_item(keymap, "VIEW2D_OT_zoom", MIDDLEMOUSE, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "VIEW2D_OT_zoom", MOUSEZOOM, 0, 0, 0);
index 22c58f1..71b37be 100644 (file)
@@ -4278,7 +4278,7 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
        BKE_mesh_end_editmesh(obedit->data, em);
 
 //     RNA_enum_set(op->ptr, "proportional", 0);
-//     RNA_boolean_set(op->ptr, "mirror", 0);
+//     RNA_boolean_set(op->ptr, "mirror", FALSE);
 //     WM_operator_name_call(C, "TRANSFORM_OT_translate", WM_OP_INVOKE_REGION_WIN, op->ptr);
 
        return OPERATOR_FINISHED;
index 4f01998..90b3d45 100644 (file)
@@ -188,14 +188,14 @@ void ED_operatormacros_mesh(void)
        WM_operatortype_macro_define(ot, "MESH_OT_duplicate");
        otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
        RNA_enum_set(otmacro->ptr, "proportional", 0);
-       RNA_boolean_set(otmacro->ptr, "mirror", 0);
+       RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
 
        ot= WM_operatortype_append_macro("MESH_OT_rip_move", "Rip", OPTYPE_UNDO|OPTYPE_REGISTER);
        ot->description = "Rip polygons and move the result";
        WM_operatortype_macro_define(ot, "MESH_OT_rip");
        otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
        RNA_enum_set(otmacro->ptr, "proportional", 0);
-       RNA_boolean_set(otmacro->ptr, "mirror", 0);
+       RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
 
        ot= WM_operatortype_append_macro("MESH_OT_extrude_region_move", "Extrude Region and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
        ot->description = "Extrude region and move result";
@@ -203,7 +203,7 @@ void ED_operatormacros_mesh(void)
        RNA_enum_set(otmacro->ptr, "type", 1);
        otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
        RNA_enum_set(otmacro->ptr, "proportional", 0);
-       RNA_boolean_set(otmacro->ptr, "mirror", 0);
+       RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
 
        ot= WM_operatortype_append_macro("MESH_OT_extrude_faces_move", "Extrude Individual Faces and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
        ot->description = "Extrude faces and move result";
@@ -211,7 +211,7 @@ void ED_operatormacros_mesh(void)
        RNA_enum_set(otmacro->ptr, "type", 2);
        otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_shrink_fatten");
        RNA_enum_set(otmacro->ptr, "proportional", 0);
-       RNA_boolean_set(otmacro->ptr, "mirror", 0);
+       RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
 
        ot= WM_operatortype_append_macro("MESH_OT_extrude_edges_move", "Extrude Only Edges and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
        ot->description = "Extrude edges and move result";
@@ -219,7 +219,7 @@ void ED_operatormacros_mesh(void)
        RNA_enum_set(otmacro->ptr, "type", 3);
        otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
        RNA_enum_set(otmacro->ptr, "proportional", 0);
-       RNA_boolean_set(otmacro->ptr, "mirror", 0);
+       RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
 
        ot= WM_operatortype_append_macro("MESH_OT_extrude_vertices_move", "Extrude Only Vertices and Move", OPTYPE_UNDO|OPTYPE_REGISTER);
        ot->description = "Extrude vertices and move result";
@@ -227,7 +227,7 @@ void ED_operatormacros_mesh(void)
        RNA_enum_set(otmacro->ptr, "type", 4);
        otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
        RNA_enum_set(otmacro->ptr, "proportional", 0);
-       RNA_boolean_set(otmacro->ptr, "mirror", 0);
+       RNA_boolean_set(otmacro->ptr, "mirror", FALSE);
 }
 
 /* note mesh keymap also for other space? */
index 4c69bb3..c7635bc 100644 (file)
@@ -37,6 +37,8 @@
 #include "ED_mball.h"
 #include "ED_screen.h"
 
+#include "BLI_utildefines.h"
+
 #include "mball_intern.h"
 
 void ED_operatortypes_metaball(void)
@@ -62,8 +64,10 @@ void ED_keymap_metaball(wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "OBJECT_OT_metaball_add", AKEY, KM_PRESS, KM_SHIFT, 0);
        
        WM_keymap_add_item(keymap, "MBALL_OT_reveal_metaelems", HKEY, KM_PRESS, KM_ALT, 0);
-       WM_keymap_add_item(keymap, "MBALL_OT_hide_metaelems", HKEY, KM_PRESS, 0, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "MBALL_OT_hide_metaelems", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "unselected", 1);
+       kmi = WM_keymap_add_item(keymap, "MBALL_OT_hide_metaelems", HKEY, KM_PRESS, 0, 0);
+       RNA_boolean_set(kmi->ptr, "unselected", FALSE);
+       kmi = WM_keymap_add_item(keymap, "MBALL_OT_hide_metaelems", HKEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_boolean_set(kmi->ptr, "unselected", TRUE);
        
        WM_keymap_add_item(keymap, "MBALL_OT_delete_metaelems", XKEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "MBALL_OT_delete_metaelems", DELKEY, KM_PRESS, 0, 0);
index c535497..64bbf60 100644 (file)
@@ -484,7 +484,7 @@ static int object_camera_add_exec(bContext *C, wmOperator *op)
        float loc[3], rot[3];
        
        /* force view align for cameras */
-       RNA_boolean_set(op->ptr, "view_align", 1);
+       RNA_boolean_set(op->ptr, "view_align", TRUE);
        
        object_add_generic_invoke_options(C, op);
 
index 5218652..09ae636 100644 (file)
@@ -235,7 +235,7 @@ void ED_operatormacros_object(void)
        if(ot) {
                ot->description = "Duplicate selected objects and move them";
                otmacro= WM_operatortype_macro_define(ot, "OBJECT_OT_duplicate");
-               RNA_boolean_set(otmacro->ptr, "linked", 1);
+               RNA_boolean_set(otmacro->ptr, "linked", TRUE);
                otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
                RNA_enum_set(otmacro->ptr, "proportional", PROP_EDIT_OFF);
        }
index ebd3dc6..473ed50 100644 (file)
@@ -96,20 +96,27 @@ static void keymap_particle(wmKeyConfig *keyconf)
        keymap= WM_keymap_find(keyconf, "Particle", 0, 0);
        keymap->poll= PE_poll;
        
-       WM_keymap_add_item(keymap, "PARTICLE_OT_select_all", AKEY, KM_PRESS, 0, 0);
-       RNA_enum_set(WM_keymap_add_item(keymap, "PARTICLE_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "action", SEL_INVERT);
+       kmi = WM_keymap_add_item(keymap, "PARTICLE_OT_select_all", AKEY, KM_PRESS, 0, 0);
+       RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE);
+       kmi = WM_keymap_add_item(keymap, "PARTICLE_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0);
+       RNA_enum_set(kmi->ptr, "action", SEL_INVERT);
 
        WM_keymap_add_item(keymap, "PARTICLE_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "PARTICLE_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0);
-       WM_keymap_add_item(keymap, "PARTICLE_OT_select_linked", LKEY, KM_PRESS, 0, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "PARTICLE_OT_select_linked", LKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "deselect", 1);
+
+       kmi = WM_keymap_add_item(keymap, "PARTICLE_OT_select_linked", LKEY, KM_PRESS, 0, 0);
+       RNA_boolean_set(kmi->ptr, "deselect", FALSE);
+       kmi = WM_keymap_add_item(keymap, "PARTICLE_OT_select_linked", LKEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_boolean_set(kmi->ptr, "deselect", TRUE);
 
        WM_keymap_add_item(keymap, "PARTICLE_OT_delete", XKEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "PARTICLE_OT_delete", DELKEY, KM_PRESS, 0, 0);
 
        WM_keymap_add_item(keymap, "PARTICLE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0);
-       WM_keymap_add_item(keymap, "PARTICLE_OT_hide", HKEY, KM_PRESS, 0, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "PARTICLE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "unselected", 1);
+       kmi = WM_keymap_add_item(keymap, "PARTICLE_OT_hide", HKEY, KM_PRESS, 0, 0);
+       RNA_boolean_set(kmi->ptr, "unselected", FALSE);
+       kmi = WM_keymap_add_item(keymap, "PARTICLE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_boolean_set(kmi->ptr, "unselected", TRUE);
 
        kmi = WM_keymap_verify_item(keymap, "VIEW3D_OT_manipulator", LEFTMOUSE, KM_PRESS, KM_ANY, 0);
        RNA_boolean_set(kmi->ptr, "release_confirm", TRUE);
index 6bb3b2c..1338344 100644 (file)
@@ -272,8 +272,8 @@ static int screen_opengl_render_init(bContext *C, wmOperator *op)
        /* ensure we have a 3d view */
 
        if(!ED_view3d_context_activate(C)) {
-               RNA_boolean_set(op->ptr, "view_context", 0);
-               is_view_context= 0;
+               RNA_boolean_set(op->ptr, "view_context", FALSE);
+               is_view_context = 0;
        }
 
        /* only one render job at a time */
index 30cb9e8..0d724dc 100644 (file)
@@ -3492,7 +3492,7 @@ void ED_keymap_screen(wmKeyConfig *keyconf)
 {
        ListBase *lb;
        wmKeyMap *keymap;
-       //wmKeyMapItem *kmi;
+       wmKeyMapItem *kmi;
        
        /* Screen Editing ------------------------------------------------ */
        keymap= WM_keymap_find(keyconf, "Screen Editing", 0, 0);
@@ -3559,7 +3559,8 @@ void ED_keymap_screen(wmKeyConfig *keyconf)
        
        /* render */
        WM_keymap_add_item(keymap, "RENDER_OT_render", F12KEY, KM_PRESS, 0, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "RENDER_OT_render", F12KEY, KM_PRESS, KM_CTRL, 0)->ptr, "animation", 1);
+       kmi = WM_keymap_add_item(keymap, "RENDER_OT_render", F12KEY, KM_PRESS, KM_CTRL, 0);
+       RNA_boolean_set(kmi->ptr, "animation", TRUE);
        WM_keymap_add_item(keymap, "RENDER_OT_view_cancel", ESCKEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "RENDER_OT_view_show", F11KEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "RENDER_OT_play_rendered_anim", F11KEY, KM_PRESS, KM_CTRL, 0);
@@ -3583,20 +3584,21 @@ void ED_keymap_screen(wmKeyConfig *keyconf)
        RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_offset", WHEELDOWNMOUSE, KM_PRESS, KM_ALT, 0)->ptr, "delta", 1);
        RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_offset", WHEELUPMOUSE, KM_PRESS, KM_ALT, 0)->ptr, "delta", -1);
        
-       RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", UPARROWKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0)->ptr, "end", 1);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", DOWNARROWKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0)->ptr, "end", 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", RIGHTARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "end", 1);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", LEFTARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "end", 0);
+       RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", UPARROWKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0)->ptr, "end", TRUE);
+       RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", DOWNARROWKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0)->ptr, "end", FALSE);
+       RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", RIGHTARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "end", TRUE);
+       RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", LEFTARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "end", FALSE);
        
        WM_keymap_add_item(keymap, "SCREEN_OT_keyframe_jump", UPARROWKEY, KM_PRESS, 0, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_keyframe_jump", DOWNARROWKEY, KM_PRESS, 0, 0)->ptr, "next", 0);
+       RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_keyframe_jump", DOWNARROWKEY, KM_PRESS, 0, 0)->ptr, "next", FALSE);
        
        WM_keymap_add_item(keymap, "SCREEN_OT_keyframe_jump", MEDIALAST, KM_PRESS, 0, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_keyframe_jump", MEDIAFIRST, KM_PRESS, 0, 0)->ptr, "next", 0);
+       kmi = WM_keymap_add_item(keymap, "SCREEN_OT_keyframe_jump", MEDIAFIRST, KM_PRESS, 0, 0);
+       RNA_boolean_set(kmi->ptr, "next", FALSE);
        
        /* play (forward and backwards) */
        WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", AKEY, KM_PRESS, KM_ALT, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", AKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0)->ptr, "reverse", 1);
+       RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", AKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0)->ptr, "reverse", TRUE);
        WM_keymap_add_item(keymap, "SCREEN_OT_animation_cancel", ESCKEY, KM_PRESS, 0, 0);
        
        WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", MEDIAPLAY, KM_PRESS, 0, 0);
index 2a0ebb8..d4578e1 100644 (file)
@@ -583,8 +583,10 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "PAINT_OT_vert_select_all", AKEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "PAINT_OT_vert_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "VIEW3D_OT_select_border", BKEY, KM_PRESS, 0, 0);
-       WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_SHIFT|KM_CTRL, 0)->ptr, "deselect", 1);
+       kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL, 0);
+       RNA_boolean_set(kmi->ptr, "deselect", FALSE);
+       kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_SHIFT|KM_CTRL, 0);
+       RNA_boolean_set(kmi->ptr, "deselect", TRUE);
        WM_keymap_add_item(keymap, "VIEW3D_OT_select_circle", CKEY, KM_PRESS, 0, 0);
 
        /* Image/Texture Paint mode */
@@ -609,8 +611,10 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
 
        WM_keymap_add_item(keymap, "PAINT_OT_face_select_all", AKEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "PAINT_OT_face_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0);
-       WM_keymap_add_item(keymap, "PAINT_OT_face_select_hide", HKEY, KM_PRESS, 0, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "PAINT_OT_face_select_hide", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "unselected", 1);
+       kmi = WM_keymap_add_item(keymap, "PAINT_OT_face_select_hide", HKEY, KM_PRESS, 0, 0);
+       RNA_boolean_set(kmi->ptr, "unselected", FALSE);
+       kmi = WM_keymap_add_item(keymap, "PAINT_OT_face_select_hide", HKEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_boolean_set(kmi->ptr, "unselected", TRUE);
        WM_keymap_add_item(keymap, "PAINT_OT_face_select_reveal", HKEY, KM_PRESS, KM_ALT, 0);
 
        WM_keymap_add_item(keymap, "PAINT_OT_face_select_linked", LKEY, KM_PRESS, KM_CTRL, 0);
index 45c7043..06dd966 100644 (file)
@@ -999,5 +999,5 @@ void ED_operatormacros_clip(void)
        ot->description = "Add new marker and slide it with mouse until mouse button release";
        WM_operatortype_macro_define(ot, "CLIP_OT_add_marker");
        otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
-       RNA_boolean_set(otmacro->ptr, "release_confirm", 1);
+       RNA_boolean_set(otmacro->ptr, "release_confirm", TRUE);
 }
index b2527fb..3d58437 100644 (file)
@@ -463,10 +463,14 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "CLIP_OT_change_frame", LEFTMOUSE, KM_PRESS, 0, 0);
 
        /* selection */
-       WM_keymap_add_item(keymap, "CLIP_OT_select", SELECTMOUSE, KM_PRESS, 0, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "CLIP_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", 1);
-       WM_keymap_add_item(keymap, "CLIP_OT_select_all", AKEY, KM_PRESS, 0, 0);
-       RNA_enum_set(WM_keymap_add_item(keymap, "CLIP_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "action", SEL_INVERT);
+       kmi = WM_keymap_add_item(keymap, "CLIP_OT_select", SELECTMOUSE, KM_PRESS, 0, 0);
+       RNA_boolean_set(kmi->ptr, "extend", FALSE);
+       kmi = WM_keymap_add_item(keymap, "CLIP_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
+       RNA_boolean_set(kmi->ptr, "extend", TRUE);
+       kmi = WM_keymap_add_item(keymap, "CLIP_OT_select_all", AKEY, KM_PRESS, 0, 0);
+       RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE);
+       kmi = WM_keymap_add_item(keymap, "CLIP_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0);
+       RNA_enum_set(kmi->ptr, "action", SEL_INVERT);
        WM_keymap_add_item(keymap, "CLIP_OT_select_border", BKEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "CLIP_OT_select_circle", CKEY, KM_PRESS, 0, 0);
        WM_keymap_add_menu(keymap, "CLIP_MT_select_grouped", GKEY, KM_PRESS, KM_SHIFT, 0);
@@ -530,8 +534,10 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "CLIP_OT_change_frame", ACTIONMOUSE, KM_PRESS, 0, 0);
 
        /* selection */
-       WM_keymap_add_item(keymap, "CLIP_OT_graph_select", SELECTMOUSE, KM_PRESS, 0, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "CLIP_OT_graph_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", 1);
+       kmi = WM_keymap_add_item(keymap, "CLIP_OT_graph_select", SELECTMOUSE, KM_PRESS, 0, 0);
+       RNA_boolean_set(kmi->ptr, "extend", FALSE);
+       kmi = WM_keymap_add_item(keymap, "CLIP_OT_graph_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
+       RNA_boolean_set(kmi->ptr, "extend", TRUE);
 
        /* delete */
        WM_keymap_add_item(keymap, "CLIP_OT_graph_delete_curve", DELKEY, KM_PRESS, 0, 0);
index 1a2541c..3df8e98 100644 (file)
@@ -293,7 +293,8 @@ static void console_keymap(struct wmKeyConfig *keyconf)
        RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", LEFTARROWKEY, KM_PRESS, 0, 0)->ptr, "type", PREV_CHAR);
        RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", RIGHTARROWKEY, KM_PRESS, 0, 0)->ptr, "type", NEXT_CHAR);
        
-       RNA_boolean_set(WM_keymap_add_item(keymap, "CONSOLE_OT_history_cycle", UPARROWKEY, KM_PRESS, 0, 0)->ptr, "reverse", 1);
+       kmi = WM_keymap_add_item(keymap, "CONSOLE_OT_history_cycle", UPARROWKEY, KM_PRESS, 0, 0);
+       RNA_boolean_set(kmi->ptr, "reverse", TRUE);
        WM_keymap_add_item(keymap, "CONSOLE_OT_history_cycle", DOWNARROWKEY, KM_PRESS, 0, 0);
        
        /*
index aa24558..aba5809 100644 (file)
@@ -383,7 +383,8 @@ static void graphedit_keymap_keyframes (wmKeyConfig *keyconf, wmKeyMap *keymap)
        WM_keymap_add_item(keymap, "GRAPH_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0);
        
                /* F-Modifiers */
-       RNA_boolean_set(WM_keymap_add_item(keymap, "GRAPH_OT_fmodifier_add", MKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0)->ptr, "only_active", 0);
+       kmi = WM_keymap_add_item(keymap, "GRAPH_OT_fmodifier_add", MKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+       RNA_boolean_set(kmi->ptr, "only_active", FALSE);
        
        /* animation module */
                /* channels list 
index f173a3d..55831de 100644 (file)
@@ -169,17 +169,23 @@ void nla_operatortypes(void)
 
 static void nla_keymap_channels(wmKeyMap *keymap)
 {
+       wmKeyMapItem *kmi;
+
        /* NLA-specific (different to standard channels keymap) -------------------------- */
        /* selection */
                /* click-select */
                // XXX for now, only leftmouse.... 
-       WM_keymap_add_item(keymap, "NLA_OT_channels_click", LEFTMOUSE, KM_PRESS, 0, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "NLA_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", 1);
+       kmi = WM_keymap_add_item(keymap, "NLA_OT_channels_click", LEFTMOUSE, KM_PRESS, 0, 0);
+       RNA_boolean_set(kmi->ptr, "extend", FALSE);
+       kmi = WM_keymap_add_item(keymap, "NLA_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0);
+       RNA_boolean_set(kmi->ptr, "extend", TRUE);
        
        /* channel operations */
                /* add tracks */
-       WM_keymap_add_item(keymap, "NLA_OT_tracks_add", AKEY, KM_PRESS, KM_SHIFT, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "NLA_OT_tracks_add", AKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0)->ptr, "above_selected", 1);
+       kmi = WM_keymap_add_item(keymap, "NLA_OT_tracks_add", AKEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_boolean_set(kmi->ptr, "above_selected", FALSE);
+       kmi = WM_keymap_add_item(keymap, "NLA_OT_tracks_add", AKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
+       RNA_boolean_set(kmi->ptr, "above_selected", TRUE);
        
                /* delete tracks */
        WM_keymap_add_item(keymap, "NLA_OT_delete_tracks", XKEY, KM_PRESS, 0, 0);
index b71776f..5080215 100644 (file)
@@ -114,8 +114,10 @@ void ED_operatormacros_node(void)
        /* modified operator call for duplicating with input links */
        ot= WM_operatortype_append_macro("NODE_OT_duplicate_move_keep_inputs", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
        ot->description = "Duplicate selected nodes keeping input links and move them";
+
        mot = WM_operatortype_macro_define(ot, "NODE_OT_duplicate");
-               RNA_boolean_set(mot->ptr, "keep_inputs", 1);
+       RNA_boolean_set(mot->ptr, "keep_inputs", TRUE);
+
        WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
 
        ot= WM_operatortype_append_macro("NODE_OT_select_link_viewer", "Link Viewer", OPTYPE_UNDO);
@@ -144,11 +146,12 @@ void node_keymap(struct wmKeyConfig *keyconf)
                RNA_boolean_set(kmi->ptr, "extend", FALSE);
        kmi = WM_keymap_add_item(keymap, "NODE_OT_select", SELECTMOUSE, KM_PRESS, 0, 0);
                RNA_boolean_set(kmi->ptr, "extend", FALSE);
-       kmi= WM_keymap_add_item(keymap, "NODE_OT_select", ACTIONMOUSE, KM_PRESS, KM_SHIFT, 0);
+       kmi = WM_keymap_add_item(keymap, "NODE_OT_select", ACTIONMOUSE, KM_PRESS, KM_SHIFT, 0);
                RNA_boolean_set(kmi->ptr, "extend", TRUE);
-       kmi= WM_keymap_add_item(keymap, "NODE_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
+       kmi = WM_keymap_add_item(keymap, "NODE_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
                RNA_boolean_set(kmi->ptr, "extend", TRUE);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "NODE_OT_select_border", EVT_TWEAK_S, KM_ANY, 0, 0)->ptr, "tweak", 1);
+       kmi = WM_keymap_add_item(keymap, "NODE_OT_select_border", EVT_TWEAK_S, KM_ANY, 0, 0);
+               RNA_boolean_set(kmi->ptr, "tweak", TRUE);
        
        /* each of these falls through if not handled... */
        WM_keymap_add_item(keymap, "NODE_OT_link", LEFTMOUSE, KM_PRESS, 0, 0);
@@ -163,10 +166,12 @@ void node_keymap(struct wmKeyConfig *keyconf)
        kmi= WM_keymap_add_item(keymap, "NODE_OT_backimage_zoom", VKEY, KM_PRESS, KM_ALT, 0);
                RNA_float_set(kmi->ptr, "factor", 1.2f);
        WM_keymap_add_item(keymap, "NODE_OT_backimage_sample", ACTIONMOUSE, KM_PRESS, KM_ALT, 0);
-       
-       WM_keymap_add_item(keymap, "NODE_OT_link_make", FKEY, KM_PRESS, 0, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "NODE_OT_link_make", FKEY, KM_PRESS, KM_CTRL, 0)->ptr, "replace", 1);
-       
+
+       kmi = WM_keymap_add_item(keymap, "NODE_OT_link_make", FKEY, KM_PRESS, 0, 0);
+       RNA_boolean_set(kmi->ptr, "replace", FALSE);
+       kmi = WM_keymap_add_item(keymap, "NODE_OT_link_make", FKEY, KM_PRESS, KM_CTRL, 0);
+       RNA_boolean_set(kmi->ptr, "replace", TRUE);
+
        WM_keymap_add_menu(keymap, "NODE_MT_add", AKEY, KM_PRESS, KM_SHIFT, 0);
        WM_keymap_add_item(keymap, "NODE_OT_duplicate_move", DKEY, KM_PRESS, KM_SHIFT, 0);
        /* modified operator call for duplicating with input links */
@@ -180,7 +185,10 @@ void node_keymap(struct wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "NODE_OT_show_cyclic_dependencies", CKEY, KM_PRESS, 0, 0);
        
        WM_keymap_add_item(keymap, "NODE_OT_view_all", HOMEKEY, KM_PRESS, 0, 0);
-       WM_keymap_add_item(keymap, "NODE_OT_select_border", BKEY, KM_PRESS, 0, 0);
+
+       kmi = WM_keymap_add_item(keymap, "NODE_OT_select_border", BKEY, KM_PRESS, 0, 0);
+       RNA_boolean_set(kmi->ptr, "tweak", FALSE);
+
        WM_keymap_add_item(keymap, "NODE_OT_delete", XKEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "NODE_OT_delete", DELKEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "NODE_OT_delete_reconnect", XKEY, KM_PRESS, KM_CTRL, 0);
index 0d3f2e8..a424520 100644 (file)
@@ -38,6 +38,7 @@
 
 #include "RNA_access.h"
 
+#include "BLI_utildefines.h"
 
 #include "outliner_intern.h"
 
@@ -80,14 +81,19 @@ void outliner_operatortypes(void)
 void outliner_keymap(wmKeyConfig *keyconf)
 {
        wmKeyMap *keymap= WM_keymap_find(keyconf, "Outliner", SPACE_OUTLINER, 0);
+       wmKeyMapItem *kmi;
        
        WM_keymap_add_item(keymap, "OUTLINER_OT_item_rename", LEFTMOUSE, KM_DBL_CLICK, 0, 0);
+
+       kmi = WM_keymap_add_item(keymap, "OUTLINER_OT_item_activate", LEFTMOUSE, KM_CLICK, 0, 0);
+       RNA_boolean_set(kmi->ptr, "extend", FALSE);
+       kmi = WM_keymap_add_item(keymap, "OUTLINER_OT_item_activate", LEFTMOUSE, KM_CLICK, KM_SHIFT, 0);
+       RNA_boolean_set(kmi->ptr, "extend", TRUE);
        
-       RNA_boolean_set(WM_keymap_add_item(keymap, "OUTLINER_OT_item_activate", LEFTMOUSE, KM_CLICK, 0, 0)->ptr, "extend", 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "OUTLINER_OT_item_activate", LEFTMOUSE, KM_CLICK, KM_SHIFT, 0)->ptr, "extend", 1);
-       
-       RNA_boolean_set(WM_keymap_add_item(keymap, "OUTLINER_OT_item_openclose", RETKEY, KM_PRESS, 0, 0)->ptr, "all", 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "OUTLINER_OT_item_openclose", RETKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "all", 1);
+       kmi = WM_keymap_add_item(keymap, "OUTLINER_OT_item_openclose", RETKEY, KM_PRESS, 0, 0);
+       RNA_boolean_set(kmi->ptr, "all", FALSE);
+       kmi = WM_keymap_add_item(keymap, "OUTLINER_OT_item_openclose", RETKEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_boolean_set(kmi->ptr, "all", TRUE);
        
        WM_keymap_add_item(keymap, "OUTLINER_OT_item_rename", LEFTMOUSE, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "OUTLINER_OT_operation", RIGHTMOUSE, KM_PRESS, 0, 0);
@@ -98,10 +104,12 @@ void outliner_keymap(wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "OUTLINER_OT_show_active", PADPERIOD, KM_PRESS, 0, 0);
        
        WM_keymap_add_item(keymap, "OUTLINER_OT_scroll_page", PAGEDOWNKEY, KM_PRESS, 0, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "OUTLINER_OT_scroll_page", PAGEUPKEY, KM_PRESS, 0, 0)->ptr, "up", 1);
+       kmi = WM_keymap_add_item(keymap, "OUTLINER_OT_scroll_page", PAGEUPKEY, KM_PRESS, 0, 0);
+       RNA_boolean_set(kmi->ptr, "up", TRUE);
        
        WM_keymap_add_item(keymap, "OUTLINER_OT_show_one_level", PADPLUSKEY, KM_PRESS, 0, 0); /* open */
-       RNA_boolean_set(WM_keymap_add_item(keymap, "OUTLINER_OT_show_one_level", PADMINUS, KM_PRESS, 0, 0)->ptr, "open", 0); /* close */
+       kmi = WM_keymap_add_item(keymap, "OUTLINER_OT_show_one_level", PADMINUS, KM_PRESS, 0, 0);
+       RNA_boolean_set(kmi->ptr, "open", FALSE); /* close */
        
        WM_keymap_verify_item(keymap, "OUTLINER_OT_selected_toggle", AKEY, KM_PRESS, 0, 0);
        WM_keymap_verify_item(keymap, "OUTLINER_OT_expanded_toggle", AKEY, KM_PRESS, KM_SHIFT, 0);
index 56c2e0e..c46a1ee 100644 (file)
@@ -3034,10 +3034,10 @@ static int sequencer_change_path_invoke(bContext *C, wmOperator *op, wmEvent *UN
 
        /* set default display depending on seq type */
        if(seq->type == SEQ_IMAGE) {
-               RNA_boolean_set(op->ptr, "filter_movie", 0);
+               RNA_boolean_set(op->ptr, "filter_movie", FALSE);
        }
        else {
-               RNA_boolean_set(op->ptr, "filter_image", 0);
+               RNA_boolean_set(op->ptr, "filter_image", FALSE);
        }
 
        WM_event_add_fileselect(C, op);
index 986aab8..ec9f8bb 100644 (file)
@@ -136,9 +136,11 @@ void sequencer_keymap(wmKeyConfig *keyconf)
                RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE);
        kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0);
                RNA_enum_set(kmi->ptr, "action", SEL_INVERT);
-       
-       RNA_enum_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_cut", KKEY, KM_PRESS, 0, 0)->ptr, "type", SEQ_CUT_SOFT);
-       RNA_enum_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_cut", KKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", SEQ_CUT_HARD);
+
+       kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_cut", KKEY, KM_PRESS, 0, 0);
+               RNA_enum_set(kmi->ptr, "type", SEQ_CUT_SOFT);
+       kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_cut", KKEY, KM_PRESS, KM_SHIFT, 0);
+               RNA_enum_set(kmi->ptr, "type", SEQ_CUT_HARD);
        
        kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_mute", HKEY, KM_PRESS, 0, 0);
                RNA_boolean_set(kmi->ptr, "unselected", FALSE);
@@ -212,8 +214,10 @@ void sequencer_keymap(wmKeyConfig *keyconf)
 
        /* 2.4x method, now use Alt for handles and select the side based on which handle was selected */
        /*
-       RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL, 0)->ptr, "linked_left", 1);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_ALT, 0)->ptr, "linked_right", 1);
+       kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
+       RNA_boolean_set(kmi->ptr, "linked_left", TRUE);
+       kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_ALT, 0);
+       RNA_boolean_set(kmi->ptr, "linked_right", TRUE);
        
        kmi= WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_ALT, 0);
        RNA_boolean_set(kmi->ptr, "linked_left", TRUE);
@@ -263,8 +267,10 @@ void sequencer_keymap(wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "SEQUENCER_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "SEQUENCER_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0);
        
-       WM_keymap_add_item(keymap, "SEQUENCER_OT_select_linked_pick", LKEY, KM_PRESS, 0, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_select_linked_pick", LKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", 1);
+       kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select_linked_pick", LKEY, KM_PRESS, 0, 0);
+       RNA_boolean_set(kmi->ptr, "extend", FALSE);
+       kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select_linked_pick", LKEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_boolean_set(kmi->ptr, "extend", TRUE);
        
        WM_keymap_add_item(keymap, "SEQUENCER_OT_select_linked", LKEY, KM_PRESS, KM_CTRL, 0);
        
index 441a5ea..314afea 100644 (file)
@@ -298,8 +298,10 @@ static void text_keymap(struct wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "TEXT_OT_copy", INSERTKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "TEXT_OT_paste", INSERTKEY, KM_PRESS, KM_SHIFT, 0);
 
-       if(U.uiflag & USER_MMB_PASTE) // XXX not dynamic
-               RNA_boolean_set(WM_keymap_add_item(keymap, "TEXT_OT_paste", MIDDLEMOUSE, KM_PRESS, 0, 0)->ptr, "selection", 1);
+       if(U.uiflag & USER_MMB_PASTE) { // XXX not dynamic
+               kmi = WM_keymap_add_item(keymap, "TEXT_OT_paste", MIDDLEMOUSE, KM_PRESS, 0, 0);
+               RNA_boolean_set(kmi->ptr, "selection", TRUE);
+       }
 
        WM_keymap_add_item(keymap, "TEXT_OT_jump", JKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "TEXT_OT_find", GKEY, KM_PRESS, KM_CTRL, 0);
@@ -307,8 +309,10 @@ static void text_keymap(struct wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "TEXT_OT_properties", FKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "TEXT_OT_replace", HKEY, KM_PRESS, KM_CTRL, 0);
 
-       WM_keymap_add_item(keymap, "TEXT_OT_to_3d_object", MKEY, KM_PRESS, KM_ALT, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "TEXT_OT_to_3d_object", MKEY, KM_PRESS, KM_CTRL, 0)->ptr, "split_lines", 1);
+       kmi = WM_keymap_add_item(keymap, "TEXT_OT_to_3d_object", MKEY, KM_PRESS, KM_ALT, 0);
+       RNA_boolean_set(kmi->ptr, "split_lines", FALSE);
+       kmi = WM_keymap_add_item(keymap, "TEXT_OT_to_3d_object", MKEY, KM_PRESS, KM_CTRL, 0);
+       RNA_boolean_set(kmi->ptr, "split_lines", TRUE);
 
        WM_keymap_add_item(keymap, "TEXT_OT_select_all", AKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "TEXT_OT_select_line", AKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
@@ -364,7 +368,8 @@ static void text_keymap(struct wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "TEXT_OT_scroll", MOUSEPAN, 0, 0, 0);
        WM_keymap_add_item(keymap, "TEXT_OT_selection_set", EVT_TWEAK_L, KM_ANY, 0, 0);
        WM_keymap_add_item(keymap, "TEXT_OT_cursor_set", LEFTMOUSE, KM_PRESS, 0, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "TEXT_OT_selection_set", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "select", 1);
+       kmi = WM_keymap_add_item(keymap, "TEXT_OT_selection_set", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0);
+       RNA_boolean_set(kmi->ptr, "select", TRUE);
        RNA_int_set(WM_keymap_add_item(keymap, "TEXT_OT_scroll", WHEELUPMOUSE, KM_PRESS, 0, 0)->ptr, "lines", -1);
        RNA_int_set(WM_keymap_add_item(keymap, "TEXT_OT_scroll", WHEELDOWNMOUSE, KM_PRESS, 0, 0)->ptr, "lines", 1);
 
index 315da04..00bb8d1 100644 (file)
@@ -230,7 +230,7 @@ static int view3d_layers_invoke(bContext *C, wmOperator *op, wmEvent *event)
                return OPERATOR_PASS_THROUGH;
        
        if(event->shift)
-               RNA_boolean_set(op->ptr, "extend", 1);
+               RNA_boolean_set(op->ptr, "extend", TRUE);
        
        if(event->alt) {
                int nr= RNA_int_get(op->ptr, "nr") + 10;
index 22470fe..759f3ed 100644 (file)
@@ -160,8 +160,11 @@ void view3d_keymap(wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "VIEW3D_OT_zoom_camera_1_to_1", PADENTER, KM_PRESS, KM_SHIFT, 0);
 
        WM_keymap_add_item(keymap, "VIEW3D_OT_view_center_camera", HOMEKEY, KM_PRESS, 0, 0); /* only with camera view */
-       RNA_boolean_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_all", HOMEKEY, KM_PRESS, 0, 0)->ptr, "center", 0); /* only without camera view */
-       RNA_boolean_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_all", CKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "center", 1);
+
+       kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_view_all", HOMEKEY, KM_PRESS, 0, 0);
+       RNA_boolean_set(kmi->ptr, "center", FALSE); /* only without camera view */
+       kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_view_all", CKEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_boolean_set(kmi->ptr, "center", TRUE);
 
        /* numpad view hotkeys*/
        RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD0, KM_PRESS, 0, 0)->ptr, "type", RV3D_VIEW_CAMERA);
index 7d56d5c..98fef07 100644 (file)
@@ -3366,8 +3366,11 @@ void ED_keymap_uvedit(wmKeyConfig *keyconf)
        RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_loop", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_ALT, 0)->ptr, "extend", TRUE);
 
        /* border/circle selection */
-       WM_keymap_add_item(keymap, "UV_OT_select_border", BKEY, KM_PRESS, 0, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_border", BKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "pinned", 1);
+       kmi = WM_keymap_add_item(keymap, "UV_OT_select_border", BKEY, KM_PRESS, 0, 0);
+       RNA_boolean_set(kmi->ptr, "pinned", FALSE);
+       kmi = WM_keymap_add_item(keymap, "UV_OT_select_border", BKEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_boolean_set(kmi->ptr, "pinned", TRUE);
+
        WM_keymap_add_item(keymap, "UV_OT_circle_select", CKEY, KM_PRESS, 0, 0);
 
        /* selection manipulation */
@@ -3377,16 +3380,21 @@ void ED_keymap_uvedit(wmKeyConfig *keyconf)
        RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked_pick", LKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", TRUE);
 
        WM_keymap_add_item(keymap, "UV_OT_unlink_selected", LKEY, KM_PRESS, KM_ALT, 0);
-       WM_keymap_add_item(keymap, "UV_OT_select_all", AKEY, KM_PRESS, 0, 0);
-       RNA_enum_set(WM_keymap_add_item(keymap, "UV_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "action", SEL_INVERT);
+       kmi = WM_keymap_add_item(keymap, "UV_OT_select_all", AKEY, KM_PRESS, 0, 0);
+       RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE);
+       kmi = WM_keymap_add_item(keymap, "UV_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0);
+       RNA_enum_set(kmi->ptr, "action", SEL_INVERT);
+
        WM_keymap_add_item(keymap, "UV_OT_select_pinned", PKEY, KM_PRESS, KM_SHIFT, 0);
 
        WM_keymap_add_menu(keymap, "IMAGE_MT_uvs_weldalign", WKEY, KM_PRESS, 0, 0);
 
        /* uv operations */
        WM_keymap_add_item(keymap, "UV_OT_stitch", VKEY, KM_PRESS, 0, 0);
-       WM_keymap_add_item(keymap, "UV_OT_pin", PKEY, KM_PRESS, 0, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_pin", PKEY, KM_PRESS, KM_ALT, 0)->ptr, "clear", 1);
+       kmi = WM_keymap_add_item(keymap, "UV_OT_pin", PKEY, KM_PRESS, 0, 0);
+       RNA_boolean_set(kmi->ptr, "clear", FALSE);
+       kmi = WM_keymap_add_item(keymap, "UV_OT_pin", PKEY, KM_PRESS, KM_ALT, 0);
+       RNA_boolean_set(kmi->ptr, "clear", TRUE);
 
        /* unwrap */
        WM_keymap_add_item(keymap, "UV_OT_unwrap", EKEY, KM_PRESS, 0, 0);
@@ -3395,8 +3403,11 @@ void ED_keymap_uvedit(wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "UV_OT_average_islands_scale", AKEY, KM_PRESS, KM_CTRL, 0);
 
        /* hide */
-       WM_keymap_add_item(keymap, "UV_OT_hide", HKEY, KM_PRESS, 0, 0);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "unselected", 1);
+       kmi = WM_keymap_add_item(keymap, "UV_OT_hide", HKEY, KM_PRESS, 0, 0);
+       RNA_boolean_set(kmi->ptr, "unselected", FALSE);
+       kmi = WM_keymap_add_item(keymap, "UV_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0);
+       RNA_boolean_set(kmi->ptr, "unselected", TRUE);
+
        WM_keymap_add_item(keymap, "UV_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0);
 
        /* cursor */