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:
authorGaia Clary <gaia.clary@machinimatrix.org>2017-03-21 19:13:31 +0300
committerGaia Clary <gaia.clary@machinimatrix.org>2017-03-23 16:14:22 +0300
commit1978ac65c43533d4539c1b06621ef999c8d0a5c2 (patch)
tree5d8293cb128f5444ffef31b0158873e70b4ea502 /source/blender
parent89631485ccf5fac5e61f77f29c4b9ca2e9779574 (diff)
collada: use local variable to avoid repeated call of bone chain_length_calculator
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/collada/ArmatureImporter.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/collada/ArmatureImporter.cpp b/source/blender/collada/ArmatureImporter.cpp
index 5b3340a938f..d5c1af9347d 100644
--- a/source/blender/collada/ArmatureImporter.cpp
+++ b/source/blender/collada/ArmatureImporter.cpp
@@ -290,12 +290,13 @@ void ArmatureImporter::connect_bone_chains(bArmature *armature, Bone *parentbone
for (; child; child = child->next) {
BoneExtended *be = extended_bones[child->name];
if (be != NULL) {
- if (be->get_chain_length() <= clip) {
- if (be->get_chain_length() > maxlen) {
+ int chain_len = be->get_chain_length();
+ if (chain_len <= clip) {
+ if (chain_len > maxlen) {
dominant_child = be;
- maxlen = be->get_chain_length();
+ maxlen = chain_len;
}
- else if (be->get_chain_length() == maxlen) {
+ else if (chain_len == maxlen) {
dominant_child = NULL;
}
}