diff options
Diffstat (limited to 'source/blender/ikplugin/intern/ikplugin_api.c')
-rw-r--r-- | source/blender/ikplugin/intern/ikplugin_api.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/ikplugin/intern/ikplugin_api.c b/source/blender/ikplugin/intern/ikplugin_api.c index cdc4ee11518..c3310e77ad6 100644 --- a/source/blender/ikplugin/intern/ikplugin_api.c +++ b/source/blender/ikplugin/intern/ikplugin_api.c @@ -42,10 +42,12 @@ #include "ikplugin_api.h" #include "iksolver_plugin.h" -#include "itasc_plugin.h" +#ifdef WITH_IK_ITASC +#include "itasc_plugin.h" +#endif -static IKPlugin ikplugin_tab[BIK_SOLVER_COUNT] = { +static IKPlugin ikplugin_tab[] = { /* Legacy IK solver */ { iksolver_initialize_tree, @@ -55,6 +57,7 @@ static IKPlugin ikplugin_tab[BIK_SOLVER_COUNT] = { NULL, NULL, NULL, +#ifdef WITH_IK_ITASC }, /* iTaSC IK solver */ { @@ -65,13 +68,13 @@ static IKPlugin ikplugin_tab[BIK_SOLVER_COUNT] = { itasc_clear_cache, itasc_update_param, itasc_test_constraint, +#endif } }; - static IKPlugin *get_plugin(bPose *pose) { - if (!pose || pose->iksolver < 0 || pose->iksolver >= BIK_SOLVER_COUNT) + if (!pose || pose->iksolver < 0 || pose->iksolver >= (sizeof(ikplugin_tab) / sizeof(IKPlugin))) return NULL; return &ikplugin_tab[pose->iksolver]; @@ -135,3 +138,4 @@ void BIK_test_constraint(struct Object *ob, struct bConstraint *cons) if (plugin && plugin->test_constraint) plugin->test_constraint(ob, cons); } + |