remove *.select_inverse operators where the *.select_all operator has an invert option.
authorCampbell Barton <ideasman42@gmail.com>
Sat, 14 Jan 2012 06:58:03 +0000 (06:58 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 14 Jan 2012 06:58:03 +0000 (06:58 +0000)
23 files changed:
doc/python_api/examples/bpy.types.Menu.1.py
doc/python_api/examples/bpy.types.Menu.py
doc/python_api/examples/bpy.types.Panel.1.py
release/scripts/presets/keyconfig/maya.py
release/scripts/startup/bl_ui/space_view3d.py
source/blender/editors/armature/armature_intern.h
source/blender/editors/armature/armature_ops.c
source/blender/editors/armature/editarmature.c
source/blender/editors/curve/curve_intern.h
source/blender/editors/curve/curve_ops.c
source/blender/editors/curve/editcurve.c
source/blender/editors/mesh/editmesh_mods.c
source/blender/editors/mesh/mesh_intern.h
source/blender/editors/mesh/mesh_ops.c
source/blender/editors/metaball/mball_edit.c
source/blender/editors/metaball/mball_intern.h
source/blender/editors/metaball/mball_ops.c
source/blender/editors/object/object_intern.h
source/blender/editors/object/object_ops.c
source/blender/editors/object/object_select.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/physics/physics_intern.h
source/blender/editors/physics/physics_ops.c

index 92c961e93d275cf11a46ed1beb8b4f1f55185bdc..e82bf398e35662160c6f3b10e8795ff05eeb82b3 100644 (file)
@@ -13,8 +13,8 @@ class SubMenu(bpy.types.Menu):
     def draw(self, context):
         layout = self.layout
 
-        layout.operator("object.select_all", text="Select/Deselect All")
-        layout.operator("object.select_inverse", text="Inverse")
+        layout.operator("object.select_all", text="Select/Deselect All").action = 'TOGGLE'
+        layout.operator("object.select_all", text="Inverse").action = 'INVERT'
         layout.operator("object.select_random", text="Random")
 
         # access this operator as a submenu
index e8c4a2aa07201de44aa5435641e79f73281b71ef..4ca18a67b783b35998566cbfd12731ff2efa0336 100644 (file)
@@ -27,8 +27,8 @@ class BasicMenu(bpy.types.Menu):
     def draw(self, context):
         layout = self.layout
 
-        layout.operator("object.select_all", text="Select/Deselect All")
-        layout.operator("object.select_inverse", text="Inverse")
+        layout.operator("object.select_all", text="Select/Deselect All").action = 'TOGGLE'
+        layout.operator("object.select_all", text="Inverse").action = 'INVERT'
         layout.operator("object.select_random", text="Random")
 
 
index ab32a0437061a40d4a434a276255b91e3c8df306..cd85d30cea05bd3c4953341d8a5c2e128cddb568 100644 (file)
@@ -34,9 +34,9 @@ class ObjectSelectPanel(bpy.types.Panel):
 
         box = layout.box()
         box.label("Selection Tools")
-        box.operator("object.select_all")
+        box.operator("object.select_all").action = 'TOGGLE'
         row = box.row()
-        row.operator("object.select_inverse")
+        row.operator("object.select_all").action = 'INVERT'
         row.operator("object.select_random")
 
 
index 87f4791ec51ee893d88e881fd3dbc3237165099d..4a9b6b0e96e0c6170eeda96024c3797de236f9d1 100644 (file)
@@ -219,7 +219,7 @@ kmi.properties.value_1 = 'DISABLED'
 kmi.properties.value_2 = 'ENABLED'
 kmi = km.keymap_items.new('view3d.game_start', 'P', 'PRESS')
 kmi = km.keymap_items.new('object.select_all', 'A', 'PRESS')
-kmi = km.keymap_items.new('object.select_inverse', 'I', 'PRESS', ctrl=True)
+kmi = km.keymap_items.new('object.select_all', 'I', 'PRESS', ctrl=True).action = 'INVERT'
 kmi = km.keymap_items.new('object.select_linked', 'L', 'PRESS', shift=True)
 kmi = km.keymap_items.new('object.select_grouped', 'G', 'PRESS', shift=True)
 kmi = km.keymap_items.new('object.select_mirror', 'M', 'PRESS', shift=True, ctrl=True)
@@ -304,7 +304,8 @@ kmi = km.keymap_items.new('mesh.select_shortest_path', 'SELECTMOUSE', 'PRESS', c
 kmi = km.keymap_items.new('mesh.select_all', 'A', 'PRESS')
 kmi = km.keymap_items.new('mesh.select_more', 'NUMPAD_PLUS', 'PRESS', ctrl=True)
 kmi = km.keymap_items.new('mesh.select_less', 'NUMPAD_MINUS', 'PRESS', ctrl=True)
-kmi = km.keymap_items.new('mesh.select_inverse', 'I', 'PRESS', ctrl=True)
+kmi = km.keymap_items.new('mesh.select_all', 'I', 'PRESS', ctrl=True)
+kmi.properties.action = 'INVERT'
 kmi = km.keymap_items.new('mesh.select_non_manifold', 'M', 'PRESS', shift=True, ctrl=True, alt=True)
 kmi = km.keymap_items.new('mesh.select_linked', 'L', 'PRESS', ctrl=True)
 kmi = km.keymap_items.new('mesh.select_linked_pick', 'L', 'PRESS')
index 2bf5bba9cd8c4483d3447b101b2e4c8d830198d2..f9ebc2ae819cb7b92b30bcb8e54be5be18ec24a7 100644 (file)
@@ -485,7 +485,7 @@ class VIEW3D_MT_select_particle(Menu):
 
         layout.operator("particle.select_all", text="Select/Deselect All").action = 'TOGGLE'
         layout.operator("particle.select_linked")
-        layout.operator("particle.select_inverse")
+        layout.operator("particle.select_all").action = 'INVERT'
 
         layout.separator()
 
@@ -1508,7 +1508,7 @@ class VIEW3D_MT_edit_mesh_specials(Menu):
         layout.operator("mesh.remove_doubles")
         layout.operator("mesh.hide", text="Hide")
         layout.operator("mesh.reveal", text="Reveal")
-        layout.operator("mesh.select_inverse")
+        layout.operator("mesh.select_all").action = 'INVERT'
         layout.operator("mesh.flip_normals")
         layout.operator("mesh.vertices_smooth", text="Smooth")
         # layout.operator("mesh.bevel", text="Bevel")
index 87254c20c0f838dfb366c8f7721d8abb057d8234..40d909380a08880c3087439c2406f7b40c253684 100644 (file)
@@ -99,7 +99,6 @@ void POSE_OT_copy(struct wmOperatorType *ot);
 void POSE_OT_paste(struct wmOperatorType *ot);
 
 void POSE_OT_select_all(struct wmOperatorType *ot);
-void POSE_OT_select_inverse(struct wmOperatorType *ot);
 void POSE_OT_select_parent(struct wmOperatorType *ot);
 void POSE_OT_select_hierarchy(struct wmOperatorType *ot);
 void POSE_OT_select_linked(struct wmOperatorType *ot);
index d559aef6fe2a2bfcf3094d6ce375cd56bd370da5..c4bd9382939673e5885073c2db3002d80efffb9e 100644 (file)
@@ -114,7 +114,6 @@ void ED_operatortypes_armature(void)
        WM_operatortype_append(POSE_OT_paste);
        
        WM_operatortype_append(POSE_OT_select_all);
-       WM_operatortype_append(POSE_OT_select_inverse);
 
        WM_operatortype_append(POSE_OT_select_parent);
        WM_operatortype_append(POSE_OT_select_hierarchy);
@@ -322,7 +321,7 @@ void ED_keymap_armature(wmKeyConfig *keyconf)
                RNA_boolean_set(kmi->ptr, "flipped", 1);
        
        WM_keymap_add_item(keymap, "POSE_OT_select_all", AKEY, KM_PRESS, 0, 0);
-       WM_keymap_add_item(keymap, "POSE_OT_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0);
+       RNA_enum_set(WM_keymap_add_item(keymap, "POSE_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "action", SEL_INVERT);
 
        WM_keymap_add_item(keymap, "POSE_OT_select_parent", PKEY, KM_PRESS, KM_SHIFT, 0);
 
index 4dcbc1b588b1ac4936f9a423524d5e07c9fa7cb3..5df4d42ad968be6bf08925174816d1f51c73b457 100644 (file)
@@ -5031,38 +5031,6 @@ void POSE_OT_transforms_clear(wmOperatorType *ot)
 
 /* ***************** selections ********************** */
 
-static int pose_select_inverse_exec(bContext *C, wmOperator *UNUSED(op))
-{
-       
-       /*      Set the flags */
-       CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones) 
-       {
-               if ((pchan->bone->flag & BONE_UNSELECTABLE) == 0) {
-                       pchan->bone->flag ^= (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
-               }
-       }       
-       CTX_DATA_END;
-       
-       WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, NULL);
-       
-       return OPERATOR_FINISHED;
-}
-
-void POSE_OT_select_inverse(wmOperatorType *ot)
-{
-       /* identifiers */
-       ot->name= "Select Inverse";
-       ot->idname= "POSE_OT_select_inverse";
-       ot->description= "Flip the selection status of bones (selected -> unselected, unselected -> selected)";
-       
-       /* api callbacks */
-       ot->exec= pose_select_inverse_exec;
-       ot->poll= ED_operator_posemode;
-       
-       /* flags */
-       ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-       
-}
 static int pose_de_select_all_exec(bContext *C, wmOperator *op)
 {
        int action = RNA_enum_get(op->ptr, "action");
index 3287ebfb92fa7fc959ee17533768f6eee22acb65..2014345e163730961f5c7a3a782fdb2ad22438c6 100644 (file)
@@ -106,7 +106,6 @@ void SURFACE_OT_primitive_nurbs_surface_torus_add(struct wmOperatorType *ot);
 void CURVE_OT_de_select_first(struct wmOperatorType *ot);
 void CURVE_OT_de_select_last(struct wmOperatorType *ot);
 void CURVE_OT_select_all(struct wmOperatorType *ot);
-void CURVE_OT_select_inverse(struct wmOperatorType *ot);
 void CURVE_OT_select_linked(struct wmOperatorType *ot);
 void CURVE_OT_select_linked_pick(struct wmOperatorType *ot);
 void CURVE_OT_select_row(struct wmOperatorType *ot);
index 1384b86065b9126226de31c7c36381ae76268684..cef86c8d1d3c523ff3afc0d490fa071d1ae038ce 100644 (file)
@@ -116,7 +116,6 @@ void ED_operatortypes_curve(void)
        WM_operatortype_append(CURVE_OT_de_select_first);
        WM_operatortype_append(CURVE_OT_de_select_last);
        WM_operatortype_append(CURVE_OT_select_all);
-       WM_operatortype_append(CURVE_OT_select_inverse);
        WM_operatortype_append(CURVE_OT_select_linked);
        WM_operatortype_append(CURVE_OT_select_linked_pick);
        WM_operatortype_append(CURVE_OT_select_row);
@@ -224,10 +223,11 @@ void ED_keymap_curve(wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "CURVE_OT_vertex_add", LEFTMOUSE, KM_CLICK, KM_CTRL, 0);
 
        WM_keymap_add_item(keymap, "CURVE_OT_select_all", AKEY, KM_PRESS, 0, 0);
+       RNA_enum_set(WM_keymap_add_item(keymap, "CURVE_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "action", SEL_INVERT);
+
        WM_keymap_add_item(keymap, "CURVE_OT_select_row", RKEY, KM_PRESS, KM_SHIFT, 0);
        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_inverse", IKEY, 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);
index a659e8b7f56d218c6f316fc36cd6c534dcd8033b..a20fbad874e3af6f45ab3a1b2bf966fe34c8bd97 100644 (file)
@@ -2749,64 +2749,6 @@ void CURVE_OT_reveal(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 }
 
-/********************** select invert operator *********************/
-
-static int select_inverse_exec(bContext *C, wmOperator *UNUSED(op))
-{
-       Object *obedit= CTX_data_edit_object(C);
-       Curve *cu= obedit->data;
-       ListBase *editnurb= object_editcurve_get(obedit);
-       Nurb *nu;
-       BPoint *bp;
-       BezTriple *bezt;
-       int a;
-
-       cu->lastsel= NULL;
-
-       for(nu= editnurb->first; nu; nu= nu->next) {
-               if(nu->type == CU_BEZIER) {
-                       bezt= nu->bezt;
-                       a= nu->pntsu;
-                       while(a--) {
-                               if(bezt->hide==0) {
-                                       bezt->f2 ^= SELECT; /* always do the center point */
-                                       if((cu->drawflag & CU_HIDE_HANDLES)==0) {
-                                               bezt->f1 ^= SELECT;
-                                               bezt->f3 ^= SELECT;
-                                       }
-                               }
-                               bezt++;
-                       }
-               }
-               else {
-                       bp= nu->bp;
-                       a= nu->pntsu*nu->pntsv;
-                       while(a--) {
-                               swap_selection_bpoint(bp);
-                               bp++;
-                       }
-               }
-       }
-
-       WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
-
-       return OPERATOR_FINISHED;       
-}
-
-void CURVE_OT_select_inverse(wmOperatorType *ot)
-{
-       /* identifiers */
-       ot->name= "Select Inverse";
-       ot->idname= "CURVE_OT_select_inverse";
-       
-       /* api callbacks */
-       ot->exec= select_inverse_exec;
-       ot->poll= ED_operator_editsurfcurve;
-       
-       /* flags */
-       ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
 /********************** subdivide operator *********************/
 
 /** Divide the line segments associated with the currently selected
index 3bed6b295c377b38bf47cffba7893397c16a4f5d..62ccbb3f5a52fc5bd4b3b4522d47e837740c977b 100644 (file)
@@ -3382,34 +3382,6 @@ void EM_select_swap(EditMesh *em) /* exported for UV */
 //     if (EM_texFaceCheck())
 
 }
-
-static int select_inverse_mesh_exec(bContext *C, wmOperator *UNUSED(op))
-{
-       Object *obedit= CTX_data_edit_object(C);
-       EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
-       
-       EM_select_swap(em);
-       
-       WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
-
-       BKE_mesh_end_editmesh(obedit->data, em);
-       return OPERATOR_FINISHED;       
-}
-
-void MESH_OT_select_inverse(wmOperatorType *ot)
-{
-       /* identifiers */
-       ot->name= "Select Inverse";
-       ot->description= "Select inverse of (un)selected vertices, edges or faces";
-       ot->idname= "MESH_OT_select_inverse";
-       
-       /* api callbacks */
-       ot->exec= select_inverse_mesh_exec;
-       ot->poll= ED_operator_editmesh;
-       
-       /* flags */
-       ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
        
 /* ******************** (de)select all operator **************** */
 
index 3831d8583401afec10e4ca3c8209ba17ecfcf329..91cba8a482be593c1f8f16f3a8b03e935ed2d35a 100644 (file)
@@ -144,7 +144,6 @@ void MESH_OT_loop_select(struct wmOperatorType *ot);
 void MESH_OT_select_all(struct wmOperatorType *ot);
 void MESH_OT_select_more(struct wmOperatorType *ot);
 void MESH_OT_select_less(struct wmOperatorType *ot);
-void MESH_OT_select_inverse(struct wmOperatorType *ot);
 void MESH_OT_select_non_manifold(struct wmOperatorType *ot);
 void MESH_OT_select_linked(struct wmOperatorType *ot);
 void MESH_OT_select_linked_pick(struct wmOperatorType *ot);
index bd067948e59e2bdc9ede72b6f4834d9bfafaf960..f2b640ec4d5c5580b50eeae4b4d7abcdecaa9d40 100644 (file)
@@ -62,7 +62,6 @@ void ED_operatortypes_mesh(void)
        WM_operatortype_append(MESH_OT_select_all);
        WM_operatortype_append(MESH_OT_select_more);
        WM_operatortype_append(MESH_OT_select_less);
-       WM_operatortype_append(MESH_OT_select_inverse);
        WM_operatortype_append(MESH_OT_select_non_manifold);
        WM_operatortype_append(MESH_OT_select_linked);
        WM_operatortype_append(MESH_OT_select_linked_pick);
@@ -256,9 +255,10 @@ void ED_keymap_mesh(wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "MESH_OT_select_shortest_path", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
 
        WM_keymap_add_item(keymap, "MESH_OT_select_all", AKEY, KM_PRESS, 0, 0);
+       RNA_enum_set(WM_keymap_add_item(keymap, "MESH_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "action", SEL_INVERT);
+
        WM_keymap_add_item(keymap, "MESH_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "MESH_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0);
-       WM_keymap_add_item(keymap, "MESH_OT_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "MESH_OT_select_non_manifold", MKEY, KM_PRESS, (KM_CTRL|KM_SHIFT|KM_ALT), 0);
        
        WM_keymap_add_item(keymap, "MESH_OT_select_linked", LKEY, KM_PRESS, KM_CTRL, 0);
index 414d3344511387e59634fffdb333187def82149e..c8adfbda708aeb6bdc9a32225ce1f9c74fa9d516 100644 (file)
@@ -181,45 +181,6 @@ void MBALL_OT_select_all(wmOperatorType *ot)
        WM_operator_properties_select_all(ot);
 }
 
-/***************************** Select inverse operator *****************************/
-
-/* Invert metaball selection */
-static int select_inverse_metaelems_exec(bContext *C, wmOperator *UNUSED(op))
-{
-       Object *obedit= CTX_data_edit_object(C);
-       MetaBall *mb = (MetaBall*)obedit->data;
-       MetaElem *ml;
-       
-       ml= mb->editelems->first;
-       if(ml) {
-               while(ml) {
-                       if(ml->flag & SELECT)
-                               ml->flag &= ~SELECT;
-                       else
-                               ml->flag |= SELECT;
-                       ml= ml->next;
-               }
-               WM_event_add_notifier(C, NC_GEOM|ND_SELECT, mb);
-       }
-       
-       return OPERATOR_FINISHED;
-}
-
-void MBALL_OT_select_inverse_metaelems(wmOperatorType *ot)
-{
-       /* identifiers */
-       ot->name= "Inverse";
-       ot->description= "Select inverse of (un)selected metaelements";
-       ot->idname= "MBALL_OT_select_inverse_metaelems";
-
-       /* callback functions */
-       ot->exec= select_inverse_metaelems_exec;
-       ot->poll= ED_operator_editmball;
-
-       /* flags */
-       ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;  
-}
-
 /***************************** Select random operator *****************************/
 
 /* Random metaball selection */
index 792fa80e0c5a25b95401ad60274afa9be37b9101..1cb4c19fc722842ca33a92208345934406cbe01b 100644 (file)
@@ -43,7 +43,6 @@ void MBALL_OT_delete_metaelems(struct wmOperatorType *ot);
 void MBALL_OT_duplicate_metaelems(struct wmOperatorType *ot);
 
 void MBALL_OT_select_all(struct wmOperatorType *ot);
-void MBALL_OT_select_inverse_metaelems(struct wmOperatorType *ot);
 void MBALL_OT_select_random_metaelems(struct wmOperatorType *ot);
 
 #endif
index 4d04fc3e80ea84fca29931b5b7f751c6a543b181..4f90578c665ca718ff5cb11f30f98a11944507bf 100644 (file)
@@ -48,7 +48,6 @@ void ED_operatortypes_metaball(void)
        WM_operatortype_append(MBALL_OT_reveal_metaelems);
        
        WM_operatortype_append(MBALL_OT_select_all);
-       WM_operatortype_append(MBALL_OT_select_inverse_metaelems);
        WM_operatortype_append(MBALL_OT_select_random_metaelems);
 }
 
@@ -70,6 +69,6 @@ void ED_keymap_metaball(wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "MBALL_OT_duplicate_metaelems", DKEY, KM_PRESS, KM_SHIFT, 0);
        
        WM_keymap_add_item(keymap, "MBALL_OT_select_all", AKEY, KM_PRESS, 0, 0);
-       WM_keymap_add_item(keymap, "MBALL_OT_select_inverse_metaelems", IKEY, KM_PRESS, KM_CTRL, 0);
+       RNA_enum_set(WM_keymap_add_item(keymap, "MBALL_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "action", SEL_INVERT);
 }
 
index aed3f3f4895bc016d7c7cc6d330002d7db310dee..7f416feb0d5ee5552937b2c0a79f2c934226eb69 100644 (file)
@@ -96,7 +96,6 @@ void OBJECT_OT_game_physics_copy(struct wmOperatorType *ot);
 
 /* object_select.c */
 void OBJECT_OT_select_all(struct wmOperatorType *ot);
-void OBJECT_OT_select_inverse(struct wmOperatorType *ot);
 void OBJECT_OT_select_random(struct wmOperatorType *ot);
 void OBJECT_OT_select_by_type(struct wmOperatorType *ot);
 void OBJECT_OT_select_by_layer(struct wmOperatorType *ot);
index 7e66d35312115ec694a644c1aa220143190f260d..593a3f3dc9c2a1727e952a159531bc6846f557d7 100644 (file)
@@ -94,7 +94,6 @@ void ED_operatortypes_object(void)
        WM_operatortype_append(OBJECT_OT_make_links_data);
        WM_operatortype_append(OBJECT_OT_move_to_layer);
 
-       WM_operatortype_append(OBJECT_OT_select_inverse);
        WM_operatortype_append(OBJECT_OT_select_random);
        WM_operatortype_append(OBJECT_OT_select_all);
        WM_operatortype_append(OBJECT_OT_select_same_group);
@@ -297,7 +296,8 @@ void ED_keymap_object(wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "VIEW3D_OT_game_start", PKEY, KM_PRESS, 0, 0);
 
        WM_keymap_add_item(keymap, "OBJECT_OT_select_all", AKEY, KM_PRESS, 0, 0);
-       WM_keymap_add_item(keymap, "OBJECT_OT_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0);
+       RNA_enum_set(WM_keymap_add_item(keymap, "OBJECT_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "action", SEL_INVERT);
+
        WM_keymap_add_item(keymap, "OBJECT_OT_select_linked", LKEY, KM_PRESS, KM_SHIFT, 0);
        WM_keymap_add_item(keymap, "OBJECT_OT_select_grouped", GKEY, KM_PRESS, KM_SHIFT, 0);
        WM_keymap_add_item(keymap, "OBJECT_OT_select_mirror", MKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
index da69c2a06400406a776eeb175a01f80be1a57096..69372ac1a90ca20aa6367b6cb268c4f2ef9848cb 100644 (file)
@@ -739,41 +739,6 @@ void OBJECT_OT_select_by_layer(wmOperatorType *ot)
        RNA_def_int(ot->srna, "layers", 1, 1, 20, "Layer", "", 1, 20);
 }
 
-/************************** Select Inverse *************************/
-
-static int object_select_inverse_exec(bContext *C, wmOperator *UNUSED(op))
-{
-       CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
-               if (base->flag & SELECT)
-                       ED_base_object_select(base, BA_DESELECT);
-               else
-                       ED_base_object_select(base, BA_SELECT);
-       }
-       CTX_DATA_END;
-       
-       /* undo? */
-       WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
-       
-       return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_select_inverse(wmOperatorType *ot)
-{
-       
-       /* identifiers */
-       ot->name= "Select Inverse";
-       ot->description = "Invert selection of all visible objects";
-       ot->idname= "OBJECT_OT_select_inverse";
-       
-       /* api callbacks */
-       ot->exec= object_select_inverse_exec;
-       ot->poll= objects_selectable_poll;
-       
-       /* flags */
-       ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-       
-}
-
 /**************************** (De)select All ****************************/
 
 static int object_select_all_exec(bContext *C, wmOperator *op)
index d1e24df64eabcc4a1358ea77306ce37b74fc4370..dbf03e34c32c0ec839fa8d2dbda778e8cfd882ea 100644 (file)
@@ -1880,43 +1880,6 @@ void PARTICLE_OT_select_more(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 }
 
-static int select_inverse_exec(bContext *C, wmOperator *UNUSED(op))
-{
-       PEData data;
-       PTCacheEdit *edit;
-       POINT_P; KEY_K;
-
-       PE_set_data(C, &data);
-
-       edit= PE_get_current(data.scene, data.ob);
-
-       LOOP_VISIBLE_POINTS {
-               LOOP_KEYS {
-                       key->flag ^= PEK_SELECT;
-                       point->flag |= PEP_EDIT_RECALC; /* redraw selection only */
-               }
-       }
-
-       PE_update_selection(data.scene, data.ob, 1);
-       WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_SELECTED, data.ob);
-
-       return OPERATOR_FINISHED;
-}
-
-void PARTICLE_OT_select_inverse(wmOperatorType *ot)
-{
-       /* identifiers */
-       ot->name= "Select Inverse";
-       ot->idname= "PARTICLE_OT_select_inverse";
-
-       /* api callbacks */
-       ot->exec= select_inverse_exec;
-       ot->poll= PE_poll;
-
-       /* flags */
-       ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
 /************************ rekey operator ************************/
 
 static void rekey_particle(PEData *data, int pa_index)
index 0dae8b362cdc9710253f461e0609b43993f6de31..db6d63f639606b09bc846a32296effe38d0774de 100644 (file)
@@ -42,7 +42,6 @@ void PARTICLE_OT_select_tips(struct wmOperatorType *ot);
 void PARTICLE_OT_select_linked(struct wmOperatorType *ot);
 void PARTICLE_OT_select_less(struct wmOperatorType *ot);
 void PARTICLE_OT_select_more(struct wmOperatorType *ot);
-void PARTICLE_OT_select_inverse(struct wmOperatorType *ot);
 
 void PARTICLE_OT_hide(struct wmOperatorType *ot);
 void PARTICLE_OT_reveal(struct wmOperatorType *ot);
index e39b4b97d7279500dfa16437d5b565ad07196e87..ba0465b866faab68af3a22cdcfac3e945d76a4e1 100644 (file)
@@ -51,7 +51,6 @@ static void operatortypes_particle(void)
        WM_operatortype_append(PARTICLE_OT_select_linked);
        WM_operatortype_append(PARTICLE_OT_select_less);
        WM_operatortype_append(PARTICLE_OT_select_more);
-       WM_operatortype_append(PARTICLE_OT_select_inverse);
 
        WM_operatortype_append(PARTICLE_OT_hide);
        WM_operatortype_append(PARTICLE_OT_reveal);
@@ -95,11 +94,12 @@ static void keymap_particle(wmKeyConfig *keyconf)
        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);
+
        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);
-       WM_keymap_add_item(keymap, "PARTICLE_OT_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0);
 
        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);