[Bf-blender-cvs] [46cfa605c33] blender2.8: Cleanup: Reduce indentation level

Sergey Sharybin noreply at git.blender.org
Thu May 31 11:18:33 CEST 2018


Commit: 46cfa605c3325a2fac35fb6efbe8fb0dc8de7da6
Author: Sergey Sharybin
Date:   Thu May 31 11:09:48 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB46cfa605c3325a2fac35fb6efbe8fb0dc8de7da6

Cleanup: Reduce indentation level

===================================================================

M	source/blender/blenkernel/intern/anim_sys.c

===================================================================

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;
 			}
 		}
 	}



More information about the Bf-blender-cvs mailing list