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/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));