Cleanup: remove some #if 0 blocks

Reviewers: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D3802
This commit is contained in:
Jacques Lucke 2018-10-17 12:43:41 +02:00
parent c6eb5651ba
commit 21744217ce
Notes: blender-bot 2023-02-14 06:17:14 +01:00
Referenced by commit ec574b5b09, Cleanup: remove (unused) RNA update cache
Referenced by issue #75686, Animating scene audio volume doesn't work
21 changed files with 8 additions and 585 deletions

View File

@ -648,39 +648,6 @@ struct ImportJobData {
bool import_ok;
};
#if 0
ABC_INLINE bool is_mesh_and_strands(const IObject &object)
{
bool has_mesh = false;
bool has_curve = false;
for (int i = 0; i < object.getNumChildren(); ++i) {
const IObject &child = object.getChild(i);
if (!child.valid()) {
continue;
}
const MetaData &md = child.getMetaData();
if (IPolyMesh::matches(md)) {
has_mesh = true;
}
else if (ISubD::matches(md)) {
has_mesh = true;
}
else if (ICurves::matches(md)) {
has_curve = true;
}
else if (IPoints::matches(md)) {
has_curve = true;
}
}
return has_mesh && has_curve;
}
#endif
static void import_startjob(void *user_data, short *stop, short *do_update, float *progress)
{
SCOPE_TIMER("Alembic import, objects reading and creation");

View File

@ -200,35 +200,6 @@ AviError AVI_print_error(AviError in_error)
return in_error;
}
#if 0
void AVI_set_debug(int mode)
{
AVI_DEBUG = mode;
}
bool AVI_is_avi(char *name)
{
FILE *fp;
int ret;
fp = BLI_fopen(name, "rb");
if (fp == NULL)
return 0;
if (GET_FCC(fp) != FCC("RIFF") ||
!GET_FCC(fp) ||
GET_FCC(fp) != FCC("AVI "))
{
ret = 0;
}
else {
ret = 1;
}
fclose(fp);
return ret;
}
#endif
bool AVI_is_avi(const char *name)
{
@ -850,14 +821,6 @@ AviError AVI_open_compress(char *name, AviMovie *movie, int streams, ...)
movie->streams[i].sh.bottom = 0;
if (movie->streams[i].sh.Type == FCC("vids")) {
#if 0
if (movie->streams[i].format == AVI_FORMAT_MJPEG) {
movie->streams[i].sf = MEM_mallocN(sizeof(AviBitmapInfoHeader) +
sizeof(AviMJPEGUnknown), "moviestreamformatL");
movie->streams[i].sf_size = sizeof(AviBitmapInfoHeader) + sizeof(AviMJPEGUnknown);
}
else {
#endif
movie->streams[i].sf = MEM_mallocN(sizeof(AviBitmapInfoHeader), "moviestreamformatS");
movie->streams[i].sf_size = sizeof(AviBitmapInfoHeader);
@ -874,26 +837,6 @@ AviError AVI_open_compress(char *name, AviMovie *movie, int streams, ...)
((AviBitmapInfoHeader *) movie->streams[i].sf)->YPelsPerMeter = 0;
((AviBitmapInfoHeader *) movie->streams[i].sf)->ClrUsed = 0;
((AviBitmapInfoHeader *) movie->streams[i].sf)->ClrImportant = 0;
#if 0
if (movie->streams[i].format == AVI_FORMAT_MJPEG) {
AviMJPEGUnknown *tmp;
tmp = (AviMJPEGUnknown *)((char *) movie->streams[i].sf + sizeof(AviBitmapInfoHeader));
tmp->a = 44;
tmp->b = 24;
tmp->c = 0;
tmp->d = 2;
tmp->e = 8;
tmp->f = 2;
tmp->g = 1;
}
}
else if (movie->streams[i].sh.Type == FCC("auds")) {
/* pass */
}
#endif
}
}

View File

@ -154,32 +154,6 @@ char *blf_dir_search(const char *file)
return s;
}
#if 0 /* UNUSED */
int blf_dir_split(const char *str, char *file, int *size)
{
int i, len;
char *s;
/* Window, Linux or Mac, this is always / */
s = strrchr(str, '/');
if (s) {
len = s - str;
for (i = 0; i < len; i++)
file[i] = str[i];
file[i] = '.';
file[i + 1] = 't';
file[i + 2] = 't';
file[i + 3] = 'f';
file[i + 4] = '\0';
s++;
*size = atoi(s);
return 1;
}
return 0;
}
#endif
/* Some font have additional file with metrics information,
* in general, the extension of the file is: .afm or .pfm
*/

View File

@ -491,16 +491,8 @@ void DM_interp_poly_data(
int *src_indices,
float *weights, int count, int dest_index);
/* UNUSED */
#if 0
/** Simple function to get me->totvert amount of vertices/normals,
* correctly deformed and subsurfered. Needed especially when vertexgroups are involved.
* In use now by vertex/weight paint and particles */
DMCoNo *mesh_get_mapped_verts_nors(struct Scene *scene, struct Object *ob);
#endif
void mesh_get_mapped_verts_coords(struct Mesh *me_eval, float (*r_cos)[3], const int totcos);
/* */
void mesh_get_mapped_verts_coords(struct Mesh *me_eval, float (*r_cos)[3], const int totcos);
DerivedMesh *mesh_create_derived_for_modifier(
struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob,

View File

@ -224,11 +224,6 @@ short CTX_data_type_get(struct bContextDataResult *result);
bool CTX_data_equals(const char *member, const char *str);
bool CTX_data_dir(const char *member);
#if 0
void CTX_data_pointer_set(bContextDataResult *result, void *data);
void CTX_data_list_add(bContextDataResult *result, void *data);
#endif
#define CTX_DATA_BEGIN(C, Type, instance, member) \
{ \
ListBase ctx_data_list; \

View File

@ -112,10 +112,6 @@ bool txt_cursor_is_line_end(struct Text *text);
int txt_calc_tab_left(struct TextLine *line, int ch);
int txt_calc_tab_right(struct TextLine *line, int ch);
#if 0
void txt_print_undo (struct Text *text);
#endif
/* utility functions, could be moved somewhere more generic but are python/text related */
int text_check_bracket(const char ch);
bool text_check_delim(const char ch);

View File

@ -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)
{

View File

@ -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;

View File

@ -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;

View File

@ -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;
}

View File

@ -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
*/

View File

@ -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(

View File

@ -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++) {

View File

@ -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 */

View File

@ -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 */

View File

@ -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];
/* 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;
}
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;

View File

@ -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)
{

View File

@ -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");

View File

@ -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 */

View File

@ -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
/* -------------------------- */

View File

@ -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 --------------------------- */