[Bf-blender-cvs] [a374ff1] master: Cleanup: editor api naming

Campbell Barton noreply at git.blender.org
Wed Nov 18 02:30:29 CET 2015


Commit: a374ff16b5e823ae37b69eb1995d36944b80c57f
Author: Campbell Barton
Date:   Wed Nov 18 12:20:28 2015 +1100
Branches: master
https://developer.blender.org/rBa374ff16b5e823ae37b69eb1995d36944b80c57f

Cleanup: editor api naming

- use ED_ prefix for api calls
- use ED_*_select_pick for mouse selection (was already done in parts)

===================================================================

M	source/blender/editors/armature/armature_select.c
M	source/blender/editors/curve/editcurve.c
M	source/blender/editors/curve/editcurve_add.c
M	source/blender/editors/curve/editfont.c
M	source/blender/editors/include/ED_armature.h
M	source/blender/editors/include/ED_curve.h
M	source/blender/editors/include/ED_lattice.h
M	source/blender/editors/include/ED_mball.h
M	source/blender/editors/include/ED_object.h
M	source/blender/editors/metaball/mball_edit.c
M	source/blender/editors/object/object_add.c
M	source/blender/editors/object/object_edit.c
M	source/blender/editors/object/object_hook.c
M	source/blender/editors/object/object_lattice.c
M	source/blender/editors/space_view3d/view3d_select.c
M	source/blender/makesrna/intern/rna_object.c
M	source/blenderplayer/bad_level_call_stubs/stubs.c

===================================================================

diff --git a/source/blender/editors/armature/armature_select.c b/source/blender/editors/armature/armature_select.c
index dbbdae2..efbf8a4 100644
--- a/source/blender/editors/armature/armature_select.c
+++ b/source/blender/editors/armature/armature_select.c
@@ -425,7 +425,7 @@ static int ebone_select_flag(EditBone *ebone)
 }
 
 /* context: editmode armature in view3d */
-bool mouse_armature(bContext *C, const int mval[2], bool extend, bool deselect, bool toggle)
+bool ED_armature_select_pick(bContext *C, const int mval[2], bool extend, bool deselect, bool toggle)
 {
 	Object *obedit = CTX_data_edit_object(C);
 	bArmature *arm = obedit->data;
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 5a47cc1..367467b 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -1178,7 +1178,7 @@ static void remap_hooks_and_vertex_parents(Object *obedit)
 }
 
 /* load editNurb in object */
-void load_editNurb(Object *obedit)
+void ED_curve_editnurb_load(Object *obedit)
 {
 	ListBase *editnurb = object_editcurve_get(obedit);
 
@@ -1210,7 +1210,7 @@ void load_editNurb(Object *obedit)
 }
 
 /* make copy in cu->editnurb */
-void make_editNurb(Object *obedit)
+void ED_curve_editnurb_make(Object *obedit)
 {
 	Curve *cu = (Curve *)obedit->data;
 	EditNurb *editnurb = cu->editnurb;
@@ -1253,7 +1253,7 @@ void make_editNurb(Object *obedit)
 	}
 }
 
-void free_editNurb(Object *obedit)
+void ED_curve_editnurb_free(Object *obedit)
 {
 	Curve *cu = obedit->data;
 
@@ -1302,7 +1302,7 @@ static int separate_exec(bContext *C, wmOperator *op)
 	id_us_min(&oldcu->id); /* because new curve is a copy: reduce user count */
 
 	/* 3. put new object in editmode, clear it and set separated nurbs */
-	make_editNurb(newob);
+	ED_curve_editnurb_make(newob);
 	newedit = newcu->editnurb;
 	BKE_nurbList_free(&newedit->nurbs);
 	BKE_curve_editNurb_keyIndex_free(newedit);
@@ -1310,8 +1310,8 @@ static int separate_exec(bContext *C, wmOperator *op)
 	BLI_movelisttolist(&newedit->nurbs, &newnurb);
 
 	/* 4. put old object out of editmode and delete separated geometry */
-	load_editNurb(newob);
-	free_editNurb(newob);
+	ED_curve_editnurb_load(newob);
+	ED_curve_editnurb_free(newob);
 	curve_delete_segments(oldob, true);
 
 	DAG_id_tag_update(&oldob->id, OB_RECALC_DATA);  /* this is the original one */
@@ -4164,7 +4164,7 @@ void CURVE_OT_make_segment(wmOperatorType *ot)
 
 /***************** pick select from 3d view **********************/
 
-bool mouse_nurb(bContext *C, const int mval[2], bool extend, bool deselect, bool toggle)
+bool ED_curve_editnurb_select_pick(bContext *C, const int mval[2], bool extend, bool deselect, bool toggle)
 {
 	Object *obedit = CTX_data_edit_object(C);
 	Curve *cu = obedit->data;
diff --git a/source/blender/editors/curve/editcurve_add.c b/source/blender/editors/curve/editcurve_add.c
index 5347ef051..246f089 100644
--- a/source/blender/editors/curve/editcurve_add.c
+++ b/source/blender/editors/curve/editcurve_add.c
@@ -105,7 +105,7 @@ static const char *get_surf_defname(int type)
 }
 
 
-Nurb *add_nurbs_primitive(bContext *C, Object *obedit, float mat[4][4], int type, int newob)
+Nurb *ED_curve_add_nurbs_primitive(bContext *C, Object *obedit, float mat[4][4], int type, int newob)
 {
 	static int xzproj = 0;   /* this function calls itself... */
 	ListBase *editnurb = object_editcurve_get(obedit);
@@ -346,7 +346,7 @@ Nurb *add_nurbs_primitive(bContext *C, Object *obedit, float mat[4][4], int type
 			break;
 		case CU_PRIM_TUBE: /* Cylinder */
 			if (cutype == CU_NURBS) {
-				nu = add_nurbs_primitive(C, obedit, mat, CU_NURBS | CU_PRIM_CIRCLE, 0); /* circle */
+				nu = ED_curve_add_nurbs_primitive(C, obedit, mat, CU_NURBS | CU_PRIM_CIRCLE, 0); /* circle */
 				nu->resolu = cu->resolu;
 				nu->flag = CU_SMOOTH;
 				BLI_addtail(editnurb, nu); /* temporal for extrude and translate */
@@ -423,7 +423,7 @@ Nurb *add_nurbs_primitive(bContext *C, Object *obedit, float mat[4][4], int type
 				float tmp_vec[3] = {0.f, 0.f, 1.f};
 
 				xzproj = 1;
-				nu = add_nurbs_primitive(C, obedit, mat, CU_NURBS | CU_PRIM_CIRCLE, 0); /* circle */
+				nu = ED_curve_add_nurbs_primitive(C, obedit, mat, CU_NURBS | CU_PRIM_CIRCLE, 0); /* circle */
 				xzproj = 0;
 				nu->resolu = cu->resolu;
 				nu->resolv = cu->resolv;
@@ -523,7 +523,7 @@ static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf)
 	dia = RNA_float_get(op->ptr, "radius");
 	mul_mat3_m4_fl(mat, dia);
 
-	nu = add_nurbs_primitive(C, obedit, mat, type, newob);
+	nu = ED_curve_add_nurbs_primitive(C, obedit, mat, type, newob);
 	editnurb = object_editcurve_get(obedit);
 	BLI_addtail(editnurb, nu);
 
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c
index 1eee5d0..9fba646 100644
--- a/source/blender/editors/curve/editfont.c
+++ b/source/blender/editors/curve/editfont.c
@@ -1510,7 +1510,7 @@ void FONT_OT_textbox_remove(wmOperatorType *ot)
 
 /***************** editmode enter/exit ********************/
 
-void make_editText(Object *obedit)
+void ED_curve_editfont_make(Object *obedit)
 {
 	Curve *cu = obedit->data;
 	EditFont *ef = cu->editfont;
@@ -1546,7 +1546,7 @@ void make_editText(Object *obedit)
 	BKE_vfont_select_clamp(obedit);
 }
 
-void load_editText(Object *obedit)
+void ED_curve_editfont_load(Object *obedit)
 {
 	Curve *cu = obedit->data;
 	EditFont *ef = cu->editfont;
@@ -1575,7 +1575,7 @@ void load_editText(Object *obedit)
 	cu->selend = ef->selend;
 }
 
-void free_editText(Object *obedit)
+void ED_curve_editfont_free(Object *obedit)
 {
 	BKE_curve_editfont_free((Curve *)obedit->data);
 }
@@ -1886,7 +1886,7 @@ void undo_push_font(bContext *C, const char *name)
 /**
  * TextBox selection
  */
-bool mouse_font(bContext *C, const int mval[2], bool extend, bool deselect, bool toggle)
+bool ED_curve_editfont_select_pick(bContext *C, const int mval[2], bool extend, bool deselect, bool toggle)
 {
 	Object *obedit = CTX_data_edit_object(C);
 	Curve *cu = obedit->data;
diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h
index 35bb12d..7d7ee33 100644
--- a/source/blender/editors/include/ED_armature.h
+++ b/source/blender/editors/include/ED_armature.h
@@ -128,7 +128,7 @@ void ED_armature_deselect_all_visible(struct Object *obedit);
 
 int ED_do_pose_selectbuffer(struct Scene *scene, struct Base *base, unsigned int *buffer,
                             short hits, bool extend, bool deselect, bool toggle, bool do_nearest);
-bool mouse_armature(struct bContext *C, const int mval[2], bool extend, bool deselect, bool toggle);
+bool ED_armature_select_pick(struct bContext *C, const int mval[2], bool extend, bool deselect, bool toggle);
 int join_armature_exec(struct bContext *C, struct wmOperator *op);
 struct Bone *get_indexed_bone(struct Object *ob, int index);
 float ED_rollBoneToVector(EditBone *bone, const float new_up_axis[3], const bool axis_only);
diff --git a/source/blender/editors/include/ED_curve.h b/source/blender/editors/include/ED_curve.h
index 6d53209..ad3b415 100644
--- a/source/blender/editors/include/ED_curve.h
+++ b/source/blender/editors/include/ED_curve.h
@@ -51,13 +51,13 @@ void    ED_keymap_curve(struct wmKeyConfig *keyconf);
 void    undo_push_curve(struct bContext *C, const char *name);
 ListBase *object_editcurve_get(struct Object *ob);
 
-void    load_editNurb(struct Object *obedit);
-void    make_editNurb(struct Object *obedit);
-void    free_editNurb(struct Object *obedit);
+void    ED_curve_editnurb_load(struct Object *obedit);
+void    ED_curve_editnurb_make(struct Object *obedit);
+void    ED_curve_editnurb_free(struct Object *obedit);
 
-bool    mouse_nurb(struct bContext *C, const int mval[2], bool extend, bool deselect, bool toggle);
+bool    ED_curve_editnurb_select_pick(struct bContext *C, const int mval[2], bool extend, bool deselect, bool toggle);
 
-struct Nurb *add_nurbs_primitive(struct bContext *C, struct Object *obedit, float mat[4][4], int type, int newob);
+struct Nurb *ED_curve_add_nurbs_primitive(struct bContext *C, struct Object *obedit, float mat[4][4], int type, int newob);
 
 bool    ED_curve_nurb_select_check(struct Curve *cu, struct Nurb *nu);
 int     ED_curve_nurb_select_count(struct Curve *cu, struct Nurb *nu);
@@ -75,9 +75,9 @@ bool ED_curve_select_nth(struct Curve *cu, int nth, int skip, int offset);
 
 /* editfont.h */
 void    undo_push_font(struct bContext *C, const char *name);
-void    make_editText(struct Object *obedit);
-void    load_editText(struct Object *obedit);
-void    free_editText(struct Object *obedit);
+void    ED_curve_editfont_load(struct Object *obedit);
+void    ED_curve_editfont_make(struct Object *obedit);
+void    ED_curve_editfont_free(struct Object *obedit);
 
 void    ED_text_to_object(struct bContext *C, struct Text *text, const bool split_lines);
 
@@ -88,7 +88,7 @@ int ED_curve_updateAnimPaths(struct Curve *cu);
 
 bool ED_curve_active_center(struct Curve *cu, float center[3]);
 
-bool    mouse_font(struct bContext *C, const int mval[2], bool extend, bool deselect, bool toggle);
+bool ED_curve_editfont_select_pick(struct bContext *C, const int mval[2], bool extend, bool deselect, bool toggle);
 
 #if 0
 /* debug only */
diff --git a/source/blender/editors/include/ED_lattice.h b/source/blender/editors/include/ED_lattice.h
index 6fe1524..30d6657 100644
--- a/source/blender/editors/include/ED_lattice.h
+++ b/source/blender/editors/include/ED_lattice.h
@@ -33,8 +33,8 @@
 
 struct Object;
 
-void free_editLatt(struct Object *ob);
-void make_editLatt(struct Object *obedit);
-void load_editLatt(struct Object *obedit);
+void ED_lattice_editlatt_free(struct Object *ob);
+void ED_lattice_editlatt_make(struct Object *obedit);
+void ED_lattice_editlatt_load(struct Object *obedit);
 
 #endif  /* __ED_LATTICE_H__ */
diff --git a/source/blender/editors/include/ED_mball.h b/source/blender/editors/include/ED_mball.h
index 05a4cca..232d7d1 100644
--- a/source/blender/editors/include/ED_mball.h
+++ b/source/blender/editors/include/ED_mball.h
@@ -39,13 +39,13 @@ void ED_operatortypes_metaball(void);
 void ED_operatormacros_metaball(void);
 void E

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list