diff options
author | Gaia Clary <gaia.clary@machinimatrix.org> | 2018-03-12 01:45:53 +0300 |
---|---|---|
committer | Gaia Clary <gaia.clary@machinimatrix.org> | 2018-03-12 01:45:53 +0300 |
commit | ddae05cdca9211a789a6501c6ca054f9a46e07c5 (patch) | |
tree | e7591dd7c31ccfb6c25beb0bca7bf670a788cd35 /source/blender/collada/AnimationExporter.cpp | |
parent | 7ecc7c46af493f984e9cb2f08ac75da5b30ffd35 (diff) | |
parent | 2c9c22df26dfdcf03bb308fdf35294ed79c2d0e5 (diff) |
Merge remote-tracking branch 'origin' into blender2.8
Diffstat (limited to 'source/blender/collada/AnimationExporter.cpp')
-rw-r--r-- | source/blender/collada/AnimationExporter.cpp | 18 |
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; } |