diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-05-31 15:51:19 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-05-31 15:55:15 +0300 |
commit | d8dbd49a2f23b7637f05fc058f39bdf6ab706624 (patch) | |
tree | 0805b9372c82ae6505d87e879824efe1d3e32f8e /source/blender/ikplugin/intern/ikplugin_api.c | |
parent | 8987f7987d8160e1f6e79e8c85d6ce65b885ab25 (diff) |
Cleanup: style, use braces in source/
Automated using clang-tidy.
Diffstat (limited to 'source/blender/ikplugin/intern/ikplugin_api.c')
-rw-r--r-- | source/blender/ikplugin/intern/ikplugin_api.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/source/blender/ikplugin/intern/ikplugin_api.c b/source/blender/ikplugin/intern/ikplugin_api.c index 3a851df7058..f473bc02ce1 100644 --- a/source/blender/ikplugin/intern/ikplugin_api.c +++ b/source/blender/ikplugin/intern/ikplugin_api.c @@ -70,8 +70,9 @@ static IKPlugin ikplugin_tab[] = { static IKPlugin *get_plugin(bPose *pose) { if (!pose || pose->iksolver < 0 || - pose->iksolver >= ((sizeof(ikplugin_tab) / sizeof(IKPlugin)) - 1)) + pose->iksolver >= ((sizeof(ikplugin_tab) / sizeof(IKPlugin)) - 1)) { return NULL; + } return &ikplugin_tab[pose->iksolver]; } @@ -83,8 +84,9 @@ void BIK_initialize_tree(struct Depsgraph *depsgraph, Scene *scene, Object *ob, { IKPlugin *plugin = get_plugin(ob->pose); - if (plugin && plugin->initialize_tree_func) + if (plugin && plugin->initialize_tree_func) { plugin->initialize_tree_func(depsgraph, scene, ob, ctime); + } } void BIK_execute_tree( @@ -92,46 +94,52 @@ void BIK_execute_tree( { IKPlugin *plugin = get_plugin(ob->pose); - if (plugin && plugin->execute_tree_func) + if (plugin && plugin->execute_tree_func) { plugin->execute_tree_func(depsgraph, scene, ob, pchan, ctime); + } } void BIK_release_tree(struct Scene *scene, Object *ob, float ctime) { IKPlugin *plugin = get_plugin(ob->pose); - if (plugin && plugin->release_tree_func) + if (plugin && plugin->release_tree_func) { plugin->release_tree_func(scene, ob, ctime); + } } void BIK_clear_data(struct bPose *pose) { IKPlugin *plugin = get_plugin(pose); - if (plugin && plugin->remove_armature_func) + if (plugin && plugin->remove_armature_func) { plugin->remove_armature_func(pose); + } } void BIK_clear_cache(struct bPose *pose) { IKPlugin *plugin = get_plugin(pose); - if (plugin && plugin->clear_cache) + if (plugin && plugin->clear_cache) { plugin->clear_cache(pose); + } } void BIK_update_param(struct bPose *pose) { IKPlugin *plugin = get_plugin(pose); - if (plugin && plugin->update_param) + if (plugin && plugin->update_param) { plugin->update_param(pose); + } } void BIK_test_constraint(struct Object *ob, struct bConstraint *cons) { IKPlugin *plugin = get_plugin(ob->pose); - if (plugin && plugin->test_constraint) + if (plugin && plugin->test_constraint) { plugin->test_constraint(ob, cons); + } } |