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:
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r--source/blender/editors/armature/editarmature_retarget.c24
-rw-r--r--source/blender/editors/armature/editarmature_sketch.c10
-rw-r--r--source/blender/editors/armature/reeb.c4
3 files changed, 19 insertions, 19 deletions
diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c
index b1651886620..ccc375a03f9 100644
--- a/source/blender/editors/armature/editarmature_retarget.c
+++ b/source/blender/editors/armature/editarmature_retarget.c
@@ -708,7 +708,7 @@ static int RIG_parentControl(RigControl *ctrl, EditBone *link)
sub_v3_v3v3(offset, ctrl->bone->head, link->head);
/* if root matches, check for direction too */
- if (dot_v3v3(offset, offset) < 0.0001)
+ if (dot_v3v3(offset, offset) < 0.0001f)
{
float vbone[3], vparent[3];
@@ -726,7 +726,7 @@ static int RIG_parentControl(RigControl *ctrl, EditBone *link)
cross_v3_v3v3(nor, vbone, vparent);
len = dot_v3v3(nor, nor);
- if (len < 0.0001)
+ if (len < 0.0001f)
{
flag |= RIG_CTRL_FIT_BONE;
}
@@ -859,8 +859,8 @@ static void RIG_reconnectControlBones(RigGraph *rg)
{
int fit = 0;
- fit = len_v3v3(ctrl->bone->head, edge->bone->head) < 0.0001;
- fit = fit || len_v3v3(ctrl->bone->tail, edge->bone->tail) < 0.0001;
+ fit = len_v3v3(ctrl->bone->head, edge->bone->head) < 0.0001f;
+ fit = fit || len_v3v3(ctrl->bone->tail, edge->bone->tail) < 0.0001f;
if (fit)
{
@@ -1016,13 +1016,13 @@ static void RIG_reconnectControlBones(RigGraph *rg)
/* don't link with parent */
if (bone->parent != ctrl->bone)
{
- if (len_v3v3(ctrl->bone->tail, bone->head) < 0.01)
+ if (len_v3v3(ctrl->bone->tail, bone->head) < 0.01f)
{
ctrl->tail_mode = TL_HEAD;
ctrl->link_tail = bone;
break;
}
- else if (len_v3v3(ctrl->bone->tail, bone->tail) < 0.01)
+ else if (len_v3v3(ctrl->bone->tail, bone->tail) < 0.01f)
{
ctrl->tail_mode = TL_TAIL;
ctrl->link_tail = bone;
@@ -1122,14 +1122,14 @@ static void RIG_removeUneededOffsets(RigGraph *rg)
if (first_edge->bone == NULL)
{
- if (first_edge->bone == NULL && len_v3v3(first_edge->tail, arc->head->p) <= 0.001)
+ if (first_edge->bone == NULL && len_v3v3(first_edge->tail, arc->head->p) <= 0.001f)
{
BLI_remlink(&arc->edges, first_edge);
MEM_freeN(first_edge);
}
else if (arc->head->degree == 1)
{
- RigNode *new_node = (RigNode*)BLI_FindNodeByPosition((BGraph*)rg, first_edge->tail, 0.001);
+ RigNode *new_node = (RigNode*)BLI_FindNodeByPosition((BGraph*)rg, first_edge->tail, 0.001f);
if (new_node)
{
@@ -1252,14 +1252,14 @@ static void RIG_removeUneededOffsets(RigGraph *rg)
if (last_edge->bone == NULL)
{
- if (len_v3v3(last_edge->head, arc->tail->p) <= 0.001)
+ if (len_v3v3(last_edge->head, arc->tail->p) <= 0.001f)
{
BLI_remlink(&arc->edges, last_edge);
MEM_freeN(last_edge);
}
else if (arc->tail->degree == 1)
{
- RigNode *new_node = (RigNode*)BLI_FindNodeByPosition((BGraph*)rg, last_edge->head, 0.001);
+ RigNode *new_node = (RigNode*)BLI_FindNodeByPosition((BGraph*)rg, last_edge->head, 0.001f);
if (new_node)
{
@@ -2013,11 +2013,11 @@ static float costAngle(float original_angle, float vec_first[3], float vec_secon
{
current_angle = saacos(dot_v3v3(vec_first, vec_second));
- return angle_weight * fabs(current_angle - original_angle);
+ return angle_weight * fabsf(current_angle - original_angle);
}
else
{
- return angle_weight * M_PI;
+ return angle_weight * (float)M_PI;
}
}
else
diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c
index b97e843529a..f16771b624c 100644
--- a/source/blender/editors/armature/editarmature_sketch.c
+++ b/source/blender/editors/armature/editarmature_sketch.c
@@ -508,7 +508,7 @@ static void sk_drawEdge(GLUquadric *quad, SK_Point *pt0, SK_Point *pt1, float si
angle = angle_normalized_v3v3(vec2, vec1);
- glRotatef(angle * 180 / M_PI + 180, axis[0], axis[1], axis[2]);
+ glRotatef(angle * (float)(180.0/M_PI) + 180.0f, axis[0], axis[1], axis[2]);
gluCylinder(quad, sk_clampPointSize(pt1, size), sk_clampPointSize(pt0, size), length, 8, 8);
}
@@ -529,7 +529,7 @@ static void sk_drawNormal(GLUquadric *quad, SK_Point *pt, float size, float heig
angle = angle_normalized_v3v3(vec2, pt->no);
- glRotatef(angle * 180 / M_PI, axis[0], axis[1], axis[2]);
+ glRotatef(angle * (float)(180.0/M_PI), axis[0], axis[1], axis[2]);
glColor3f(0, 1, 1);
gluCylinder(quad, sk_clampPointSize(pt, size), 0, sk_clampPointSize(pt, height), 10, 2);
@@ -1817,7 +1817,7 @@ int sk_detectTrimGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNUSE
sub_v3_v3v3(s1, gest->segments->points[1].p, gest->segments->points[0].p);
sub_v3_v3v3(s2, gest->segments->points[2].p, gest->segments->points[1].p);
- angle = RAD2DEG(angle_v2v2(s1, s2));
+ angle = RAD2DEGF(angle_v2v2(s1, s2));
if (angle > 60 && angle < 120)
{
@@ -1935,7 +1935,7 @@ int sk_detectDeleteGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNU
sub_v3_v3v3(s1, gest->segments->points[1].p, gest->segments->points[0].p);
sub_v3_v3v3(s2, gest->segments->points[2].p, gest->segments->points[1].p);
- angle = RAD2DEG(angle_v2v2(s1, s2));
+ angle = RAD2DEGF(angle_v2v2(s1, s2));
if (angle > 120)
{
@@ -2067,7 +2067,7 @@ int sk_detectReverseGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UN
sub_v3_v3v3(end_v, sk_lastStrokePoint(gest->stk)->p, isect->p);
}
- angle = RAD2DEG(angle_v2v2(start_v, end_v));
+ angle = RAD2DEGF(angle_v2v2(start_v, end_v));
if (angle > 120)
{
diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c
index ce4092b2b84..6a43564e5f1 100644
--- a/source/blender/editors/armature/reeb.c
+++ b/source/blender/editors/armature/reeb.c
@@ -545,12 +545,12 @@ static void verifyBucketsArc(ReebGraph *UNUSED(rg), ReebArc *arc)
}
}
- if (ceil(head->weight) != arc->buckets[0].val)
+ if (ceilf(head->weight) != arc->buckets[0].val)
{
printArc(arc);
printf("alloc error in first bucket: %f should be %f \n", arc->buckets[0].val, ceil(head->weight));
}
- if (floor(tail->weight) != arc->buckets[arc->bcount - 1].val)
+ if (floorf(tail->weight) != arc->buckets[arc->bcount - 1].val)
{
printArc(arc);
printf("alloc error in last bucket: %f should be %f \n", arc->buckets[arc->bcount - 1].val, floor(tail->weight));