[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38178] branches/soc-2011-pepper/source/ blender/editors/animation/anim_filter.c: NLA Drawing - Second attempt at providing options for streamlining the

Joshua Leung aligorith at gmail.com
Thu Jul 7 07:28:10 CEST 2011


Revision: 38178
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38178
Author:   aligorith
Date:     2011-07-07 05:28:09 +0000 (Thu, 07 Jul 2011)
Log Message:
-----------
NLA Drawing - Second attempt at providing options for streamlining the
view for transforming strips

When the "Include animation data blocks with no NLA data" toggle
(action icon) is off, action lines are only shown if they have
keyframes. So when this option is off, only NLA blocks that have NLA
tracks will be shown, and of those, only those which currently have an
active action with keyframes will have their red action lines shown.

Combined with the vertical-space tweak when show control curves is
turned off, this should be good enough for most cases.

Modified Paths:
--------------
    branches/soc-2011-pepper/source/blender/editors/animation/anim_filter.c

Modified: branches/soc-2011-pepper/source/blender/editors/animation/anim_filter.c
===================================================================
--- branches/soc-2011-pepper/source/blender/editors/animation/anim_filter.c	2011-07-07 05:24:12 UTC (rev 38177)
+++ branches/soc-2011-pepper/source/blender/editors/animation/anim_filter.c	2011-07-07 05:28:09 UTC (rev 38178)
@@ -1097,7 +1097,7 @@
  *	- for normal filtering (i.e. for editing), we only need the NLA-tracks but they can be in 'normal' evaluation
  *	  order, i.e. first to last. Otherwise, some tools may get screwed up.
  */
-static size_t animfilter_nla (bAnimContext *UNUSED(ac), ListBase *anim_data, bDopeSheet *UNUSED(ads), AnimData *adt, int filter_mode, ID *owner_id)
+static size_t animfilter_nla (bAnimContext *UNUSED(ac), ListBase *anim_data, bDopeSheet *ads, AnimData *adt, int filter_mode, ID *owner_id)
 {
 	NlaTrack *nlt;
 	NlaTrack *first=NULL, *next=NULL;
@@ -1105,16 +1105,21 @@
 	
 	/* if showing channels, include active action */
 	if (filter_mode & ANIMFILTER_LIST_CHANNELS) {
-		/* there isn't really anything editable here, so skip if need editable */
-		if ((filter_mode & ANIMFILTER_FOREDIT) == 0) { 
-			/* just add the action track now (this MUST appear for drawing)
-			 *	- as AnimData may not have an action, we pass a dummy pointer just to get the list elem created, then
-			 *	  overwrite this with the real value - REVIEW THIS...
-			 */
-			ANIMCHANNEL_NEW_CHANNEL_FULL((void *)(&adt->action), ANIMTYPE_NLAACTION, owner_id, 
-				{
-					ale->data= adt->action ? adt->action : NULL; 
-				});
+		/* if NLA action-line filtering is off, don't show unless there are keyframes, 
+		 * in order to keep things more compact for doing transforms
+		 */
+		if (!(ads->filterflag & ADS_FILTER_NLA_NOACT) || (adt->action)) {
+			/* there isn't really anything editable here, so skip if need editable */
+			if ((filter_mode & ANIMFILTER_FOREDIT) == 0) { 
+				/* just add the action track now (this MUST appear for drawing)
+				 *	- as AnimData may not have an action, we pass a dummy pointer just to get the list elem created, then
+				 *	  overwrite this with the real value - REVIEW THIS...
+				 */
+				ANIMCHANNEL_NEW_CHANNEL_FULL((void *)(&adt->action), ANIMTYPE_NLAACTION, owner_id, 
+					{
+						ale->data= adt->action ? adt->action : NULL; 
+					});
+			}
 		}
 		
 		/* first track to include will be the last one if we're filtering by channels */




More information about the Bf-blender-cvs mailing list