[Bf-blender-cvs] [e93990d] master: Bugfix T42697: Hiding/unhiding NLA strip doesn't update the 3D Viewport

Joshua Leung noreply at git.blender.org
Fri Dec 5 02:16:00 CET 2014


Commit: e93990dfc5a8482c7e0b9b1c4d64ec8ec8095f65
Author: Joshua Leung
Date:   Fri Dec 5 14:14:50 2014 +1300
Branches: master
https://developer.blender.org/rBe93990dfc5a8482c7e0b9b1c4d64ec8ec8095f65

Bugfix T42697: Hiding/unhiding NLA strip doesn't update the 3D Viewport

The Toggle Muting operator was missing code to tag the animation to get recalculated.

This was also missing from a few other operators too, including Snap, and
Add/Paste FModifiers .

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

M	source/blender/editors/space_nla/nla_edit.c

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

diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index f43982f..35c540b 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -1372,11 +1372,15 @@ static int nlaedit_toggle_mute_exec(bContext *C, wmOperator *UNUSED(op))
 				/* just flip the mute flag for now */
 				// TODO: have a pre-pass to check if mute all or unmute all?
 				strip->flag ^= NLASTRIP_FLAG_MUTED;
+				
+				/* tag AnimData to get recalculated */
+				ale->update |= ANIM_UPDATE_DEPS;
 			}
 		}
 	}
 	
-	/* free temp data */
+	/* cleanup */
+	ANIM_animdata_update(&ac, &anim_data);
 	ANIM_animdata_freelist(&anim_data);
 	
 	/* set notifier that things have changed */
@@ -2130,9 +2134,13 @@ static int nlaedit_snap_exec(bContext *C, wmOperator *op)
 		
 		/* remove the meta-strips now that we're done */
 		BKE_nlastrips_clear_metas(&nlt->strips, 0, 1);
+		
+		/* tag for recalculating the animation */
+		ale->update |= ANIM_UPDATE_DEPS;
 	}
 	
-	/* free temp data */
+	/* cleanup */
+	ANIM_animdata_update(&ac, &anim_data);
 	ANIM_animdata_freelist(&anim_data);
 	
 	/* refresh auto strip properties */
@@ -2246,6 +2254,7 @@ static int nla_fmodifier_add_exec(bContext *C, wmOperator *op)
 			
 			if (fcm) {
 				set_active_fmodifier(&strip->modifiers, fcm);
+				ale->update |= ANIM_UPDATE_DEPS;
 			}
 			else {
 				BKE_reportf(op->reports, RPT_ERROR,
@@ -2256,6 +2265,7 @@ static int nla_fmodifier_add_exec(bContext *C, wmOperator *op)
 	}
 	
 	/* free temp data */
+	ANIM_animdata_update(&ac, &anim_data);
 	ANIM_animdata_freelist(&anim_data);
 	
 	/* set notifier that things have changed */
@@ -2375,10 +2385,12 @@ static int nla_fmodifier_paste_exec(bContext *C, wmOperator *op)
 		for (strip = nlt->strips.first; strip; strip = strip->next) {
 			// TODO: do we want to replace existing modifiers? add user pref for that!
 			ok += ANIM_fmodifiers_paste_from_buf(&strip->modifiers, 0);
+			ale->update |= ANIM_UPDATE_DEPS;
 		}
 	}
 	
 	/* clean up */
+	ANIM_animdata_update(&ac, &anim_data);
 	ANIM_animdata_freelist(&anim_data);
 	
 	/* successful or not? */




More information about the Bf-blender-cvs mailing list