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:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-05-31 12:09:48 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-05-31 12:17:57 +0300
commit46cfa605c3325a2fac35fb6efbe8fb0dc8de7da6 (patch)
tree955b451b3e0a23855504b10b605d16a788988cc1
parent17f458ff320c5c0a0c5cdaeb5da60926d3e03d68 (diff)
Cleanup: Reduce indentation level
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c70
1 files changed, 36 insertions, 34 deletions
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index 43b32a1ee3e..29614b87579 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -1716,46 +1716,48 @@ static void animsys_evaluate_fcurves(PointerRNA *ptr, ListBase *list, AnimMapper
const bool copy_on_write = orig_ptr.id.data != NULL;
- /* calculate then execute each curve */
+ /* Calculate then execute each curve. */
for (fcu = list->first; fcu; fcu = fcu->next) {
- /* check if this F-Curve doesn't belong to a muted group */
- if ((fcu->grp == NULL) || (fcu->grp->flag & AGRP_MUTED) == 0) {
- /* check if this curve should be skipped */
- if ((fcu->flag & (FCURVE_MUTED | FCURVE_DISABLED)) == 0) {
- PathResolvedRNA anim_rna;
- /* Read current value from original datablock. */
- float dna_val;
+ /* Check if this F-Curve doesn't belong to a muted group. */
+ if ((fcu->grp != NULL) && (fcu->grp->flag & AGRP_MUTED)) {
+ continue;
+ }
+ /* Check if this curve should be skipped. */
+ if ((fcu->flag & (FCURVE_MUTED | FCURVE_DISABLED))) {
+ continue;
+ }
+ PathResolvedRNA anim_rna;
+ /* Read current value from original datablock. */
+ float dna_val;
- if (copy_on_write) {
- if (animsys_store_rna_setting(&orig_ptr, remap, fcu->rna_path, fcu->array_index, &anim_rna)) {
- if (!animsys_read_rna_setting(&anim_rna, &dna_val)) {
- continue;
- }
- }
- else {
- continue;
- }
+ if (copy_on_write) {
+ if (animsys_store_rna_setting(&orig_ptr, remap, fcu->rna_path, fcu->array_index, &anim_rna)) {
+ if (!animsys_read_rna_setting(&anim_rna, &dna_val)) {
+ continue;
}
+ }
+ else {
+ continue;
+ }
+ }
- if (animsys_store_rna_setting(ptr, remap, fcu->rna_path, fcu->array_index, &anim_rna)) {
- if (copy_on_write) {
- const bool check_orig_dna = ((recalc & ADT_RECALC_CHECK_ORIG_DNA) != 0);
- /* If we are tweaking DNA without changing frame, we don't write f-curves,
- * since otherwise we will not be able to change properties which has animation.
- */
- if (check_orig_dna && fcu->orig_dna_val != dna_val) {
- continue;
- }
- }
+ if (animsys_store_rna_setting(ptr, remap, fcu->rna_path, fcu->array_index, &anim_rna)) {
+ if (copy_on_write) {
+ const bool check_orig_dna = ((recalc & ADT_RECALC_CHECK_ORIG_DNA) != 0);
+ /* If we are tweaking DNA without changing frame, we don't write f-curves,
+ * since otherwise we will not be able to change properties which has animation.
+ */
+ if (check_orig_dna && fcu->orig_dna_val != dna_val) {
+ continue;
+ }
+ }
- const float curval = calculate_fcurve(&anim_rna, fcu, ctime);
- animsys_write_rna_setting(&anim_rna, curval);
+ const float curval = calculate_fcurve(&anim_rna, fcu, ctime);
+ animsys_write_rna_setting(&anim_rna, curval);
- if (copy_on_write) {
- /* Store original DNA value f-curve was written for. */
- fcu->orig_dna_val = dna_val;
- }
- }
+ if (copy_on_write) {
+ /* Store original DNA value f-curve was written for. */
+ fcu->orig_dna_val = dna_val;
}
}
}