diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-04-28 20:49:00 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-04-28 20:49:00 +0400 |
commit | f88cfd9168c2977fc4acc414d8709da6484e23e7 (patch) | |
tree | 7fcf7cf479f94a1fd2bcb69ae846cd2078658b98 /source/blender/editors/object | |
parent | e2c453b5f9d3a0a26333b6585f07ebf9e3a24819 (diff) |
Code and style cleanup in own modules in BKE and also mball module
- Make sure functions are named in way BKE_<object>_<action> (same way as RNA callbacks)
- Make functions which are used by mball.c only static and remove their prototypes
from public header file.
Further cleanup is coming.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_add.c | 14 | ||||
-rw-r--r-- | source/blender/editors/object/object_edit.c | 4 | ||||
-rw-r--r-- | source/blender/editors/object/object_modifier.c | 4 | ||||
-rw-r--r-- | source/blender/editors/object/object_relations.c | 4 | ||||
-rw-r--r-- | source/blender/editors/object/object_shapekey.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_transform.c | 8 |
6 files changed, 18 insertions, 18 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 21c9f776b94..fcce65c9326 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -1391,7 +1391,7 @@ static int convert_exec(bContext *C, wmOperator *op) ((Curve *)newob->data)->id.us--; /* make a new copy of the curve */ - newob->data = copy_curve(ob->data); + newob->data = BKE_curve_copy(ob->data); } else { newob = ob; @@ -1456,7 +1456,7 @@ static int convert_exec(bContext *C, wmOperator *op) ((Curve *)newob->data)->id.us--; /* make a new copy of the curve */ - newob->data = copy_curve(ob->data); + newob->data = BKE_curve_copy(ob->data); } else { newob = ob; @@ -1474,7 +1474,7 @@ static int convert_exec(bContext *C, wmOperator *op) base->flag &= ~SELECT; ob->flag &= ~SELECT; - baseob = find_basis_mball(scene, ob); + baseob = BKE_metaball_basis_find(scene, ob); if (ob != baseob) { /* if motherball is converting it would be marked as done later */ @@ -1701,7 +1701,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base if (dupflag & USER_DUP_CURVE) { ID_NEW_US2(obn->data) else { - obn->data = copy_curve(obn->data); + obn->data = BKE_curve_copy(obn->data); didit = 1; } id->us--; @@ -1711,7 +1711,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base if (dupflag & USER_DUP_SURF) { ID_NEW_US2(obn->data) else { - obn->data = copy_curve(obn->data); + obn->data = BKE_curve_copy(obn->data); didit = 1; } id->us--; @@ -1721,7 +1721,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base if (dupflag & USER_DUP_FONT) { ID_NEW_US2(obn->data) else { - obn->data = copy_curve(obn->data); + obn->data = BKE_curve_copy(obn->data); didit = 1; } id->us--; @@ -1731,7 +1731,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base if (dupflag & USER_DUP_MBALL) { ID_NEW_US2(obn->data) else { - obn->data = copy_mball(obn->data); + obn->data = BKE_metaball_copy(obn->data); didit = 1; } id->us--; diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 874b04fe87d..d5385d00c8a 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -746,10 +746,10 @@ static void copy_texture_space(Object *to, Object *ob) /* pass */ } else if (to->type == OB_MBALL) { - tex_space_mball(to); + BKE_metaball_tex_space_calc(to); } else { - tex_space_curve(to->data); + BKE_curve_tex_space_calc(to->data); } } diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index bd69b3adc5e..f2d682cd0cb 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -544,9 +544,9 @@ static int modifier_apply_obdata(ReportList *reports, Scene *scene, Object *ob, cu = ob->data; BKE_report(reports, RPT_INFO, "Applied modifier only changed CV points, not tessellated/bevel vertices"); - vertexCos = curve_getVertexCos(cu, &cu->nurb, &numVerts); + vertexCos = BKE_curve_vertexCos_get(cu, &cu->nurb, &numVerts); mti->deformVerts(md, ob, NULL, vertexCos, numVerts, 0, 0); - curve_applyVertexCos(cu, &cu->nurb, vertexCos); + BK_curve_vertexCos_apply(cu, &cu->nurb, vertexCos); MEM_freeN(vertexCos); diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 3a00c69fc47..077ae2830a9 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -1480,12 +1480,12 @@ static void single_obdata_users(Main *bmain, Scene *scene, int flag) // ipo_idnew(me->key->ipo); /* drivers */ break; case OB_MBALL: - ob->data = copy_mball(ob->data); + ob->data = BKE_metaball_copy(ob->data); break; case OB_CURVE: case OB_SURF: case OB_FONT: - ob->data = cu = copy_curve(ob->data); + ob->data = cu = BKE_curve_copy(ob->data); ID_NEW(cu->bevobj); ID_NEW(cu->taperobj); break; diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c index bd88bbda32c..5d31bfff99a 100644 --- a/source/blender/editors/object/object_shapekey.c +++ b/source/blender/editors/object/object_shapekey.c @@ -119,7 +119,7 @@ static int ED_object_shape_key_remove(bContext *C, Object *ob) break; case OB_CURVE: case OB_SURF: - key_to_curve(key->refkey, ob->data, BKE_curve_nurbs(ob->data)); + key_to_curve(key->refkey, ob->data, BKE_curve_nurbs_get(ob->data)); break; case OB_LATTICE: key_to_latt(key->refkey, ob->data); diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index 1c0899ab551..e416bd5b762 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -520,7 +520,7 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo mul_m4_v3(mat, bezt->vec[2]); bezt->radius *= scale; } - calchandlesNurb(nu); + BKE_nurb_handles_calc(nu); } else { a = nu->pntsu * nu->pntsv; @@ -779,15 +779,15 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) Curve *cu = ob->data; if (centermode == ORIGIN_TO_CURSOR) { /* done */ } - else if (around == V3D_CENTROID) { curve_center_median(cu, cent); } - else { curve_center_bounds(cu, cent); } + else if (around == V3D_CENTROID) { BKE_curve_center_median(cu, cent); } + else { BKE_curve_center_bounds(cu, cent); } /* don't allow Z change if curve is 2D */ if ((ob->type == OB_CURVE) && !(cu->flag & CU_3D)) cent[2] = 0.0; negate_v3_v3(cent_neg, cent); - curve_translate(cu, cent_neg, 1); + BKE_curve_translate(cu, cent_neg, 1); tot_change++; cu->id.flag |= LIB_DOIT; |