[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26701] trunk/blender/source/blender/ editors/animation/anim_channels_edit.c: Durian Bugreport - Animation channel visiblity (upwards) flushing

Joshua Leung aligorith at gmail.com
Mon Feb 8 11:47:34 CET 2010


Revision: 26701
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26701
Author:   aligorith
Date:     2010-02-08 11:47:34 +0100 (Mon, 08 Feb 2010)

Log Message:
-----------
Durian Bugreport - Animation channel visiblity (upwards) flushing

When the visiblity of a F-Curve in an expanded group was enabled using VKEY, the visibility of all groups above the expanded groups were also turned on.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/animation/anim_channels_edit.c

Modified: trunk/blender/source/blender/editors/animation/anim_channels_edit.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_channels_edit.c	2010-02-08 10:27:10 UTC (rev 26700)
+++ trunk/blender/source/blender/editors/animation/anim_channels_edit.c	2010-02-08 10:47:34 UTC (rev 26701)
@@ -437,18 +437,29 @@
 			
 			/* if the level is 'less than' (i.e. more important) the level we're matching
 			 * but also 'less than' the level just tried (i.e. only the 1st group above grouped F-Curves, 
-			 * when toggling visibility of F-Curves, gets flushed), flush the new status...
+			 * when toggling visibility of F-Curves, gets flushed, which should happen if we don't let prevLevel
+			 * get updated below once the first 1st group is found)...
 			 */
-			if (level < prevLevel)
+			if (level < prevLevel) {
+				/* flush the new status... */
 				ANIM_channel_setting_set(ac, ale, setting, on);
-			/* however, if the level is 'greater than' (i.e. less important than the previous channel,
-			 * stop searching, since we've already reached the bottom of another hierarchy
-			 */
-			else if (level > matchLevel)
-				break;
-			
-			/* store this level as the 'old' level now */
-			prevLevel= level;
+				
+				/* store this level as the 'old' level now */
+				prevLevel= level;
+			}	
+			/* if the level is 'greater than' (i.e. less important) than the previous level... */
+			else if (level > prevLevel) {
+				/* if previous level was a base-level (i.e. 0 offset / root of one hierarchy),
+				 * stop here
+				 */
+				if (prevLevel == 0)
+					break;
+				/* otherwise, this level weaves into another sibling hierarchy to the previous one just
+				 * finished, so skip until we get to the parent of this level 
+				 */
+				else
+					continue;
+			}
 		}
 	}
 	





More information about the Bf-blender-cvs mailing list