Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-04-28 20:49:00 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-04-28 20:49:00 +0400
commitf88cfd9168c2977fc4acc414d8709da6484e23e7 (patch)
tree7fcf7cf479f94a1fd2bcb69ae846cd2078658b98 /source/blender/editors
parente2c453b5f9d3a0a26333b6585f07ebf9e3a24819 (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')
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c2
-rw-r--r--source/blender/editors/curve/editcurve.c210
-rw-r--r--source/blender/editors/curve/editfont.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c2
-rw-r--r--source/blender/editors/include/ED_curve.h2
-rw-r--r--source/blender/editors/interface/interface_widgets.c4
-rw-r--r--source/blender/editors/metaball/mball_edit.c2
-rw-r--r--source/blender/editors/object/object_add.c14
-rw-r--r--source/blender/editors/object/object_edit.c4
-rw-r--r--source/blender/editors/object/object_modifier.c4
-rw-r--r--source/blender/editors/object/object_relations.c4
-rw-r--r--source/blender/editors/object/object_shapekey.c2
-rw-r--r--source/blender/editors/object/object_transform.c8
-rw-r--r--source/blender/editors/render/render_shading.c4
-rw-r--r--source/blender/editors/space_clip/clip_ops.c2
-rw-r--r--source/blender/editors/space_graph/graph_draw.c4
-rw-r--r--source/blender/editors/space_info/info_stats.c2
-rw-r--r--source/blender/editors/space_node/drawnode.c4
-rw-r--r--source/blender/editors/space_view3d/drawobject.c12
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c8
-rw-r--r--source/blender/editors/space_view3d/view3d_snap.c8
-rw-r--r--source/blender/editors/transform/transform_conversions.c4
-rw-r--r--source/blender/editors/transform/transform_generics.c8
-rw-r--r--source/blender/editors/transform/transform_manipulator.c2
-rw-r--r--source/blender/editors/transform/transform_orientations.c2
25 files changed, 160 insertions, 160 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index fbed5cc539a..8aafdc6ab40 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -1427,7 +1427,7 @@ static bAnimChannelType ACF_DSCAM=
static int acf_dscur_icon(bAnimListElem *ale)
{
Curve *cu= (Curve *)ale->data;
- short obtype= curve_type(cu);
+ short obtype= BKE_curve_type_get(cu);
switch (obtype) {
case OB_FONT:
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index d339af39b22..e65b4280dc9 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -132,7 +132,7 @@ static void set_actNurb(Object *obedit, Nurb *nu)
if (nu==NULL)
cu->actnu = -1;
else {
- ListBase *nurbs= curve_editnurbs(cu);
+ ListBase *nurbs= BKE_curve_editNurbs_get(cu);
cu->actnu = BLI_findindex(nurbs, nu);
}
}
@@ -140,7 +140,7 @@ static void set_actNurb(Object *obedit, Nurb *nu)
static Nurb *get_actNurb(Object *obedit)
{
Curve *cu= obedit->data;
- ListBase *nurbs= curve_editnurbs(cu);
+ ListBase *nurbs= BKE_curve_editNurbs_get(cu);
return BLI_findlink(nurbs, cu->actnu);
}
@@ -736,7 +736,7 @@ static void calc_keyHandles(ListBase *nurb, float *key)
if (nextp) key_to_bezt(nextfp, nextp, &next);
if (prevp) key_to_bezt(prevfp, prevp, &prev);
- calchandleNurb(&cur, prevp ? &prev : NULL, nextp ? &next : NULL, 0);
+ BKE_nurb_handle_calc(&cur, prevp ? &prev : NULL, nextp ? &next : NULL, 0);
bezt_to_key(&cur, fp);
prevp= bezt;
@@ -782,7 +782,7 @@ static void calc_shapeKeys(Object *obedit)
BezTriple *bezt, *oldbezt;
BPoint *bp, *oldbp;
Nurb *nu;
- int totvert= count_curveverts(&editnurb->nurbs);
+ int totvert= BKE_nurbList_verts_count(&editnurb->nurbs);
float (*ofs)[3] = NULL;
float *oldkey, *newkey, *ofp;
@@ -1207,11 +1207,11 @@ void load_editNurb(Object *obedit)
ListBase newnurb= {NULL, NULL}, oldnurb= cu->nurb;
for (nu= editnurb->first; nu; nu= nu->next) {
- newnu= duplicateNurb(nu);
+ newnu= BKE_nurb_duplicate(nu);
BLI_addtail(&newnurb, newnu);
if (nu->type == CU_NURBS) {
- clamp_nurb_order_u(nu);
+ BKE_nurb_order_clamp_u(nu);
}
}
@@ -1220,7 +1220,7 @@ void load_editNurb(Object *obedit)
calc_shapeKeys(obedit);
ED_curve_updateAnimPaths(obedit->data);
- freeNurblist(&oldnurb);
+ BKE_nurbList_free(&oldnurb);
}
set_actNurb(obedit, NULL);
@@ -1247,8 +1247,8 @@ void make_editNurb(Object *obedit)
}
if (editnurb) {
- freeNurblist(&editnurb->nurbs);
- free_curve_editNurb_keyIndex(editnurb);
+ BKE_nurbList_free(&editnurb->nurbs);
+ BKE_curve_editNurb_keyIndex_free(editnurb);
editnurb->keyindex= NULL;
}
else {
@@ -1260,8 +1260,8 @@ void make_editNurb(Object *obedit)
cu->lastsel= NULL; /* for select row */
while (nu) {
- newnu= duplicateNurb(nu);
- test2DNurb(newnu); // after join, or any other creation of curve
+ newnu= BKE_nurb_duplicate(nu);
+ BKE_nurb_test2D(newnu); // after join, or any other creation of curve
BLI_addtail(&editnurb->nurbs, newnu);
if (nu_act == NULL && isNurbsel(nu)) {
@@ -1285,7 +1285,7 @@ void free_editNurb(Object *obedit)
{
Curve *cu= obedit->data;
- free_curve_editNurb(cu);
+ BKE_curve_editNurb_free(cu);
}
void CU_deselect_all(Object *obedit)
@@ -1377,15 +1377,15 @@ static int separate_exec(bContext *C, wmOperator *op)
ED_base_object_select(newbase, BA_DESELECT);
newob= newbase->object;
- newcu= newob->data= copy_curve(oldcu);
+ newcu= newob->data= BKE_curve_copy(oldcu);
newcu->editnurb= NULL;
oldcu->id.us--; /* because new curve is a copy: reduce user count */
/* 2. put new object in editmode and clear it */
make_editNurb(newob);
newedit= newcu->editnurb;
- freeNurblist(&newedit->nurbs);
- free_curve_editNurb_keyIndex(newedit);
+ BKE_nurbList_free(&newedit->nurbs);
+ BKE_curve_editNurb_keyIndex_free(newedit);
/* 3. move over parts from old object */
for (nu= oldedit->nurbs.first; nu; nu=nu1) {
@@ -1547,7 +1547,7 @@ static void translateflagNurb(ListBase *editnurb, short flag, const float vec[3]
}
}
- test2DNurb(nu);
+ BKE_nurb_test2D(nu);
}
}
@@ -1602,7 +1602,7 @@ static int deleteflagNurb(bContext *C, wmOperator *UNUSED(op), int flag)
if (a==0) {
BLI_remlink(editnurb, nu);
keyIndex_delNurb(cu->editnurb, nu);
- freeNurb(nu); nu=NULL;
+ BKE_nurb_free(nu); nu=NULL;
}
else {
/* is nurb in U direction selected */
@@ -1640,9 +1640,9 @@ static int deleteflagNurb(bContext *C, wmOperator *UNUSED(op), int flag)
nu->pntsv= newv;
MEM_freeN(nu->bp);
nu->bp= newbp;
- clamp_nurb_order_v(nu);
+ BKE_nurb_order_clamp_v(nu);
- nurbs_knot_calc_v(nu);
+ BKE_nurb_knot_calc_v(nu);
}
else {
/* is the nurb in V direction selected */
@@ -1684,15 +1684,15 @@ static int deleteflagNurb(bContext *C, wmOperator *UNUSED(op), int flag)
nu->pntsu= nu->pntsv;
nu->pntsv= 1;
SWAP(short, nu->orderu, nu->orderv);
- clamp_nurb_order_u(nu);
+ BKE_nurb_order_clamp_u(nu);
if (nu->knotsv) MEM_freeN(nu->knotsv);
nu->knotsv= NULL;
}
else {
nu->pntsu= newu;
- clamp_nurb_order_u(nu);
+ BKE_nurb_order_clamp_u(nu);
}
- nurbs_knot_calc_u(nu);
+ BKE_nurb_knot_calc_u(nu);
}
}
}
@@ -1743,7 +1743,7 @@ static short extrudeflagNurb(EditNurb *editnurb, int flag)
nu->pntsv= 2;
nu->orderv= 2;
- nurbs_knot_calc_v(nu);
+ BKE_nurb_knot_calc_v(nu);
}
}
else {
@@ -1786,7 +1786,7 @@ static short extrudeflagNurb(EditNurb *editnurb, int flag)
MEM_freeN(nu->bp);
nu->bp= newbp;
nu->pntsv++;
- nurbs_knot_calc_v(nu);
+ BKE_nurb_knot_calc_v(nu);
}
else if (v==0 || v== nu->pntsu-1) { /* column in v-direction selected */
ok= 1;
@@ -1813,7 +1813,7 @@ static short extrudeflagNurb(EditNurb *editnurb, int flag)
MEM_freeN(nu->bp);
nu->bp= newbp;
nu->pntsu++;
- nurbs_knot_calc_u(nu);
+ BKE_nurb_knot_calc_u(nu);
}
}
}
@@ -1911,7 +1911,7 @@ static void adduplicateflagNurb(Object *obedit, short flag)
/* knots */
newnu->knotsu= NULL;
- nurbs_knot_calc_u(newnu);
+ BKE_nurb_knot_calc_u(newnu);
}
bp++;
}
@@ -1956,8 +1956,8 @@ static void adduplicateflagNurb(Object *obedit, short flag)
newnu->pntsv= newv;
newnu->bp =
(BPoint*)MEM_mallocN(newu * newv * sizeof(BPoint), "adduplicateN6");
- clamp_nurb_order_u(newnu);
- clamp_nurb_order_v(newnu);
+ BKE_nurb_order_clamp_u(newnu);
+ BKE_nurb_order_clamp_v(newnu);
newnu->knotsu= newnu->knotsv= NULL;
@@ -1972,20 +1972,20 @@ static void adduplicateflagNurb(Object *obedit, short flag)
}
}
}
- if (check_valid_nurb_u(newnu)) {
+ if (BKE_nurb_check_valid_u(newnu)) {
if (nu->pntsu==newnu->pntsu && nu->knotsu) {
newnu->knotsu= MEM_dupallocN( nu->knotsu );
}
else {
- nurbs_knot_calc_u(newnu);
+ BKE_nurb_knot_calc_u(newnu);
}
}
- if (check_valid_nurb_v(newnu)) {
+ if (BKE_nurb_check_valid_v(newnu)) {
if (nu->pntsv==newnu->pntsv && nu->knotsv) {
newnu->knotsv= MEM_dupallocN( nu->knotsv );
}
else {
- nurbs_knot_calc_v(newnu);
+ BKE_nurb_knot_calc_v(newnu);
}
}
}
@@ -2010,7 +2010,7 @@ static int switch_direction_exec(bContext *C, wmOperator *UNUSED(op))
for (nu= editnurb->nurbs.first; nu; nu= nu->next)
if (isNurbsel(nu)) {
- switchdirectionNurb(nu);
+ BKE_nurb_direction_switch(nu);
keyData_switchDirectionNurb(cu, nu);
}
@@ -2174,7 +2174,7 @@ static int smooth_exec(bContext *C, wmOperator *UNUSED(op))
}
MEM_freeN(beztOrig);
if (change)
- calchandlesNurb(nu);
+ BKE_nurb_handles_calc(nu);
}
else if (nu->bp) {
bpOrig = MEM_dupallocN( nu->bp );
@@ -2893,7 +2893,7 @@ static void subdividenurb(Object *obedit, int number_cuts)
nu->bezt= beztnew;
nu->pntsu+= amount;
- calchandlesNurb(nu);
+ BKE_nurb_handles_calc(nu);
}
} /* End of 'if (nu->type == CU_BEZIER)' */
else if (nu->pntsv==1) {
@@ -2965,7 +2965,7 @@ static void subdividenurb(Object *obedit, int number_cuts)
nu->pntsu+= amount;
if (nu->type & CU_NURBS) {
- nurbs_knot_calc_u(nu);
+ BKE_nurb_knot_calc_u(nu);
}
}
} /* End of 'else if (nu->pntsv==1)' */
@@ -3086,8 +3086,8 @@ static void subdividenurb(Object *obedit, int number_cuts)
nu->bp= bpnew;
nu->pntsu= (number_cuts+1)*nu->pntsu-number_cuts;
nu->pntsv= (number_cuts+1)*nu->pntsv-number_cuts;
- nurbs_knot_calc_u(nu);
- nurbs_knot_calc_v(nu);
+ BKE_nurb_knot_calc_u(nu);
+ BKE_nurb_knot_calc_v(nu);
} /* End of 'if (sel== nu->pntsu*nu->pntsv)' (subdivide entire NURB) */
else {
/* subdivide in v direction? */
@@ -3132,7 +3132,7 @@ static void subdividenurb(Object *obedit, int number_cuts)
MEM_freeN(nu->bp);
nu->bp= bpnew;
nu->pntsv+= sel;
- nurbs_knot_calc_v(nu);
+ BKE_nurb_knot_calc_v(nu);
}
else {
/* or in u direction? */
@@ -3173,7 +3173,7 @@ static void subdividenurb(Object *obedit, int number_cuts)
MEM_freeN(nu->bp);
nu->bp= bpnew;
nu->pntsu+= sel;
- nurbs_knot_calc_u(nu); /* shift knots forward */
+ BKE_nurb_knot_calc_u(nu); /* shift knots forward */
}
}
}
@@ -3373,13 +3373,13 @@ static int convertspline(short type, Nurb *nu)
nu->bp= NULL;
nu->pntsu= nr;
nu->type = CU_BEZIER;
- calchandlesNurb(nu);
+ BKE_nurb_handles_calc(nu);
}
else if (type==CU_NURBS) {
nu->type = CU_NURBS;
nu->orderu= 4;
nu->flagu &= CU_NURB_CYCLIC; /* disable all flags except for cyclic */
- nurbs_knot_calc_u(nu);
+ BKE_nurb_knot_calc_u(nu);
a= nu->pntsu*nu->pntsv;
bp= nu->bp;
while (a--) {
@@ -3436,7 +3436,7 @@ static int convertspline(short type, Nurb *nu)
if (type== CU_NURBS) {
nu->flagu &= CU_NURB_CYCLIC; /* disable all flags except for cyclic */
nu->flagu |= CU_NURB_BEZIER;
- nurbs_knot_calc_u(nu);
+ BKE_nurb_knot_calc_u(nu);
}
}
}
@@ -3559,7 +3559,7 @@ static int set_handle_type_exec(bContext *C, wmOperator *op)
Object *obedit= CTX_data_edit_object(C);
ListBase *editnurb= object_editcurve_get(obedit);
- sethandlesNurb(editnurb, RNA_enum_get(op->ptr, "type"));
+ BKE_nurbList_handles_set(editnurb, RNA_enum_get(op->ptr, "type"));
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
DAG_id_tag_update(obedit->data, 0);
@@ -3865,15 +3865,15 @@ static void merge_2_nurb(wmOperator *op, ListBase *editnurb, Nurb *nu1, Nurb *nu
if (nu1->type == CU_NURBS) {
/* merge knots */
- nurbs_knot_calc_u(nu1);
+ BKE_nurb_knot_calc_u(nu1);
/* make knots, for merged curved for example */
- nurbs_knot_calc_v(nu1);
+ BKE_nurb_knot_calc_v(nu1);
}
MEM_freeN(temp);
BLI_remlink(editnurb, nu2);
- freeNurb(nu2);
+ BKE_nurb_free(nu2);
}
static int merge_nurb(bContext *C, wmOperator *op)
@@ -3976,7 +3976,7 @@ static int make_segment_exec(bContext *C, wmOperator *op)
else {
if ( BEZSELECTED_HIDDENHANDLES(cu, &(nu->bezt[nu->pntsu-1])) ) {
nu1= nu;
- switchdirectionNurb(nu);
+ BKE_nurb_direction_switch(nu);
keyData_switchDirectionNurb(cu, nu);
}
}
@@ -3984,7 +3984,7 @@ static int make_segment_exec(bContext *C, wmOperator *op)
else if (nu2==NULL) {
if ( BEZSELECTED_HIDDENHANDLES(cu, nu->bezt) ) {
nu2= nu;
- switchdirectionNurb(nu);
+ BKE_nurb_direction_switch(nu);
keyData_switchDirectionNurb(cu, nu);
}
else {
@@ -4003,7 +4003,7 @@ static int make_segment_exec(bContext *C, wmOperator *op)
bp= bp+(nu->pntsu-1);
if ( bp->f1 & SELECT ) {
nu1= nu;
- switchdirectionNurb(nu);
+ BKE_nurb_direction_switch(nu);
keyData_switchDirectionNurb(cu, nu);
}
}
@@ -4011,7 +4011,7 @@ static int make_segment_exec(bContext *C, wmOperator *op)
else if (nu2==NULL) {
if ( bp->f1 & SELECT ) {
nu2= nu;
- switchdirectionNurb(nu);
+ BKE_nurb_direction_switch(nu);
keyData_switchDirectionNurb(cu, nu);
}
else {
@@ -4038,8 +4038,8 @@ static int make_segment_exec(bContext *C, wmOperator *op)
nu1->bezt= bezt;
nu1->pntsu+= nu2->pntsu;
BLI_remlink(nubase, nu2);
- freeNurb(nu2); nu2= NULL;
- calchandlesNurb(nu1);
+ BKE_nurb_free(nu2); nu2= NULL;
+ BKE_nurb_handles_calc(nu1);
}
else {
bp =
@@ -4057,7 +4057,7 @@ static int make_segment_exec(bContext *C, wmOperator *op)
/* now join the knots */
if (nu1->type == CU_NURBS) {
if (nu1->knotsu==NULL) {
- nurbs_knot_calc_u(nu1);
+ BKE_nurb_knot_calc_u(nu1);
}
else {
fp= MEM_mallocN(sizeof(float)*KNOTSU(nu1), "addsegment3");
@@ -4076,7 +4076,7 @@ static int make_segment_exec(bContext *C, wmOperator *op)
}
}
}
- freeNurb(nu2); nu2= NULL;
+ BKE_nurb_free(nu2); nu2= NULL;
}
set_actNurb(obedit, nu1); /* for selected */
@@ -4088,12 +4088,12 @@ static int make_segment_exec(bContext *C, wmOperator *op)
if (nu1->type == CU_BEZIER && BEZSELECTED_HIDDENHANDLES(cu, nu1->bezt) &&
BEZSELECTED_HIDDENHANDLES(cu, nu1->bezt+(nu1->pntsu-1))) {
nu1->flagu|= CU_NURB_CYCLIC;
- calchandlesNurb(nu1);
+ BKE_nurb_handles_calc(nu1);
ok= 1;
}
else if (nu1->type == CU_NURBS && nu1->bp->f1&SELECT && (nu1->bp+(nu1->pntsu-1))->f1&SELECT) {
nu1->flagu|= CU_NURB_CYCLIC;
- nurbs_knot_calc_u(nu1);
+ BKE_nurb_knot_calc_u(nu1);
ok= 1;
}
}
@@ -4293,7 +4293,7 @@ static int spin_nurb(float viewmat[][4], Object *obedit, float *axis, float *cen
if (isNurbsel(nu)) {
nu->orderv= 4;
nu->flagv |= CU_NURB_CYCLIC;
- nurbs_knot_calc_v(nu);
+ BKE_nurb_knot_calc_v(nu);
}
}
}
@@ -4446,7 +4446,7 @@ static int addvert_Nurb(bContext *C, short mode, float location[3])
newbp->vec[3]= 1.0;
newnu->knotsu= newnu->knotsv= NULL;
- nurbs_knot_calc_u(newnu);
+ BKE_nurb_knot_calc_u(newnu);
ok= 1;
nu= newnu;
@@ -4538,7 +4538,7 @@ static int addvert_Nurb(bContext *C, short mode, float location[3])
if (bezt_recalc[1]) {
const char h1 = bezt_recalc[1]->h1, h2 = bezt_recalc[1]->h2;
bezt_recalc[1]->h1 = bezt_recalc[1]->h2 = HD_AUTO;
- calchandleNurb(bezt_recalc[1], bezt_recalc[0], bezt_recalc[2], 0);
+ BKE_nurb_handle_calc(bezt_recalc[1], bezt_recalc[0], bezt_recalc[2], 0);
bezt_recalc[1]->h1 = h1;
bezt_recalc[1]->h2 = h2;
}
@@ -4548,8 +4548,8 @@ static int addvert_Nurb(bContext *C, short mode, float location[3])
}
- if (newnu) calchandlesNurb(newnu);
- else calchandlesNurb(nu);
+ if (newnu) BKE_nurb_handles_calc(newnu);
+ else BKE_nurb_handles_calc(nu);
}
}
}
@@ -4617,14 +4617,14 @@ static int addvert_Nurb(bContext *C, short mode, float location[3])
if (!newnu) {
nu->pntsu++;
- nurbs_knot_calc_u(nu);
+ BKE_nurb_knot_calc_u(nu);
}
- else nurbs_knot_calc_u(newnu);
+ else BKE_nurb_knot_calc_u(newnu);
}
}
if (ok) {
- test2DNurb(nu);
+ BKE_nurb_test2D(nu);
if (ED_curve_updateAnimPaths(obedit->data))
WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, obedit);
@@ -4783,7 +4783,7 @@ static int toggle_cyclic_exec(bContext *C, wmOperator *op)
}
bezt++;
}
- calchandlesNurb(nu);
+ BKE_nurb_handles_calc(nu);
}
else if (nu->pntsv==1 && nu->type == CU_NURBS) {
if (nu->knotsu) { /* if check_valid_nurb_u fails the knotsu can be NULL */
@@ -4792,7 +4792,7 @@ static int toggle_cyclic_exec(bContext *C, wmOperator *op)
while (a--) {
if ( bp->f1 & SELECT ) {
nu->flagu ^= CU_NURB_CYCLIC;
- nurbs_knot_calc_u(nu); /* 1==u type is ignored for cyclic curves */
+ BKE_nurb_knot_calc_u(nu); /* 1==u type is ignored for cyclic curves */
break;
}
bp++;
@@ -4807,11 +4807,11 @@ static int toggle_cyclic_exec(bContext *C, wmOperator *op)
if ( bp->f1 & SELECT) {
if (direction==0 && nu->pntsu>1) {
nu->flagu ^= CU_NURB_CYCLIC;
- nurbs_knot_calc_u(nu); /* 1==u type is ignored for cyclic curves */
+ BKE_nurb_knot_calc_u(nu); /* 1==u type is ignored for cyclic curves */
}
if (direction==1 && nu->pntsv>1) {
nu->flagv ^= CU_NURB_CYCLIC;
- nurbs_knot_calc_v(nu); /* 2==v type is ignored for cyclic curves */
+ BKE_nurb_knot_calc_v(nu); /* 2==v type is ignored for cyclic curves */
}
break;
}
@@ -5472,7 +5472,7 @@ static int point_on_nurb(Nurb *nu, void *point)
static Nurb *get_lastsel_nurb(Curve *cu)
{
- ListBase *nubase= curve_editnurbs(cu);
+ ListBase *nubase= BKE_curve_editNurbs_get(cu);
Nurb *nu= nubase->first;
if (!cu->lastsel)
@@ -5638,7 +5638,7 @@ static int delete_exec(bContext *C, wmOperator *op)
}
else {
keyIndex_delNurbList(editnurb, nubase);
- freeNurblist(nubase);
+ BKE_nurbList_free(nubase);
if (ED_curve_updateAnimPaths(obedit->data))
WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, obedit);
@@ -5672,7 +5672,7 @@ static int delete_exec(bContext *C, wmOperator *op)
BLI_remlink(nubase, nu);
keyIndex_delNurb(editnurb, nu);
- freeNurb(nu); nu= NULL;
+ BKE_nurb_free(nu); nu= NULL;
}
}
}
@@ -5692,7 +5692,7 @@ static int delete_exec(bContext *C, wmOperator *op)
BLI_remlink(nubase, nu);
keyIndex_delNurb(editnurb, nu);
- freeNurb(nu); nu= NULL;
+ BKE_nurb_free(nu); nu= NULL;
}
}
}
@@ -5734,7 +5734,7 @@ static int delete_exec(bContext *C, wmOperator *op)
keyIndex_updateBezt(editnurb, nu->bezt, bezt1, nu->pntsu);
MEM_freeN(nu->bezt);
nu->bezt= bezt1;
- calchandlesNurb(nu);
+ BKE_nurb_handles_calc(nu);
}
}
else if (nu->pntsv==1) {
@@ -5770,8 +5770,8 @@ static int delete_exec(bContext *C, wmOperator *op)
}
#endif
}
- clamp_nurb_order_u(nu);
- nurbs_knot_calc_u(nu);
+ BKE_nurb_order_clamp_u(nu);
+ BKE_nurb_knot_calc_u(nu);
}
nu= next;
}
@@ -5797,7 +5797,7 @@ static int delete_exec(bContext *C, wmOperator *op)
bezt2= bezt+(nu->pntsu-1);
if ( (bezt2->f1 & SELECT) || (bezt2->f2 & SELECT) || (bezt2->f3 & SELECT) ) {
nu->flagu &= ~CU_NURB_CYCLIC;
- calchandlesNurb(nu);
+ BKE_nurb_handles_calc(nu);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
DAG_id_tag_update(obedit->data, 0);
}
@@ -5850,7 +5850,7 @@ static int delete_exec(bContext *C, wmOperator *op)
cu->actnu= -1;
BLI_remlink(nubase, nu);
- freeNurb(nu); nu = NULL;
+ BKE_nurb_free(nu); nu = NULL;
}
else if (nu1->flagu & CU_NURB_CYCLIC) { /* cyclic */
bezt =
@@ -5862,7 +5862,7 @@ static int delete_exec(bContext *C, wmOperator *op)
nu1->flagu &= ~CU_NURB_CYCLIC;
MEM_freeN(bezt);
- calchandlesNurb(nu);
+ BKE_nurb_handles_calc(nu);
}
else { /* add new curve */
@@ -5886,8 +5886,8 @@ static int delete_exec(bContext *C, wmOperator *op)
nu->pntsu= cut+1;
- calchandlesNurb(nu);
- calchandlesNurb(nu1);
+ BKE_nurb_handles_calc(nu);
+ BKE_nurb_handles_calc(nu1);
}
}
else if (bp1) {
@@ -5896,7 +5896,7 @@ static int delete_exec(bContext *C, wmOperator *op)
cu->actnu= -1;
BLI_remlink(nubase, nu);
- freeNurb(nu); nu= NULL;
+ BKE_nurb_free(nu); nu= NULL;
}
else if (nu1->flagu & CU_NURB_CYCLIC) { /* cyclic */
bp =
@@ -5926,11 +5926,11 @@ static int delete_exec(bContext *C, wmOperator *op)
nu1->knotsu= NULL;
nu->pntsu= cut+1;
- clamp_nurb_order_u(nu);
- nurbs_knot_calc_u(nu);
+ BKE_nurb_order_clamp_u(nu);
+ BKE_nurb_knot_calc_u(nu);
- clamp_nurb_order_u(nu1);
- nurbs_knot_calc_u(nu1);
+ BKE_nurb_order_clamp_u(nu1);
+ BKE_nurb_knot_calc_u(nu1);
}
}
}
@@ -5938,7 +5938,7 @@ static int delete_exec(bContext *C, wmOperator *op)
else if (type==2) {
cu->actnu= -1;
keyIndex_delNurbList(editnurb, nubase);
- freeNurblist(nubase);
+ BKE_nurbList_free(nubase);
}
if (ED_curve_updateAnimPaths(obedit->data))
@@ -6083,7 +6083,7 @@ int join_curve_exec(bContext *C, wmOperator *UNUSED(op))
nu= cu->nurb.first;
while (nu) {
- newnu= duplicateNurb(nu);
+ newnu= BKE_nurb_duplicate(nu);
if (ob->totcol) { /* TODO, merge material lists */
CLAMP(newnu->mat_nr, 0, ob->totcol-1);
}
@@ -6098,7 +6098,7 @@ int join_curve_exec(bContext *C, wmOperator *UNUSED(op))
mul_m4_v3(cmat, bezt->vec[2]);
bezt++;
}
- calchandlesNurb(newnu);
+ BKE_nurb_handles_calc(newnu);
}
if ( (bp= newnu->bp) ) {
a= newnu->pntsu*nu->pntsv;
@@ -6240,7 +6240,7 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
bezt->vec[2][1] = 0;
for (a=0;a<3;a++) mul_m4_v3(mat, bezt->vec[a]);
- calchandlesNurb(nu);
+ BKE_nurb_handles_calc(nu);
}
else {
@@ -6272,7 +6272,7 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
if (cutype==CU_NURBS) {
nu->knotsu= NULL; /* nurbs_knot_calc_u allocates */
- nurbs_knot_calc_u(nu);
+ BKE_nurb_knot_calc_u(nu);
}
}
@@ -6306,7 +6306,7 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
if (cutype==CU_NURBS) {
nu->knotsu= NULL; /* nurbs_knot_calc_u allocates */
- nurbs_knot_calc_u(nu);
+ BKE_nurb_knot_calc_u(nu);
}
break;
@@ -6347,7 +6347,7 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
for (a=0;a<3;a++) mul_m4_v3(mat,bezt->vec[a]);
bezt->radius = bezt->weight = 1.0;
- calchandlesNurb(nu);
+ BKE_nurb_handles_calc(nu);
}
else if ( cutype==CU_NURBS ) { /* nurb */
nu->pntsu= 8;
@@ -6375,7 +6375,7 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
bp++;
}
- nurbs_knot_calc_u(nu);
+ BKE_nurb_knot_calc_u(nu);
}
break;
case CU_PRIM_PATCH: /* 4x4 patch */
@@ -6407,8 +6407,8 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
}
}
- nurbs_knot_calc_u(nu);
- nurbs_knot_calc_v(nu);
+ BKE_nurb_knot_calc_u(nu);
+ BKE_nurb_knot_calc_v(nu);
}
break;
case CU_PRIM_TUBE: /* Cylinder */
@@ -6469,7 +6469,7 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
bp++;
}
nu->flagu= CU_NURB_BEZIER;
- nurbs_knot_calc_u(nu);
+ BKE_nurb_knot_calc_u(nu);
BLI_addtail(editnurb, nu); /* temporal for spin */
@@ -6477,7 +6477,7 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
else if ((U.flag & USER_ADD_VIEWALIGNED)) spin_nurb(viewmat, obedit, zvec, mat[3]);
else spin_nurb(umat, obedit, tmp_vec, mat[3]);
- nurbs_knot_calc_v(nu);
+ BKE_nurb_knot_calc_v(nu);
a= nu->pntsu*nu->pntsv;
bp= nu->bp;
@@ -6529,7 +6529,7 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
if (nu) { /* should always be set */
nu->flag |= CU_SMOOTH;
- test2DNurb(nu);
+ BKE_nurb_test2D(nu);
}
return nu;
@@ -6947,13 +6947,13 @@ static void undoCurve_to_editCurve(void *ucu, void *UNUSED(edata), void *cu_v)
Curve *cu= cu_v;
UndoCurve *undoCurve= ucu;
ListBase *undobase= &undoCurve->nubase;
- ListBase *editbase= curve_editnurbs(cu);
+ ListBase *editbase= BKE_curve_editNurbs_get(cu);
Nurb *nu, *newnu;
EditNurb *editnurb= cu->editnurb;
void *lastsel= NULL;
AnimData *ad= BKE_animdata_from_id(&cu->id);
- freeNurblist(editbase);
+ BKE_nurbList_free(editbase);
if (undoCurve->undoIndex) {
BLI_ghash_free(editnurb->keyindex, NULL, (GHashValFreeFP)MEM_freeN);
@@ -6972,7 +6972,7 @@ static void undoCurve_to_editCurve(void *ucu, void *UNUSED(edata), void *cu_v)
/* copy */
for (nu= undobase->first; nu; nu= nu->next) {
- newnu= duplicateNurb(nu);
+ newnu= BKE_nurb_duplicate(nu);
if (lastsel == NULL) {
lastsel= undo_check_lastsel(undoCurve->lastsel, nu, newnu);
@@ -6993,7 +6993,7 @@ static void undoCurve_to_editCurve(void *ucu, void *UNUSED(edata), void *cu_v)
static void *editCurve_to_undoCurve(void *UNUSED(edata), void *cu_v)
{
Curve *cu= cu_v;
- ListBase *nubase= curve_editnurbs(cu);
+ ListBase *nubase= BKE_curve_editNurbs_get(cu);
UndoCurve *undoCurve;
EditNurb *editnurb= cu->editnurb, tmpEditnurb;
Nurb *nu, *newnu;
@@ -7016,7 +7016,7 @@ static void *editCurve_to_undoCurve(void *UNUSED(edata), void *cu_v)
/* copy */
for (nu= nubase->first; nu; nu= nu->next) {
- newnu= duplicateNurb(nu);
+ newnu= BKE_nurb_duplicate(nu);
if (lastsel == NULL) {
lastsel= undo_check_lastsel(cu->lastsel, nu, newnu);
@@ -7039,7 +7039,7 @@ static void free_undoCurve(void *ucv)
{
UndoCurve *undoCurve= ucv;
- freeNurblist(&undoCurve->nubase);
+ BKE_nurbList_free(&undoCurve->nubase);
if (undoCurve->undoIndex)
BLI_ghash_free(undoCurve->undoIndex, NULL, (GHashValFreeFP)MEM_freeN);
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c
index 29bebfab9e0..cca5dd7a37b 100644
--- a/source/blender/editors/curve/editfont.c
+++ b/source/blender/editors/curve/editfont.c
@@ -1500,7 +1500,7 @@ void load_editText(Object *obedit)
void free_editText(Object *obedit)
{
- BKE_free_editfont((Curve *)obedit->data);
+ BKE_curve_editfont_free((Curve *)obedit->data);
}
/********************** set case operator *********************/
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index d48cfaab63c..5f31a273d1a 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -534,7 +534,7 @@ static void gp_stroke_to_bezier (bContext *C, bGPDlayer *gpl, bGPDstroke *gps, C
}
/* must calculate handles or else we crash */
- calchandlesNurb(nu);
+ BKE_nurb_handles_calc(nu);
/* add nurb to curve */
BLI_addtail(&cu->nurb, nu);
diff --git a/source/blender/editors/include/ED_curve.h b/source/blender/editors/include/ED_curve.h
index 50e43c46de5..73ff8e9304d 100644
--- a/source/blender/editors/include/ED_curve.h
+++ b/source/blender/editors/include/ED_curve.h
@@ -63,7 +63,7 @@ void load_editNurb (struct Object *obedit);
void make_editNurb (struct Object *obedit);
void free_editNurb (struct Object *obedit);
-void free_curve_editNurb (struct Curve *cu);
+void BKE_curve_editNurb_free (struct Curve *cu);
int mouse_nurb (struct bContext *C, const int mval[2], int extend);
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 4666232c232..fe7a4e85418 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -2231,8 +2231,8 @@ int ui_link_bezier_points(rcti *rect, float coord_array[][2], int resol)
vec[2][0] = vec[3][0] - dist;
vec[2][1] = vec[3][1];
- forward_diff_bezier(vec[0][0], vec[1][0], vec[2][0], vec[3][0], coord_array[0], resol, sizeof(float) * 2);
- forward_diff_bezier(vec[0][1], vec[1][1], vec[2][1], vec[3][1], coord_array[0] + 1, resol, sizeof(float) * 2);
+ BKE_curve_forward_diff_bezier(vec[0][0], vec[1][0], vec[2][0], vec[3][0], coord_array[0], resol, sizeof(float) * 2);
+ BKE_curve_forward_diff_bezier(vec[0][1], vec[1][1], vec[2][1], vec[3][1], coord_array[0] + 1, resol, sizeof(float) * 2);
return 1;
}
diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c
index 713009d2a19..1407d38ed0f 100644
--- a/source/blender/editors/metaball/mball_edit.c
+++ b/source/blender/editors/metaball/mball_edit.c
@@ -111,7 +111,7 @@ MetaElem *add_metaball_primitive(bContext *C, float mat[4][4], int type, int UNU
ml= ml->next;
}
- ml= add_metaball_element(mball, type);
+ ml= BKE_metaball_element_add(mball, type);
copy_v3_v3(&ml->x, mat[3]);
ml->flag |= SELECT;
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;
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index bced6f07564..b648dac6343 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -178,7 +178,7 @@ static int material_slot_assign_exec(bContext *C, wmOperator *UNUSED(op))
}
else if (ELEM(ob->type, OB_CURVE, OB_SURF)) {
Nurb *nu;
- ListBase *nurbs = curve_editnurbs((Curve *)ob->data);
+ ListBase *nurbs = BKE_curve_editNurbs_get((Curve *)ob->data);
if (nurbs) {
for (nu = nurbs->first; nu; nu = nu->next)
@@ -233,7 +233,7 @@ static int material_slot_de_select(bContext *C, int select)
}
}
else if (ELEM(ob->type, OB_CURVE, OB_SURF)) {
- ListBase *nurbs = curve_editnurbs((Curve *)ob->data);
+ ListBase *nurbs = BKE_curve_editNurbs_get((Curve *)ob->data);
Nurb *nu;
BPoint *bp;
BezTriple *bezt;
diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c
index 64ce529345c..c7033b0db99 100644
--- a/source/blender/editors/space_clip/clip_ops.c
+++ b/source/blender/editors/space_clip/clip_ops.c
@@ -157,7 +157,7 @@ static int open_exec(bContext *C, wmOperator *op)
errno = 0;
- clip = BKE_add_movieclip_file(str);
+ clip = BKE_movieclip_file_add(str);
if (!clip) {
if (op->customdata)
diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c
index fc84cfc46a2..d435b78b65c 100644
--- a/source/blender/editors/space_graph/graph_draw.c
+++ b/source/blender/editors/space_graph/graph_draw.c
@@ -720,8 +720,8 @@ static void draw_fcurve_curve_bezts (bAnimContext *ac, ID *id, FCurve *fcu, View
correct_bezpart(v1, v2, v3, v4);
- forward_diff_bezier(v1[0], v2[0], v3[0], v4[0], data, resol, sizeof(float)*3);
- forward_diff_bezier(v1[1], v2[1], v3[1], v4[1], data+1, resol, sizeof(float)*3);
+ BKE_curve_forward_diff_bezier(v1[0], v2[0], v3[0], v4[0], data, resol, sizeof(float)*3);
+ BKE_curve_forward_diff_bezier(v1[1], v2[1], v3[1], v4[1], data+1, resol, sizeof(float)*3);
for (fp= data; resol; resol--, fp+= 3)
glVertex2fv(fp);
diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c
index 1c2f43f67a4..2ef8f6c306c 100644
--- a/source/blender/editors/space_info/info_stats.c
+++ b/source/blender/editors/space_info/info_stats.c
@@ -183,7 +183,7 @@ static void stats_object_edit(Object *obedit, SceneStats *stats)
BezTriple *bezt;
BPoint *bp;
int a;
- ListBase *nurbs = curve_editnurbs(cu);
+ ListBase *nurbs = BKE_curve_editNurbs_get(cu);
for (nu = nurbs->first; nu; nu = nu->next) {
if (nu->type == CU_BEZIER) {
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index e00abff30f2..91ece361aac 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -2499,8 +2499,8 @@ int node_link_bezier_points(View2D *v2d, SpaceNode *snode, bNodeLink *link, floa
else {
/* always do all three, to prevent data hanging around */
- forward_diff_bezier(vec[0][0], vec[1][0], vec[2][0], vec[3][0], coord_array[0], resol, sizeof(float)*2);
- forward_diff_bezier(vec[0][1], vec[1][1], vec[2][1], vec[3][1], coord_array[0]+1, resol, sizeof(float)*2);
+ BKE_curve_forward_diff_bezier(vec[0][0], vec[1][0], vec[2][0], vec[3][0], coord_array[0], resol, sizeof(float)*2);
+ BKE_curve_forward_diff_bezier(vec[0][1], vec[1][1], vec[2][1], vec[3][1], coord_array[0]+1, resol, sizeof(float)*2);
return 1;
}
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 4508dae36e7..3f431585fc9 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -2213,7 +2213,7 @@ void nurbs_foreachScreenVert(
short s[2] = {IS_CLIPPED, 0};
Nurb *nu;
int i;
- ListBase *nurbs = curve_editnurbs(cu);
+ ListBase *nurbs = BKE_curve_editNurbs_get(cu);
ED_view3d_clipping_local(vc->rv3d, vc->obedit->obmat); /* for local clipping lookups */
@@ -3963,7 +3963,7 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas
break;
case OB_MBALL:
- if (is_basis_mball(ob)) {
+ if (BKE_metaball_is_basis(ob)) {
lb = &ob->disp;
if (lb->first == NULL) makeDispListMBall(scene, ob);
if (lb->first == NULL) return 1;
@@ -6140,7 +6140,7 @@ static void draw_bounding_volume(Scene *scene, Object *ob, char type)
bb = ob->bb ? ob->bb : ( (Curve *)ob->data)->bb;
}
else if (ob->type == OB_MBALL) {
- if (is_basis_mball(ob)) {
+ if (BKE_metaball_is_basis(ob)) {
bb = ob->bb;
if (bb == NULL) {
makeDispListMBall(scene, ob);
@@ -6231,7 +6231,7 @@ static void drawObjectSelect(Scene *scene, View3D *v3d, ARegion *ar, Base *base)
}
}
else if (ob->type == OB_MBALL) {
- if (is_basis_mball(ob)) {
+ if (BKE_metaball_is_basis(ob)) {
if ((base->flag & OB_FROMDUPLI) == 0)
drawDispListwire(&ob->disp);
}
@@ -6291,7 +6291,7 @@ static void drawWireExtra(Scene *scene, RegionView3D *rv3d, Object *ob)
}
}
else if (ob->type == OB_MBALL) {
- if (is_basis_mball(ob)) {
+ if (BKE_metaball_is_basis(ob)) {
drawDispListwire(&ob->disp);
}
}
@@ -6670,7 +6670,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
cu = ob->data;
if (cu->editnurb) {
- ListBase *nurbs = curve_editnurbs(cu);
+ ListBase *nurbs = BKE_curve_editNurbs_get(cu);
drawnurb(scene, v3d, rv3d, base, nurbs->first, dt);
}
else if (dt == OB_BOUNDBOX) {
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index c3ff00e3c82..6d810d9103c 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -211,7 +211,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
BPoint *bp;
BezTriple *bezt;
int a;
- ListBase *nurbs = curve_editnurbs(cu);
+ ListBase *nurbs = BKE_curve_editNurbs_get(cu);
StructRNA *seltype = NULL;
void *selp = NULL;
@@ -509,7 +509,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
BPoint *bp;
BezTriple *bezt;
int a;
- ListBase *nurbs = curve_editnurbs(cu);
+ ListBase *nurbs = BKE_curve_editNurbs_get(cu);
const float scale_w = compute_scale_factor(ve_median[4], median[4]);
nu = nurbs->first;
@@ -571,8 +571,8 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
bp++;
}
}
- test2DNurb(nu);
- testhandlesNurb(nu); /* test for bezier too */
+ BKE_nurb_test2D(nu);
+ BKE_nurb_handles_test(nu); /* test for bezier too */
nu = nu->next;
}
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index 2c301dc8abc..988d0a00601 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -106,7 +106,7 @@ static void special_transvert_update(Object *obedit)
}
else if (ELEM(obedit->type, OB_CURVE, OB_SURF)) {
Curve *cu = obedit->data;
- ListBase *nurbs = curve_editnurbs(cu);
+ ListBase *nurbs = BKE_curve_editNurbs_get(cu);
Nurb *nu = nurbs->first;
while (nu) {
@@ -141,8 +141,8 @@ static void special_transvert_update(Object *obedit)
}
}
- test2DNurb(nu);
- testhandlesNurb(nu); /* test for bezier too */
+ BKE_nurb_test2D(nu);
+ BKE_nurb_handles_test(nu); /* test for bezier too */
nu = nu->next;
}
}
@@ -375,7 +375,7 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode)
else if (ELEM(obedit->type, OB_CURVE, OB_SURF)) {
Curve *cu = obedit->data;
int totmalloc = 0;
- ListBase *nurbs = curve_editnurbs(cu);
+ ListBase *nurbs = BKE_curve_editNurbs_get(cu);
for (nu = nurbs->first; nu; nu = nu->next) {
if (nu->type == CU_BEZIER)
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index bdae2c0c84f..00c8e0a1d34 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -1438,7 +1438,7 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
if (cu->editnurb==NULL) return;
/* count total of vertices, check identical as in 2nd loop for making transdata! */
- nurbs= curve_editnurbs(cu);
+ nurbs= BKE_curve_editNurbs_get(cu);
for (nu= nurbs->first; nu; nu= nu->next) {
if (nu->type == CU_BEZIER) {
for (a=0, bezt= nu->bezt; a<nu->pntsu; a++, bezt++) {
@@ -1588,7 +1588,7 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
* but for now just don't change handle types */
if (ELEM(t->mode, TFM_CURVE_SHRINKFATTEN, TFM_TILT) == 0) {
/* sets the handles based on their selection, do this after the data is copied to the TransData */
- testhandlesNurb(nu);
+ BKE_nurb_handles_test(nu);
}
}
else {
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 2c5d074e2cf..217e0d36fce 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -673,7 +673,7 @@ static void recalcData_view3d(TransInfo *t)
if (t->obedit) {
if (ELEM(t->obedit->type, OB_CURVE, OB_SURF)) {
Curve *cu= t->obedit->data;
- ListBase *nurbs= curve_editnurbs(cu);
+ ListBase *nurbs= BKE_curve_editNurbs_get(cu);
Nurb *nu= nurbs->first;
if (t->state != TRANS_CANCEL) {
@@ -685,15 +685,15 @@ static void recalcData_view3d(TransInfo *t)
if (t->state == TRANS_CANCEL) {
while (nu) {
- calchandlesNurb(nu); /* Cant do testhandlesNurb here, it messes up the h1 and h2 flags */
+ BKE_nurb_handles_calc(nu); /* Cant do testhandlesNurb here, it messes up the h1 and h2 flags */
nu= nu->next;
}
}
else {
/* Normal updating */
while (nu) {
- test2DNurb(nu);
- calchandlesNurb(nu);
+ BKE_nurb_test2D(nu);
+ BKE_nurb_handles_calc(nu);
nu= nu->next;
}
}
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index c043be0c7f8..f8a982c6b71 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -389,7 +389,7 @@ int calc_manipulator_stats(const bContext *C)
Nurb *nu;
BezTriple *bezt;
BPoint *bp;
- ListBase *nurbs= curve_editnurbs(cu);
+ ListBase *nurbs= BKE_curve_editNurbs_get(cu);
nu= nurbs->first;
while (nu) {
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 0f9f90819d0..db974626b14 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -715,7 +715,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
Nurb *nu;
BezTriple *bezt;
int a;
- ListBase *nurbs= curve_editnurbs(cu);
+ ListBase *nurbs= BKE_curve_editNurbs_get(cu);
for (nu = nurbs->first; nu; nu = nu->next) {
/* only bezier has a normal */