[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43365] trunk/blender: remove *. select_inverse operators where the *. select_all operator has an invert option.

Campbell Barton ideasman42 at gmail.com
Sat Jan 14 07:58:15 CET 2012


Revision: 43365
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43365
Author:   campbellbarton
Date:     2012-01-14 06:58:03 +0000 (Sat, 14 Jan 2012)
Log Message:
-----------
remove *.select_inverse operators where the *.select_all operator has an invert option.

Modified Paths:
--------------
    trunk/blender/doc/python_api/examples/bpy.types.Menu.1.py
    trunk/blender/doc/python_api/examples/bpy.types.Menu.py
    trunk/blender/doc/python_api/examples/bpy.types.Panel.1.py
    trunk/blender/release/scripts/presets/keyconfig/maya.py
    trunk/blender/release/scripts/startup/bl_ui/space_view3d.py
    trunk/blender/source/blender/editors/armature/armature_intern.h
    trunk/blender/source/blender/editors/armature/armature_ops.c
    trunk/blender/source/blender/editors/armature/editarmature.c
    trunk/blender/source/blender/editors/curve/curve_intern.h
    trunk/blender/source/blender/editors/curve/curve_ops.c
    trunk/blender/source/blender/editors/curve/editcurve.c
    trunk/blender/source/blender/editors/mesh/editmesh_mods.c
    trunk/blender/source/blender/editors/mesh/mesh_intern.h
    trunk/blender/source/blender/editors/mesh/mesh_ops.c
    trunk/blender/source/blender/editors/metaball/mball_edit.c
    trunk/blender/source/blender/editors/metaball/mball_intern.h
    trunk/blender/source/blender/editors/metaball/mball_ops.c
    trunk/blender/source/blender/editors/object/object_intern.h
    trunk/blender/source/blender/editors/object/object_ops.c
    trunk/blender/source/blender/editors/object/object_select.c
    trunk/blender/source/blender/editors/physics/particle_edit.c
    trunk/blender/source/blender/editors/physics/physics_intern.h
    trunk/blender/source/blender/editors/physics/physics_ops.c

Modified: trunk/blender/doc/python_api/examples/bpy.types.Menu.1.py
===================================================================
--- trunk/blender/doc/python_api/examples/bpy.types.Menu.1.py	2012-01-14 06:30:27 UTC (rev 43364)
+++ trunk/blender/doc/python_api/examples/bpy.types.Menu.1.py	2012-01-14 06:58:03 UTC (rev 43365)
@@ -13,8 +13,8 @@
     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

Modified: trunk/blender/doc/python_api/examples/bpy.types.Menu.py
===================================================================
--- trunk/blender/doc/python_api/examples/bpy.types.Menu.py	2012-01-14 06:30:27 UTC (rev 43364)
+++ trunk/blender/doc/python_api/examples/bpy.types.Menu.py	2012-01-14 06:58:03 UTC (rev 43365)
@@ -27,8 +27,8 @@
     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")
 
 

Modified: trunk/blender/doc/python_api/examples/bpy.types.Panel.1.py
===================================================================
--- trunk/blender/doc/python_api/examples/bpy.types.Panel.1.py	2012-01-14 06:30:27 UTC (rev 43364)
+++ trunk/blender/doc/python_api/examples/bpy.types.Panel.1.py	2012-01-14 06:58:03 UTC (rev 43365)
@@ -34,9 +34,9 @@
 
         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")
 
 

Modified: trunk/blender/release/scripts/presets/keyconfig/maya.py
===================================================================
--- trunk/blender/release/scripts/presets/keyconfig/maya.py	2012-01-14 06:30:27 UTC (rev 43364)
+++ trunk/blender/release/scripts/presets/keyconfig/maya.py	2012-01-14 06:58:03 UTC (rev 43365)
@@ -219,7 +219,7 @@
 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_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')

Modified: trunk/blender/release/scripts/startup/bl_ui/space_view3d.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_view3d.py	2012-01-14 06:30:27 UTC (rev 43364)
+++ trunk/blender/release/scripts/startup/bl_ui/space_view3d.py	2012-01-14 06:58:03 UTC (rev 43365)
@@ -485,7 +485,7 @@
 
         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 @@
         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")

Modified: trunk/blender/source/blender/editors/armature/armature_intern.h
===================================================================
--- trunk/blender/source/blender/editors/armature/armature_intern.h	2012-01-14 06:30:27 UTC (rev 43364)
+++ trunk/blender/source/blender/editors/armature/armature_intern.h	2012-01-14 06:58:03 UTC (rev 43365)
@@ -99,7 +99,6 @@
 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);

Modified: trunk/blender/source/blender/editors/armature/armature_ops.c
===================================================================
--- trunk/blender/source/blender/editors/armature/armature_ops.c	2012-01-14 06:30:27 UTC (rev 43364)
+++ trunk/blender/source/blender/editors/armature/armature_ops.c	2012-01-14 06:58:03 UTC (rev 43365)
@@ -114,7 +114,6 @@
 	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 @@
 		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);
 

Modified: trunk/blender/source/blender/editors/armature/editarmature.c
===================================================================
--- trunk/blender/source/blender/editors/armature/editarmature.c	2012-01-14 06:30:27 UTC (rev 43364)
+++ trunk/blender/source/blender/editors/armature/editarmature.c	2012-01-14 06:58:03 UTC (rev 43365)
@@ -5031,38 +5031,6 @@
 
 /* ***************** 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");

Modified: trunk/blender/source/blender/editors/curve/curve_intern.h
===================================================================
--- trunk/blender/source/blender/editors/curve/curve_intern.h	2012-01-14 06:30:27 UTC (rev 43364)
+++ trunk/blender/source/blender/editors/curve/curve_intern.h	2012-01-14 06:58:03 UTC (rev 43365)
@@ -106,7 +106,6 @@
 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);

Modified: trunk/blender/source/blender/editors/curve/curve_ops.c
===================================================================
--- trunk/blender/source/blender/editors/curve/curve_ops.c	2012-01-14 06:30:27 UTC (rev 43364)
+++ trunk/blender/source/blender/editors/curve/curve_ops.c	2012-01-14 06:58:03 UTC (rev 43365)
@@ -116,7 +116,6 @@
 	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 @@
 	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);

@@ Diff output truncated at 10240 characters. @@


More information about the Bf-blender-cvs mailing list