[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [19375] branches/blender2.5/blender/source /blender/editors/object: 2.5

Michael Fox mfoxdogg at gmail.com
Mon Mar 23 00:41:05 CET 2009


Revision: 19375
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19375
Author:   mfoxdogg
Date:     2009-03-23 00:41:05 +0100 (Mon, 23 Mar 2009)

Log Message:
-----------
  2.5
******
ported object ops to new naming conventions

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/editors/object/object_edit.c
    branches/blender2.5/blender/source/blender/editors/object/object_intern.h
    branches/blender2.5/blender/source/blender/editors/object/object_ops.c

Modified: branches/blender2.5/blender/source/blender/editors/object/object_edit.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/object/object_edit.c	2009-03-22 23:39:36 UTC (rev 19374)
+++ branches/blender2.5/blender/source/blender/editors/object/object_edit.c	2009-03-22 23:41:05 UTC (rev 19375)
@@ -584,7 +584,7 @@
 	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 }
 
-static int object_add_armature_exec(bContext *C, wmOperator *op)
+static int object_armature_add_exec(bContext *C, wmOperator *op)
 {
 	Object *obedit= CTX_data_edit_object(C);
 	View3D *v3d= CTX_wm_view3d(C);
@@ -622,7 +622,7 @@
 	ot->idname= "OBJECT_OT_armature_add";
 	
 	/* api callbacks */
-	ot->exec= object_add_armature_exec;
+	ot->exec= object_armature_add_exec;
 	ot->poll= ED_operator_scene_editable;
 	
 	/* flags */
@@ -630,7 +630,7 @@
 }
 
 
-static int object_add_primitive_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int object_primitive_add_invoke(bContext *C, wmOperator *op, wmEvent *event)
 {
 	uiMenuItem *head= uiPupMenuBegin("Add Object", 0);
 	
@@ -660,7 +660,7 @@
 	ot->idname= "OBJECT_OT_primitive_add";
 	
 	/* api callbacks */
-	ot->invoke= object_add_primitive_invoke;
+	ot->invoke= object_primitive_add_invoke;
 	
 	ot->poll= ED_operator_scene_editable;
 	
@@ -710,13 +710,13 @@
 	return OPERATOR_FINISHED;
 }
 
-void OBJECT_OT_delete(wmOperatorType *ot)
+void OBJECT_OT_object_delete(wmOperatorType *ot)
 {
 	
 	/* identifiers */
 	ot->name= "Delete Objects";
 	ot->description = "Delete the object.";
-	ot->idname= "OBJECT_OT_delete";
+	ot->idname= "OBJECT_OT_object_delete";
 	
 	/* api callbacks */
 	ot->invoke= WM_operator_confirm;
@@ -1377,7 +1377,7 @@
 };
 
 /* note, poll should check for editable scene */
-static int clear_parent_exec(bContext *C, wmOperator *op)
+static int parent_clear_exec(bContext *C, wmOperator *op)
 {
 	
 	CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
@@ -1403,16 +1403,16 @@
 	return OPERATOR_FINISHED;
 }
 
-void OBJECT_OT_clear_parent(wmOperatorType *ot)
+void OBJECT_OT_parent_clear(wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name= "Clear parent";
 	ot->description = "Clear the object's parenting.";
-	ot->idname= "OBJECT_OT_clear_parent";
+	ot->idname= "OBJECT_OT_parent_clear";
 	
 	/* api callbacks */
 	ot->invoke= WM_menu_invoke;
-	ot->exec= clear_parent_exec;
+	ot->exec= parent_clear_exec;
 	
 	ot->poll= ED_operator_object_active;
 	
@@ -1432,7 +1432,7 @@
 };
 
 /* note, poll should check for editable scene */
-static int object_clear_track_exec(bContext *C, wmOperator *op)
+static int object_track_clear_exec(bContext *C, wmOperator *op)
 {
 	if(CTX_data_edit_object(C)) {
 		BKE_report(op->reports, RPT_ERROR, "Operation cannot be performed in EditMode");
@@ -1454,16 +1454,16 @@
 	return OPERATOR_FINISHED;
 }
 
-void OBJECT_OT_clear_track(wmOperatorType *ot)
+void OBJECT_OT_track_clear(wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name= "Clear track";
 	ot->description = "Clear tracking from object.";
-	ot->idname= "OBJECT_OT_clear_track";
+	ot->idname= "OBJECT_OT_track_clear";
 	
 	/* api callbacks */
 	ot->invoke= WM_menu_invoke;
-	ot->exec= object_clear_track_exec;
+	ot->exec= object_track_clear_exec;
 	
 	ot->poll= ED_operator_scene_editable;
 	
@@ -1477,7 +1477,7 @@
 /* ***************************** */
 /* ****** Select by Type ****** */
 
-static int object_select_by_type_exec(bContext *C, wmOperator *op)
+static int object_selection_by_type_exec(bContext *C, wmOperator *op)
 {
 	short obtype;
 	
@@ -1495,16 +1495,16 @@
 	return OPERATOR_FINISHED;
 }
 
-void OBJECT_OT_select_by_type(wmOperatorType *ot)
+void OBJECT_OT_selection_by_type(wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name= "Select By Type";
 	ot->description = "Select all visible objects that are of a type.";
-	ot->idname= "OBJECT_OT_select_by_type";
+	ot->idname= "OBJECT_OT_selection_by_type";
 	
 	/* api callbacks */
 	ot->invoke= WM_menu_invoke;
-	ot->exec= object_select_by_type_exec;
+	ot->exec= object_selection_by_type_exec;
 	ot->poll= ED_operator_scene_editable;
 	
 	/* flags */
@@ -1525,7 +1525,7 @@
 	{0, NULL, NULL, NULL}
 };
 
-static int object_select_linked_exec(bContext *C, wmOperator *op)
+static int object_selection_linked_exec(bContext *C, wmOperator *op)
 {
 	Scene *scene= CTX_data_scene(C);
 	Object *ob;
@@ -1648,16 +1648,16 @@
 	return OPERATOR_CANCELLED;
 }
 
-void OBJECT_OT_select_linked(wmOperatorType *ot)
+void OBJECT_OT_selection_linked(wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name= "Select Linked";
 	ot->description = "Select all visible objects that are linked.";
-	ot->idname= "OBJECT_OT_select_linked";
+	ot->idname= "OBJECT_OT_selection_linked";
 	
 	/* api callbacks */
 	ot->invoke= WM_menu_invoke;
-	ot->exec= object_select_linked_exec;
+	ot->exec= object_selection_linked_exec;
 	ot->poll= ED_operator_scene_editable;
 	
 	/* flags */
@@ -1668,7 +1668,7 @@
 }
 /* ****** selection by layer *******/
 
-static int object_select_by_layer_exec(bContext *C, wmOperator *op)
+static int object_selection_by_layer_exec(bContext *C, wmOperator *op)
 {
 	unsigned int layernum;
 	
@@ -1686,16 +1686,16 @@
 	return OPERATOR_FINISHED;
 }
 
-void OBJECT_OT_select_by_layer(wmOperatorType *ot)
+void OBJECT_OT_selection_by_layer(wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name= "Selection by layer";
 	ot->description = "Select all visible objects on a layer.";
-	ot->idname= "OBJECT_OT_select_by_layer";
+	ot->idname= "OBJECT_OT_selection_by_layer";
 	
 	/* api callbacks */
 	/*ot->invoke = XXX - need a int grid popup*/
-	ot->exec= object_select_by_layer_exec;
+	ot->exec= object_selection_by_layer_exec;
 	ot->poll= ED_operator_scene_editable;
 	
 	/* flags */
@@ -1705,7 +1705,7 @@
 }
 
 /* ****** invert selection *******/
-static int object_select_invert_exec(bContext *C, wmOperator *op)
+static int object_selection_invert_exec(bContext *C, wmOperator *op)
 {
 	CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
 		if (base->flag & SELECT)
@@ -1721,16 +1721,16 @@
 	return OPERATOR_FINISHED;
 }
 
-void OBJECT_OT_select_invert(wmOperatorType *ot)
+void OBJECT_OT_selection_invert(wmOperatorType *ot)
 {
 	
 	/* identifiers */
 	ot->name= "Invert selection";
 	ot->description = "Invert th selection of all visible objects.";
-	ot->idname= "OBJECT_OT_select_invert";
+	ot->idname= "OBJECT_OT_selection_invert";
 	
 	/* api callbacks */
-	ot->exec= object_select_invert_exec;
+	ot->exec= object_selection_invert_exec;
 	ot->poll= ED_operator_scene_editable;
 	
 	/* flags */
@@ -1739,7 +1739,7 @@
 }
 /* ****** (de)select All *******/
 
-static int object_de_select_all_exec(bContext *C, wmOperator *op)
+static int object_selection_de_select_all_exec(bContext *C, wmOperator *op)
 {
 	
 	int a=0, ok=0; 
@@ -1767,16 +1767,16 @@
 	return OPERATOR_FINISHED;
 }
 
-void OBJECT_OT_de_select_all(wmOperatorType *ot)
+void OBJECT_OT_selection_de_select_all(wmOperatorType *ot)
 {
 	
 	/* identifiers */
 	ot->name= "deselect all";
 	ot->description = "(de)select all visible objects in scene.";
-	ot->idname= "OBJECT_OT_de_select_all";
+	ot->idname= "OBJECT_OT_selection_de_select_all";
 	
 	/* api callbacks */
-	ot->exec= object_de_select_all_exec;
+	ot->exec= object_selection_de_select_all_exec;
 	ot->poll= ED_operator_scene_editable;
 	
 	/* flags */
@@ -1785,7 +1785,7 @@
 }
 /* ****** random selection *******/
 
-static int object_select_random_exec(bContext *C, wmOperator *op)
+static int object_selection_random_exec(bContext *C, wmOperator *op)
 {	
 	float percent;
 	
@@ -1803,16 +1803,16 @@
 	return OPERATOR_FINISHED;
 }
 
-void OBJECT_OT_select_random(wmOperatorType *ot)
+void OBJECT_OT_selection_random(wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name= "Random selection";
 	ot->description = "Set selection on random visible objects.";
-	ot->idname= "OBJECT_OT_select_random";
+	ot->idname= "OBJECT_OT_selection_random";
 	
 	/* api callbacks */
 	/*ot->invoke= object_select_random_invoke XXX - need a number popup ;*/
-	ot->exec = object_select_random_exec;
+	ot->exec = object_selection_random_exec;
 	ot->poll= ED_operator_scene_editable;
 	
 	/* flags */
@@ -1823,7 +1823,7 @@
 
 /* ******** Clear object Translation *********** */
 
-static int object_clear_location_exec(bContext *C, wmOperator *op)
+static int object_location_clear_exec(bContext *C, wmOperator *op)
 {
 	int armature_clear= 0;
 
@@ -1849,24 +1849,24 @@
 }
 
 
-void OBJECT_OT_clear_location(wmOperatorType *ot)
+void OBJECT_OT_location_clear(wmOperatorType *ot)
 {
 	
 	/* identifiers */
 	ot->name= "Clear Object Location";
 	ot->description = "Clear the object's location.";
-	ot->idname= "OBJECT_OT_clear_location";
+	ot->idname= "OBJECT_OT_location_clear";
 	
 	/* api callbacks */
 	ot->invoke= WM_operator_confirm;
-	ot->exec= object_clear_location_exec;
+	ot->exec= object_location_clear_exec;
 	ot->poll= ED_operator_object_active;
 	
 	/* flags */
 	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 }
 
-static int object_clear_rotation_exec(bContext *C, wmOperator *op)
+static int object_rotation_clear_exec(bContext *C, wmOperator *op)
 {
 	int armature_clear= 0;
 
@@ -1893,24 +1893,24 @@
 }
 
 
-void OBJECT_OT_clear_rotation(wmOperatorType *ot)
+void OBJECT_OT_rotation_clear(wmOperatorType *ot)
 {
 	
 	/* identifiers */
 	ot->name= "Clear Object Rotation";
 	ot->description = "Clear the object's rotation.";
-	ot->idname= "OBJECT_OT_clear_rotation";
+	ot->idname= "OBJECT_OT_rotation_clear";
 	
 	/* api callbacks */
 	ot->invoke= WM_operator_confirm;
-	ot->exec= object_clear_rotation_exec;
+	ot->exec= object_rotation_clear_exec;
 	ot->poll= ED_operator_object_active;
 	
 	/* flags */
 	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 }
 
-static int object_clear_scale_exec(bContext *C, wmOperator *op)
+static int object_scale_clear_exec(bContext *C, wmOperator *op)
 {
 	int armature_clear= 0;
 
@@ -1941,24 +1941,24 @@
 	return OPERATOR_FINISHED;
 }
 
-void OBJECT_OT_clear_scale(wmOperatorType *ot)
+void OBJECT_OT_scale_clear(wmOperatorType *ot)
 {
 	
 	/* identifiers */
 	ot->name= "Clear Object Scale";
 	ot->description = "Clear the object's scale.";
-	ot->idname= "OBJECT_OT_clear_scale";
+	ot->idname= "OBJECT_OT_scale_clear";
 	
 	/* api callbacks */
 	ot->invoke= WM_operator_confirm;
-	ot->exec= object_clear_scale_exec;
+	ot->exec= object_scale_clear_exec;
 	ot->poll= ED_operator_object_active;
 	
 	/* flags */
 	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 }
 
-static int object_clear_origin_exec(bContext *C, wmOperator *op)
+static int object_origin_clear_exec(bContext *C, wmOperator *op)
 {

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list