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:
authorJacques Lucke <mail@jlucke.com>2018-10-17 13:43:41 +0300
committerJacques Lucke <mail@jlucke.com>2018-10-17 13:43:41 +0300
commit21744217cea9bb8f767f47cb6c41446563e645ac (patch)
tree4cd38ca5ae9530eb99fcf91fa28530b42d0fce68 /source/blender/blenkernel/intern
parentc6eb5651ba26db3fa26179f2124c58f8c94b5ca3 (diff)
Cleanup: remove some #if 0 blocks
Reviewers: brecht, campbellbarton Differential Revision: https://developer.blender.org/D3802
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c41
-rw-r--r--source/blender/blenkernel/intern/armature.c131
-rw-r--r--source/blender/blenkernel/intern/bpath.c7
-rw-r--r--source/blender/blenkernel/intern/camera.c5
-rw-r--r--source/blender/blenkernel/intern/cloth.c18
-rw-r--r--source/blender/blenkernel/intern/collision.c42
-rw-r--r--source/blender/blenkernel/intern/colortools.c11
-rw-r--r--source/blender/blenkernel/intern/constraint.c23
-rw-r--r--source/blender/blenkernel/intern/context.c7
-rw-r--r--source/blender/blenkernel/intern/curve.c53
-rw-r--r--source/blender/blenkernel/intern/customdata.c34
-rw-r--r--source/blender/blenkernel/intern/customdata_file.c10
-rw-r--r--source/blender/blenkernel/intern/editmesh.c14
-rw-r--r--source/blender/blenkernel/intern/fcurve.c43
-rw-r--r--source/blender/blenkernel/intern/fmodifier.c21
15 files changed, 8 insertions, 452 deletions
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index b02b6b6ce15..9f356ab7149 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -1467,14 +1467,6 @@ void BKE_keyingsets_free(ListBase *list)
*/
static bool animsys_remap_path(AnimMapper *UNUSED(remap), char *path, char **dst)
{
- /* is there a valid remapping table to use? */
-#if 0
- if (remap) {
- /* find a matching entry... to use to remap */
- /* ...TODO... */
- }
-#endif
-
/* nothing suitable found, so just set dst to look at path (i.e. no alloc/free needed) */
*dst = path;
return false;
@@ -1670,26 +1662,6 @@ static bool animsys_write_rna_setting(PathResolvedRNA *anim_rna, const float val
return false;
}
- /* RNA property update disabled for now - [#28525] [#28690] [#28774] [#28777] */
-#if 0
- /* buffer property update for later flushing */
- if (written && RNA_property_update_check(prop)) {
- short skip_updates_hack = 0;
-
- /* optimization hacks: skip property updates for those properties
- * for we know that which the updates in RNA were really just for
- * flushing property editing via UI/Py
- */
- if (new_ptr.type == &RNA_PoseBone) {
- /* bone transforms - update pose (i.e. tag depsgraph) */
- skip_updates_hack = 1;
- }
-
- if (skip_updates_hack == 0)
- RNA_property_update_cache_add(ptr, prop);
- }
-#endif
-
/* successful */
return true;
}
@@ -2689,19 +2661,6 @@ static void animsys_calculate_nla(Depsgraph *depsgraph, PointerRNA *ptr, AnimDat
/* ***************************************** */
/* Overrides System - Public API */
-/* Clear all overrides */
-
-/* Add or get existing Override for given setting */
-#if 0
-AnimOverride *BKE_animsys_validate_override(PointerRNA *UNUSED(ptr), char *UNUSED(path), int UNUSED(array_index))
-{
- /* FIXME: need to define how to get overrides */
- return NULL;
-}
-#endif
-
-/* -------------------- */
-
/* Evaluate Overrides */
static void animsys_evaluate_overrides(PointerRNA *ptr, AnimData *adt)
{
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index 22059a1ff0a..e0caec323c1 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -2212,132 +2212,6 @@ void BKE_pchan_calc_mat(bPoseChannel *pchan)
BKE_pchan_to_mat4(pchan, pchan->chan_mat);
}
-#if 0 /* XXX OLD ANIMSYS, NLASTRIPS ARE NO LONGER USED */
-
-/* NLA strip modifiers */
-static void do_strip_modifiers(Scene *scene, Object *armob, Bone *bone, bPoseChannel *pchan)
-{
- bActionModifier *amod;
- bActionStrip *strip, *strip2;
- float scene_cfra = BKE_scene_frame_get(scene);
- int do_modif;
-
- for (strip = armob->nlastrips.first; strip; strip = strip->next) {
- do_modif = false;
-
- if (scene_cfra >= strip->start && scene_cfra <= strip->end)
- do_modif = true;
-
- if ((scene_cfra > strip->end) && (strip->flag & ACTSTRIP_HOLDLASTFRAME)) {
- do_modif = true;
-
- /* if there are any other strips active, ignore modifiers for this strip -
- * 'hold' option should only hold action modifiers if there are
- * no other active strips */
- for (strip2 = strip->next; strip2; strip2 = strip2->next) {
- if (strip2 == strip) continue;
-
- if (scene_cfra >= strip2->start && scene_cfra <= strip2->end) {
- if (!(strip2->flag & ACTSTRIP_MUTE))
- do_modif = false;
- }
- }
-
- /* if there are any later, activated, strips with 'hold' set, they take precedence,
- * so ignore modifiers for this strip */
- for (strip2 = strip->next; strip2; strip2 = strip2->next) {
- if (scene_cfra < strip2->start) continue;
- if ((strip2->flag & ACTSTRIP_HOLDLASTFRAME) && !(strip2->flag & ACTSTRIP_MUTE)) {
- do_modif = false;
- }
- }
- }
-
- if (do_modif) {
- /* temporal solution to prevent 2 strips accumulating */
- if (scene_cfra == strip->end && strip->next && strip->next->start == scene_cfra)
- continue;
-
- for (amod = strip->modifiers.first; amod; amod = amod->next) {
- switch (amod->type) {
- case ACTSTRIP_MOD_DEFORM:
- {
- /* validate first */
- if (amod->ob && amod->ob->type == OB_CURVE && amod->channel[0]) {
-
- if (STREQ(pchan->name, amod->channel)) {
- float mat4[4][4], mat3[3][3];
-
- curve_deform_vector(amod->ob, armob, bone->arm_mat[3], pchan->pose_mat[3], mat3, amod->no_rot_axis);
- copy_m4_m4(mat4, pchan->pose_mat);
- mul_m4_m3m4(pchan->pose_mat, mat3, mat4);
-
- }
- }
- }
- break;
- case ACTSTRIP_MOD_NOISE:
- {
- if (STREQ(pchan->name, amod->channel)) {
- float nor[3], loc[3], ofs;
- float eul[3], size[3], eulo[3], sizeo[3];
-
- /* calculate turbulance */
- ofs = amod->turbul / 200.0f;
-
- /* make a copy of starting conditions */
- copy_v3_v3(loc, pchan->pose_mat[3]);
- mat4_to_eul(eul, pchan->pose_mat);
- mat4_to_size(size, pchan->pose_mat);
- copy_v3_v3(eulo, eul);
- copy_v3_v3(sizeo, size);
-
- /* apply noise to each set of channels */
- if (amod->channels & 4) {
- /* for scaling */
- nor[0] = BLI_gNoise(amod->noisesize, size[0] + ofs, size[1], size[2], 0, 0) - ofs;
- nor[1] = BLI_gNoise(amod->noisesize, size[0], size[1] + ofs, size[2], 0, 0) - ofs;
- nor[2] = BLI_gNoise(amod->noisesize, size[0], size[1], size[2] + ofs, 0, 0) - ofs;
- add_v3_v3(size, nor);
-
- if (sizeo[0] != 0)
- mul_v3_fl(pchan->pose_mat[0], size[0] / sizeo[0]);
- if (sizeo[1] != 0)
- mul_v3_fl(pchan->pose_mat[1], size[1] / sizeo[1]);
- if (sizeo[2] != 0)
- mul_v3_fl(pchan->pose_mat[2], size[2] / sizeo[2]);
- }
- if (amod->channels & 2) {
- /* for rotation */
- nor[0] = BLI_gNoise(amod->noisesize, eul[0] + ofs, eul[1], eul[2], 0, 0) - ofs;
- nor[1] = BLI_gNoise(amod->noisesize, eul[0], eul[1] + ofs, eul[2], 0, 0) - ofs;
- nor[2] = BLI_gNoise(amod->noisesize, eul[0], eul[1], eul[2] + ofs, 0, 0) - ofs;
-
- compatible_eul(nor, eulo);
- add_v3_v3(eul, nor);
- compatible_eul(eul, eulo);
-
- loc_eul_size_to_mat4(pchan->pose_mat, loc, eul, size);
- }
- if (amod->channels & 1) {
- /* for location */
- nor[0] = BLI_gNoise(amod->noisesize, loc[0] + ofs, loc[1], loc[2], 0, 0) - ofs;
- nor[1] = BLI_gNoise(amod->noisesize, loc[0], loc[1] + ofs, loc[2], 0, 0) - ofs;
- nor[2] = BLI_gNoise(amod->noisesize, loc[0], loc[1], loc[2] + ofs, 0, 0) - ofs;
-
- add_v3_v3v3(pchan->pose_mat[3], loc, nor);
- }
- }
- }
- break;
- }
- }
- }
- }
-}
-
-#endif
-
/* calculate tail of posechannel */
void BKE_pose_where_is_bone_tail(bPoseChannel *pchan)
{
@@ -2374,11 +2248,6 @@ void BKE_pose_where_is_bone(
}
if (do_extra) {
-#if 0 /* XXX OLD ANIMSYS, NLASTRIPS ARE NO LONGER USED */
- /* do NLA strip modifiers - i.e. curve follow */
- do_strip_modifiers(scene, ob, bone, pchan);
-#endif
-
/* Do constraints */
if (pchan->constraints.first) {
bConstraintOb *cob;
diff --git a/source/blender/blenkernel/intern/bpath.c b/source/blender/blenkernel/intern/bpath.c
index 34f54704f75..88a4b7905ef 100644
--- a/source/blender/blenkernel/intern/bpath.c
+++ b/source/blender/blenkernel/intern/bpath.c
@@ -478,13 +478,6 @@ void BKE_bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int
} \
} (void)0
- /* do via modifiers instead */
-#if 0
- if (ob->fluidsimSettings) {
- rewrite_path_fixed(ob->fluidsimSettings->surfdataPath, visit_cb, absbase, bpath_user_data);
- }
-#endif
-
for (md = ob->modifiers.first; md; md = md->next) {
if (md->type == eModifierType_Fluidsim) {
FluidsimModifierData *fluidmd = (FluidsimModifierData *)md;
diff --git a/source/blender/blenkernel/intern/camera.c b/source/blender/blenkernel/intern/camera.c
index f65f1e684d6..54ce0d3a903 100644
--- a/source/blender/blenkernel/intern/camera.c
+++ b/source/blender/blenkernel/intern/camera.c
@@ -139,15 +139,10 @@ float BKE_camera_object_dof_distance(Object *ob)
if (ob->type != OB_CAMERA)
return 0.0f;
if (cam->dof_ob) {
-#if 0
- /* too simple, better to return the distance on the view axis only */
- return len_v3v3(ob->obmat[3], cam->dof_ob->obmat[3]);
-#else
float view_dir[3], dof_dir[3];
normalize_v3_v3(view_dir, ob->obmat[2]);
sub_v3_v3v3(dof_dir, ob->obmat[3], cam->dof_ob->obmat[3]);
return fabsf(dot_v3v3(view_dir, dof_dir));
-#endif
}
return cam->YF_dofdist;
}
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index 2b246804e28..fded9580681 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -990,24 +990,6 @@ static void cloth_hair_update_bending_targets(ClothModifierData *clmd)
sub_v3_v3v3(dir_new, cloth->verts[spring->mn].x, cloth->verts[spring->kl].x);
normalize_v3(dir_new);
-#if 0
- if (clmd->debug_data && (spring->ij == 0 || spring->ij == 1)) {
- float a[3], b[3];
-
- copy_v3_v3(a, cloth->verts[spring->kl].x);
-// BKE_sim_debug_data_add_dot(clmd->debug_data, cloth_vert ? cloth_vert->x : key->co, 1, 1, 0, "frames", 8246, p, k);
-
- mul_v3_v3fl(b, hair_frame[0], clmd->sim_parms->avg_spring_len);
- BKE_sim_debug_data_add_vector(clmd->debug_data, a, b, 1, 0, 0, "frames", 8247, spring->kl, spring->mn);
-
- mul_v3_v3fl(b, hair_frame[1], clmd->sim_parms->avg_spring_len);
- BKE_sim_debug_data_add_vector(clmd->debug_data, a, b, 0, 1, 0, "frames", 8248, spring->kl, spring->mn);
-
- mul_v3_v3fl(b, hair_frame[2], clmd->sim_parms->avg_spring_len);
- BKE_sim_debug_data_add_vector(clmd->debug_data, a, b, 0, 0, 1, "frames", 8249, spring->kl, spring->mn);
- }
-#endif
-
/* get local targets for kl/mn vertices by putting rest targets into the current frame,
* then multiply with the rest length to get the actual goals
*/
diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c
index a3e13820ee0..12549678939 100644
--- a/source/blender/blenkernel/intern/collision.c
+++ b/source/blender/blenkernel/intern/collision.c
@@ -1370,48 +1370,6 @@ BLI_INLINE bool cloth_point_face_collision_params(const float p1[3], const float
*r_lambda = (nor_p1p2 != 0.0f ? nor_v0p2 / nor_p1p2 : 0.0f);
return r_w[1] >= 0.0f && r_w[2] >= 0.0f && r_w[1] + r_w[2] <= 1.0f;
-
-#if 0 /* XXX this method uses the intersection point, but is broken and doesn't work well in general */
- float p[3], vec1[3], line[3], edge1[3], edge2[3], q[3];
- float a, f, u, v;
-
- sub_v3_v3v3(edge1, v1, v0);
- sub_v3_v3v3(edge2, v2, v0);
- sub_v3_v3v3(line, p2, p1);
-
- cross_v3_v3v3(p, line, edge2);
- a = dot_v3v3(edge1, p);
- if (a == 0.0f) return 0;
- f = 1.0f / a;
-
- sub_v3_v3v3(vec1, p1, v0);
-
- u = f * dot_v3v3(vec1, p);
- if ((u < 0.0f) || (u > 1.0f))
- return false;
-
- cross_v3_v3v3(q, vec1, edge1);
-
- v = f * dot_v3v3(line, q);
- if ((v < 0.0f) || ((u + v) > 1.0f))
- return false;
-
- *r_lambda = f * dot_v3v3(edge2, q);
- /* don't care about 0..1 lambda range here */
- /*if ((*r_lambda < 0.0f) || (*r_lambda > 1.0f))
- * return 0;
- */
-
- r_w[0] = 1.0f - u - v;
- r_w[1] = u;
- r_w[2] = v;
- r_w[3] = 0.0f;
-
- cross_v3_v3v3(r_nor, edge1, edge2);
- normalize_v3(r_nor);
-
- return true;
-#endif
}
static CollPair *cloth_point_collpair(
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c
index 1bdca5500f3..108e188fe92 100644
--- a/source/blender/blenkernel/intern/colortools.c
+++ b/source/blender/blenkernel/intern/colortools.c
@@ -1489,17 +1489,6 @@ void scopes_update(Scopes *scopes, ImBuf *ibuf, const ColorManagedViewSettings *
scopes_update_cb,
&settings);
- /* test for nicer distribution even - non standard, leave it out for a while */
-#if 0
- for (a = 0; a < 256; a++) {
- bin_lum[a] = sqrt (bin_lum[a]);
- bin_r[a] = sqrt(bin_r[a]);
- bin_g[a] = sqrt(bin_g[a]);
- bin_b[a] = sqrt(bin_b[a]);
- bin_a[a] = sqrt(bin_a[a]);
- }
-#endif
-
/* convert hist data to float (proportional to max count) */
nl = na = nr = nb = ng = 0;
for (a = 0; a < 256; a++) {
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 095aabb793c..8e85cc39321 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -1326,21 +1326,7 @@ static void followpath_get_tarmat(struct Depsgraph *UNUSED(depsgraph),
unit_m4(totmat);
if (data->followflag & FOLLOWPATH_FOLLOW) {
-#if 0
- float x1, q[4];
- vec_to_quat(quat, dir, (short)data->trackflag, (short)data->upflag);
-
- normalize_v3(dir);
- q[0] = cosf(0.5 * vec[3]);
- x1 = sinf(0.5 * vec[3]);
- q[1] = -x1 * dir[0];
- q[2] = -x1 * dir[1];
- q[3] = -x1 * dir[2];
- mul_qt_qtqt(quat, q, quat);
-#else
quat_apply_track(quat, data->trackflag, data->upflag);
-#endif
-
quat_to_mat4(totmat, quat);
}
@@ -2090,15 +2076,6 @@ static void pycon_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targe
/* only evaluate in python if we're allowed to do so */
if ((G.f & G_SCRIPT_AUTOEXEC) == 0) return;
-/* currently removed, until I this can be re-implemented for multiple targets */
-#if 0
- /* Firstly, run the 'driver' function which has direct access to the objects involved
- * Technically, this is potentially dangerous as users may abuse this and cause dependency-problems,
- * but it also allows certain 'clever' rigging hacks to work.
- */
- BPY_pyconstraint_driver(data, cob, targets);
-#endif
-
/* Now, run the actual 'constraint' function, which should only access the matrices */
BPY_pyconstraint_exec(data, cob, targets);
#endif /* WITH_PYTHON */
diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c
index 7026a3d1bad..ff9465378a1 100644
--- a/source/blender/blenkernel/intern/context.c
+++ b/source/blender/blenkernel/intern/context.c
@@ -94,13 +94,6 @@ struct bContext {
int py_init; /* true if python is initialized */
void *py_context;
} data;
-
- /* data evaluation */
-#if 0
- struct {
- int render;
- } eval;
-#endif
};
/* context */
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index f6d9b2be8b7..6a3f8472abd 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -3410,44 +3410,16 @@ static void calchandleNurb_intern(
}
if (leftviolate || rightviolate) { /* align left handle */
BLI_assert(is_fcurve);
-#if 0
- if (is_fcurve)
-#endif
- {
- /* simple 2d calculation */
- float h1_x = p2_h1[0] - p2[0];
- float h2_x = p2[0] - p2_h2[0];
-
- if (leftviolate) {
- p2_h2[1] = p2[1] + ((p2[1] - p2_h1[1]) / h1_x) * h2_x;
- }
- else {
- p2_h1[1] = p2[1] + ((p2[1] - p2_h2[1]) / h2_x) * h1_x;
- }
+ /* simple 2d calculation */
+ float h1_x = p2_h1[0] - p2[0];
+ float h2_x = p2[0] - p2_h2[0];
+
+ if (leftviolate) {
+ p2_h2[1] = p2[1] + ((p2[1] - p2_h1[1]) / h1_x) * h2_x;
}
-#if 0
else {
- float h1[3], h2[3];
- float dot;
-
- sub_v3_v3v3(h1, p2_h1, p2);
- sub_v3_v3v3(h2, p2, p2_h2);
-
- len_a = normalize_v3(h1);
- len_b = normalize_v3(h2);
-
- dot = dot_v3v3(h1, h2);
-
- if (leftviolate) {
- mul_v3_fl(h1, dot * len_b);
- sub_v3_v3v3(p2_h2, p2, h1);
- }
- else {
- mul_v3_fl(h2, dot * len_a);
- add_v3_v3v3(p2_h1, p2, h2);
- }
+ p2_h1[1] = p2[1] + ((p2[1] - p2_h2[1]) / h2_x) * h1_x;
}
-#endif
}
}
}
@@ -4867,11 +4839,6 @@ bool BKE_nurb_type_convert(Nurb *nu, const short type, const bool use_handles)
nu->orderv = 1;
nu->type = type;
-#if 0 /* UNUSED */
- if (nu->flagu & CU_NURB_CYCLIC) c = nu->orderu - 1;
- else c = 0;
-#endif
-
if (type == CU_NURBS) {
nu->flagu &= CU_NURB_CYCLIC; /* disable all flags except for cyclic */
nu->flagu |= CU_NURB_BEZIER;
@@ -5013,12 +4980,6 @@ bool BKE_curve_nurb_vert_active_get(Curve *cu, Nurb **r_nu, void **r_vert)
vert = &nu->bp[cu->actvert];
}
}
- /* get functions should never set! */
-#if 0
- else {
- cu->actnu = cu->actvert = CU_ACT_NONE;
- }
-#endif
}
*r_nu = nu;
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index 8defb1307ce..765c42b39b0 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -471,11 +471,7 @@ static void layerInterp_origspace_face(
}
}
- /* delay writing to the destination incase dest is in sources */
-
-#if 0 /* no need, this ONLY contains UV's */
- *osf = *(OrigSpaceFace *)(*sources);
-#endif
+ /* delay writing to the destination in case dest is in sources */
memcpy(osf->uv, uv, sizeof(osf->uv));
}
@@ -3746,19 +3742,6 @@ void CustomData_external_remove(CustomData *data, ID *id, int type, int totelem)
CustomData_external_read(data, id, CD_TYPE_AS_MASK(layer->type), totelem);
layer->flag &= ~CD_FLAG_EXTERNAL;
-
-#if 0
- remove_file = 1;
- for (i = 0; i < data->totlayer; i++)
- if (data->layers[i].flag & CD_FLAG_EXTERNAL)
- remove_file = 0;
-
- if (remove_file) {
- customdata_external_filename(filename, id, external);
- cdf_remove(filename);
- CustomData_external_free(data);
- }
-#endif
}
}
@@ -3774,21 +3757,6 @@ bool CustomData_external_test(CustomData *data, int type)
return (layer->flag & CD_FLAG_EXTERNAL) != 0;
}
-#if 0
-void CustomData_external_remove_object(CustomData *data, ID *id)
-{
- CustomDataExternal *external = data->external;
- char filename[FILE_MAX];
-
- if (!external)
- return;
-
- customdata_external_filename(filename, id, external);
- cdf_remove(filename);
- CustomData_external_free(data);
-}
-#endif
-
/* ********** Mesh-to-mesh data transfer ********** */
static void copy_bit_flag(void *dst, const void *src, const size_t data_size, const uint64_t flag)
{
diff --git a/source/blender/blenkernel/intern/customdata_file.c b/source/blender/blenkernel/intern/customdata_file.c
index 3fee2ef6021..3350d8e7b2f 100644
--- a/source/blender/blenkernel/intern/customdata_file.c
+++ b/source/blender/blenkernel/intern/customdata_file.c
@@ -110,16 +110,6 @@ static int cdf_endian(void)
return CDF_ENDIAN_BIG;
}
-#if 0
-static int cdf_data_type_size(int datatype)
-{
- if (datatype == CDF_DATA_FLOAT)
- return sizeof(float);
-
- return 0;
-}
-#endif
-
CDataFile *cdf_create(int type)
{
CDataFile *cdf = MEM_callocN(sizeof(CDataFile), "CDataFile");
diff --git a/source/blender/blenkernel/intern/editmesh.c b/source/blender/blenkernel/intern/editmesh.c
index 7e3693987f7..11f3594da04 100644
--- a/source/blender/blenkernel/intern/editmesh.c
+++ b/source/blender/blenkernel/intern/editmesh.c
@@ -115,18 +115,6 @@ static void editmesh_tessface_calc_intern(BMEditMesh *em)
BMLoop *(*looptris)[3];
-#if 0
- /* note, we could be clever and re-use this array but would need to ensure
- * its realloced at some point, for now just free it */
- if (em->looptris) MEM_freeN(em->looptris);
-
- /* Use em->tottri when set, this means no reallocs while transforming,
- * (unless scanfill fails), otherwise... */
- /* allocate the length of totfaces, avoid many small reallocs,
- * if all faces are tri's it will be correct, quads == 2x allocs */
- BLI_array_reserve(looptris, (em->tottri && em->tottri < bm->totface * 3) ? em->tottri : bm->totface);
-#else
-
/* this means no reallocs for quad dominant models, for */
if ((em->looptris != NULL) &&
/* (*em->tottri >= looptris_tot)) */
@@ -140,8 +128,6 @@ static void editmesh_tessface_calc_intern(BMEditMesh *em)
looptris = MEM_mallocN(sizeof(*looptris) * looptris_tot, __func__);
}
-#endif
-
em->looptris = looptris;
/* after allocating the em->looptris, we're ready to tessellate */
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index 7d57e18d672..e5a04d13aab 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -1292,31 +1292,6 @@ bool driver_get_variable_property(
return true;
}
-#if 0
-/* Helper function to obtain a pointer to a Pose Channel (for evaluating drivers) */
-static bPoseChannel *dtar_get_pchan_ptr(ChannelDriver *driver, DriverTarget *dtar)
-{
- ID *id;
- /* sanity check */
- if (ELEM(NULL, driver, dtar))
- return NULL;
-
- id = dtar_id_ensure_proxy_from(dtar->id);
-
- /* check if the ID here is a valid object */
- if (id && GS(id->name)) {
- Object *ob = (Object *)id;
-
- /* get pose, and subsequently, posechannel */
- return BKE_pose_channel_find_name(ob->pose, dtar->pchan_name);
- }
- else {
- /* cannot find a posechannel this way */
- return NULL;
- }
-}
-#endif
-
static short driver_check_valid_targets(ChannelDriver *driver, DriverVar *dvar)
{
short valid_targets = 0;
@@ -2307,24 +2282,6 @@ static void berekeny(float f1, float f2, float f3, float f4, float *o, int b)
}
}
-#if 0
-static void berekenx(float *f, float *o, int b)
-{
- float t, c0, c1, c2, c3;
- int a;
-
- c0 = f[0];
- c1 = 3.0f * (f[3] - f[0]);
- c2 = 3.0f * (f[0] - 2.0f * f[3] + f[6]);
- c3 = f[9] - f[0] + 3.0f * (f[3] - f[6]);
-
- for (a = 0; a < b; a++) {
- t = o[a];
- o[a] = c0 + t * c1 + t * t * c2 + t * t * t * c3;
- }
-}
-#endif
-
/* -------------------------- */
diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c
index e288242ce9c..4fede89e9ca 100644
--- a/source/blender/blenkernel/intern/fmodifier.c
+++ b/source/blender/blenkernel/intern/fmodifier.c
@@ -835,27 +835,6 @@ static FModifierTypeInfo FMI_NOISE = {
NULL /* evaluate with storage */
};
-/* Filter F-Curve Modifier --------------------------- */
-
-#if 0 // XXX not yet implemented
-static FModifierTypeInfo FMI_FILTER = {
- FMODIFIER_TYPE_FILTER, /* type */
- sizeof(FMod_Filter), /* size */
- FMI_TYPE_REPLACE_VALUES, /* action type */
- 0, /* requirements */
- N_("Filter"), /* name */
- "FMod_Filter", /* struct name */
- NULL, /* free data */
- NULL, /* copy data */
- NULL, /* new data */
- NULL /*fcm_filter_verify*/, /* verify */
- NULL, /* evaluate time */
- fcm_filter_evaluate, /* evaluate */
- NULL, /* evaluate time with storage */
- NULL /* evaluate with storage */
-};
-#endif // XXX not yet implemented
-
/* Python F-Curve Modifier --------------------------- */