replace IS_EQ -> IS_EQF for use with floats.
This commit is contained in:
@@ -1567,11 +1567,11 @@ static float nlastrip_get_influence(NlaStrip *strip, float cframe)
|
|||||||
strip->blendout = fabsf(strip->blendout);
|
strip->blendout = fabsf(strip->blendout);
|
||||||
|
|
||||||
/* result depends on where frame is in respect to blendin/out values */
|
/* result depends on where frame is in respect to blendin/out values */
|
||||||
if (IS_EQ(strip->blendin, 0) == 0 && (cframe <= (strip->start + strip->blendin))) {
|
if (IS_EQF(strip->blendin, 0.0f) == false && (cframe <= (strip->start + strip->blendin))) {
|
||||||
/* there is some blend-in */
|
/* there is some blend-in */
|
||||||
return fabsf(cframe - strip->start) / (strip->blendin);
|
return fabsf(cframe - strip->start) / (strip->blendin);
|
||||||
}
|
}
|
||||||
else if (IS_EQ(strip->blendout, 0) == 0 && (cframe >= (strip->end - strip->blendout))) {
|
else if (IS_EQF(strip->blendout, 0.0f) == false && (cframe >= (strip->end - strip->blendout))) {
|
||||||
/* there is some blend-out */
|
/* there is some blend-out */
|
||||||
return fabsf(strip->end - cframe) / (strip->blendout);
|
return fabsf(strip->end - cframe) / (strip->blendout);
|
||||||
}
|
}
|
||||||
@@ -1856,7 +1856,7 @@ static void nlaevalchan_accumulate(NlaEvalChannel *nec, NlaEvalStrip *nes, float
|
|||||||
inf *= nes->strip_time;
|
inf *= nes->strip_time;
|
||||||
|
|
||||||
/* optimisation: no need to try applying if there is no influence */
|
/* optimisation: no need to try applying if there is no influence */
|
||||||
if (IS_EQ(inf, 0)) return;
|
if (IS_EQF(inf, 0.0f)) return;
|
||||||
|
|
||||||
/* perform blending */
|
/* perform blending */
|
||||||
switch (blendmode) {
|
switch (blendmode) {
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ int bone_autoside_name(char name[MAXBONENAME], int UNUSED(strip_number), short a
|
|||||||
*/
|
*/
|
||||||
if (axis == 2) {
|
if (axis == 2) {
|
||||||
/* z-axis - vertical (top/bottom) */
|
/* z-axis - vertical (top/bottom) */
|
||||||
if (IS_EQ(head, 0)) {
|
if (IS_EQF(head, 0.0f)) {
|
||||||
if (tail < 0)
|
if (tail < 0)
|
||||||
strcpy(extension, "Bot");
|
strcpy(extension, "Bot");
|
||||||
else if (tail > 0)
|
else if (tail > 0)
|
||||||
@@ -300,7 +300,7 @@ int bone_autoside_name(char name[MAXBONENAME], int UNUSED(strip_number), short a
|
|||||||
}
|
}
|
||||||
else if (axis == 1) {
|
else if (axis == 1) {
|
||||||
/* y-axis - depth (front/back) */
|
/* y-axis - depth (front/back) */
|
||||||
if (IS_EQ(head, 0)) {
|
if (IS_EQF(head, 0.0f)) {
|
||||||
if (tail < 0)
|
if (tail < 0)
|
||||||
strcpy(extension, "Fr");
|
strcpy(extension, "Fr");
|
||||||
else if (tail > 0)
|
else if (tail > 0)
|
||||||
@@ -315,7 +315,7 @@ int bone_autoside_name(char name[MAXBONENAME], int UNUSED(strip_number), short a
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* x-axis - horizontal (left/right) */
|
/* x-axis - horizontal (left/right) */
|
||||||
if (IS_EQ(head, 0)) {
|
if (IS_EQF(head, 0.0f)) {
|
||||||
if (tail < 0)
|
if (tail < 0)
|
||||||
strcpy(extension, "R");
|
strcpy(extension, "R");
|
||||||
else if (tail > 0)
|
else if (tail > 0)
|
||||||
|
|||||||
@@ -3075,7 +3075,7 @@ static void clampto_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *tar
|
|||||||
float offset;
|
float offset;
|
||||||
|
|
||||||
/* check to make sure len is not so close to zero that it'll cause errors */
|
/* check to make sure len is not so close to zero that it'll cause errors */
|
||||||
if (IS_EQ(len, 0) == 0) {
|
if (IS_EQF(len, 0.0f) == false) {
|
||||||
/* find bounding-box range where target is located */
|
/* find bounding-box range where target is located */
|
||||||
if (ownLoc[clamp_axis] < curveMin[clamp_axis]) {
|
if (ownLoc[clamp_axis] < curveMin[clamp_axis]) {
|
||||||
/* bounding-box range is before */
|
/* bounding-box range is before */
|
||||||
@@ -3107,7 +3107,7 @@ static void clampto_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *tar
|
|||||||
curvetime = 0.0f;
|
curvetime = 0.0f;
|
||||||
else if (ownLoc[clamp_axis] >= curveMax[clamp_axis])
|
else if (ownLoc[clamp_axis] >= curveMax[clamp_axis])
|
||||||
curvetime = 1.0f;
|
curvetime = 1.0f;
|
||||||
else if (IS_EQ((curveMax[clamp_axis] - curveMin[clamp_axis]), 0) == 0)
|
else if (IS_EQF((curveMax[clamp_axis] - curveMin[clamp_axis]), 0.0f) == false)
|
||||||
curvetime = (ownLoc[clamp_axis] - curveMin[clamp_axis]) / (curveMax[clamp_axis] - curveMin[clamp_axis]);
|
curvetime = (ownLoc[clamp_axis] - curveMin[clamp_axis]) / (curveMax[clamp_axis] - curveMin[clamp_axis]);
|
||||||
else
|
else
|
||||||
curvetime = 0.0f;
|
curvetime = 0.0f;
|
||||||
|
|||||||
@@ -2323,7 +2323,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main)
|
|||||||
KeyBlock *kb;
|
KeyBlock *kb;
|
||||||
|
|
||||||
for (kb = key->block.first; kb; kb = kb->next) {
|
for (kb = key->block.first; kb; kb = kb->next) {
|
||||||
if (IS_EQF(kb->slidermin, kb->slidermax) && IS_EQ(kb->slidermax, 0))
|
if (IS_EQF(kb->slidermin, kb->slidermax) && IS_EQF(kb->slidermax, 0.0f))
|
||||||
kb->slidermax = kb->slidermin + 1.0f;
|
kb->slidermax = kb->slidermin + 1.0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -567,7 +567,7 @@ static int poselib_remove_exec(bContext *C, wmOperator *op)
|
|||||||
if (fcu->bezt) {
|
if (fcu->bezt) {
|
||||||
for (i = 0, bezt = fcu->bezt; i < fcu->totvert; i++, bezt++) {
|
for (i = 0, bezt = fcu->bezt; i < fcu->totvert; i++, bezt++) {
|
||||||
/* check if remove */
|
/* check if remove */
|
||||||
if (IS_EQ(bezt->vec[1][0], marker->frame)) {
|
if (IS_EQF(bezt->vec[1][0], (float)marker->frame)) {
|
||||||
delete_fcurve_key(fcu, i, 1);
|
delete_fcurve_key(fcu, i, 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user