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:
authorCampbell Barton <ideasman42@gmail.com>2013-05-27 22:51:31 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-05-27 22:51:31 +0400
commit44b3735078c291291604671f198d8ae701f684e2 (patch)
tree0dbeb5536dfc4859b510148f9ec282583d19436a
parentd2d0866cff8a56ce3515d822d61ad40ce27180da (diff)
fix error in own recent commit, also other minor changes.
-rw-r--r--source/blender/blenlib/intern/math_rotation.c14
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c5
-rw-r--r--source/blender/nodes/intern/node_common.c3
3 files changed, 8 insertions, 14 deletions
diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c
index 44d54365e6a..38046825308 100644
--- a/source/blender/blenlib/intern/math_rotation.c
+++ b/source/blender/blenlib/intern/math_rotation.c
@@ -573,21 +573,15 @@ void interp_qt_qtqt(float result[4], const float quat1[4], const float quat2[4],
{
float quat[4], omega, cosom, sinom, sc1, sc2;
- cosom = quat1[0] * quat2[0] + quat1[1] * quat2[1] + quat1[2] * quat2[2] + quat1[3] * quat2[3];
+ cosom = dot_qtqt(quat1, quat2);
/* rotate around shortest angle */
if (cosom < 0.0f) {
cosom = -cosom;
- quat[0] = -quat1[0];
- quat[1] = -quat1[1];
- quat[2] = -quat1[2];
- quat[3] = -quat1[3];
+ negate_v4_v4(quat, quat1);
}
else {
- quat[0] = quat1[0];
- quat[1] = quat1[1];
- quat[2] = quat1[2];
- quat[3] = quat1[3];
+ copy_qt_qt(quat, quat1);
}
if ((1.0f - cosom) > 0.0001f) {
@@ -640,7 +634,7 @@ void tri_to_quat_ex(float quat[4], const float v1[3], const float v2[3], const f
n[0] = 1.0f;
}
- angle = -0.5f * (float)saacos(vec[2]);
+ angle = -0.5f * saacos(vec[2]);
co = cosf(angle);
si = sinf(angle);
q1[0] = co;
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index 9896ffa6bb6..af013f7613a 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -785,8 +785,9 @@ static void act_vert_def(Object *ob, BMVert **r_eve, MDeformVert **r_dvert)
BMEditSelection *ese = (BMEditSelection *)em->bm->selected.last;
if (ese && ese->htype == BM_VERT) {
- if (r_eve) *r_eve = (BMVert *)ese->ele;
- *r_dvert = BM_ELEM_CD_GET_VOID_P(*r_eve, cd_dvert_offset);
+ BMVert *eve = (BMVert *)ese->ele;
+ if (r_eve) *r_eve = eve;
+ *r_dvert = BM_ELEM_CD_GET_VOID_P(eve, cd_dvert_offset);
return;
}
}
diff --git a/source/blender/nodes/intern/node_common.c b/source/blender/nodes/intern/node_common.c
index e763c4bbeb7..0bea146abea 100644
--- a/source/blender/nodes/intern/node_common.c
+++ b/source/blender/nodes/intern/node_common.c
@@ -270,8 +270,7 @@ static void node_reroute_inherit_type_recursive(bNodeTree *ntree, bNode *node)
node->done = 1;
/* recursive update */
- for (link = ntree->links.first; link; link = link->next)
- {
+ for (link = ntree->links.first; link; link = link->next) {
bNode *fromnode = link->fromnode;
bNode *tonode = link->tonode;
if (!tonode || !fromnode)