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:
authorJason Wilkins <Jason.A.Wilkins@gmail.com>2012-11-27 05:18:54 +0400
committerJason Wilkins <Jason.A.Wilkins@gmail.com>2012-11-27 05:18:54 +0400
commitff7c690e4064bbb1d6180668625d7b414000e9ea (patch)
tree4ac96ca8ed5a4e6a7ab1104d0271aba02266ace6 /source/blender/ikplugin/intern
parent6b65102c20e9bdafd90f55f60c2a2084d873e809 (diff)
parent9b32776be349f5e738b449ca1298e65ce1b69d33 (diff)
Merge w/ trunk: r52086-r52534 (As with last time, the game engine was not merged)soc-2012-swiss_cheese
Diffstat (limited to 'source/blender/ikplugin/intern')
-rw-r--r--source/blender/ikplugin/intern/ikplugin_api.c4
-rw-r--r--source/blender/ikplugin/intern/iksolver_plugin.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/ikplugin/intern/ikplugin_api.c b/source/blender/ikplugin/intern/ikplugin_api.c
index 9a0878f24ce..efe07b2c48c 100644
--- a/source/blender/ikplugin/intern/ikplugin_api.c
+++ b/source/blender/ikplugin/intern/ikplugin_api.c
@@ -79,14 +79,14 @@ static IKPlugin ikplugin_tab[] = {
itasc_update_param,
itasc_test_constraint,
},
- #endif
+#endif
{ NULL }
};
static IKPlugin *get_plugin(bPose *pose)
{
- if (!pose || pose->iksolver < 0 || pose->iksolver >= (sizeof(ikplugin_tab) / sizeof(IKPlugin)))
+ if (!pose || pose->iksolver < 0 || pose->iksolver > (sizeof(ikplugin_tab)/sizeof(IKPlugin) - 2))
return NULL;
return &ikplugin_tab[pose->iksolver];
diff --git a/source/blender/ikplugin/intern/iksolver_plugin.c b/source/blender/ikplugin/intern/iksolver_plugin.c
index af15333ece5..ca81f4c915a 100644
--- a/source/blender/ikplugin/intern/iksolver_plugin.c
+++ b/source/blender/ikplugin/intern/iksolver_plugin.c
@@ -379,6 +379,7 @@ static void execute_posetree(struct Scene *scene, Object *ob, PoseTree *tree)
copy_v3_v3(goalpos, goal[3]);
copy_m3_m4(goalrot, goal);
+ normalize_m3(goalrot);
/* same for pole vector target */
if (data->poletar) {
@@ -433,7 +434,7 @@ static void execute_posetree(struct Scene *scene, Object *ob, PoseTree *tree)
iktarget = iktree[target->tip];
- if (data->weight != 0.0f) {
+ if ((data->flag & CONSTRAINT_IK_POS) && data->weight != 0.0f) {
if (poleconstrain)
IK_SolverSetPoleVectorConstraint(solver, iktarget, goalpos,
polepos, data->poleangle, (poleangledata == data));