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>2018-03-12 01:45:53 +0300
committerGaia Clary <gaia.clary@machinimatrix.org>2018-03-12 01:45:53 +0300
commitddae05cdca9211a789a6501c6ca054f9a46e07c5 (patch)
treee7591dd7c31ccfb6c25beb0bca7bf670a788cd35 /source/blender/collada/AnimationExporter.cpp
parent7ecc7c46af493f984e9cb2f08ac75da5b30ffd35 (diff)
parent2c9c22df26dfdcf03bb308fdf35294ed79c2d0e5 (diff)
Merge remote-tracking branch 'origin' into blender2.8
Diffstat (limited to 'source/blender/collada/AnimationExporter.cpp')
-rw-r--r--source/blender/collada/AnimationExporter.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp
index 9c65aa4d2c5..53c1afd173f 100644
--- a/source/blender/collada/AnimationExporter.cpp
+++ b/source/blender/collada/AnimationExporter.cpp
@@ -1928,15 +1928,21 @@ void AnimationExporter::sample_animation(float *v, std::vector<float> &frames, i
bool AnimationExporter::validateConstraints(bConstraint *con)
{
- bool valid = true;
const bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con);
/* these we can skip completely (invalid constraints...) */
- if (cti == NULL) valid = false;
- if (con->flag & (CONSTRAINT_DISABLE | CONSTRAINT_OFF)) valid = false;
+ if (cti == NULL)
+ return false;
+ if (con->flag & (CONSTRAINT_DISABLE | CONSTRAINT_OFF))
+ return false;
+
/* these constraints can't be evaluated anyway */
- if (cti->evaluate_constraint == NULL) valid = false;
+ if (cti->evaluate_constraint == NULL)
+ return false;
+
/* influence == 0 should be ignored */
- if (con->enforce == 0.0f) valid = false;
+ if (con->enforce == 0.0f)
+ return false;
- return valid;
+ /* validation passed */
+ return true;
}