Friday, July 8, 2011

GSoC11 - More compact NLA display

In response to complaints from a few users, I've been looking into how NLA channels are displayed so that using the NLA to do large-scale object retiming is possible.

In the screenshot above, you can see that the rows are drawn with the same height as other animation channels normally would, and that there are no action-lines shown. This setup optimises the number of strips which can be shown at a time, though obviously there are some limits to this still, which are probably not going to go away.

To get a setup as above, turn off the following settings:
1) "Show Control Curves" from the View menu
2) "Include Animation Data blocks with no NLA data" (Action icon'd toggle)

-------------

Now for a little more in-depth commentary on the changes here, and some of the rationale behind all this.

Channel Heights
The "Show Control Curves" option was originally added to toggle the display of the influence (and also envisaged, but up till now not really exposed/used) time curves, which would control how strips behaved. These curves are basically those light-grey blending lines you see on strips when they overlap.

One of the main reasons why NLA channels were originally made taller than their counterparts from the other editors was that they needed to show these curves, so they needed to be taller so that these could be easily distinguished (see XSI for how tall their ones are... almost double our default sizes).

So, in order to allow more channels to be able to be seen vertically at a time, I decided to make the channels be drawn at the standard size when these curves do not need to be shown on the strips. Hence, the first step to getting more channels to fit (and which goes a very long way) is to disable this option, and have smaller channels.

Action Lines
Something which has always been a bit controversial are the "action lines": those red channels wedged just under the data-block's expander and the rest of the stack of NLA tracks.

Clearly they do end up taking some vertical space, which does prove to be a bit of a problem when you're trying to fit the NLA strips for a lot of objects on screen at once to retime them. Especially when there aren't any actions assigned to many (or most) of these action lines, yet they just sit there taking up space.

I eventually decided to make the following compromise (quoted directly from the commit log):
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.
Now, I know that some people have advocated for removing these completely, and merging whatever functionality they had with the expanders. While saving space, I strongly refute this idea.

The expanders encapsulate the "animation evaluation stack" for their respective data blocks. All the channels within this block are applied, one on top of the other, from bottom up, to yield the final result for this data block.

By merging the action lines with these expanders, you're getting yourself into semantically unclear territory:
- where does the action get applied?
- is it part of the evaluation stack or something separate?
- does it contribute, or is it part of one of the strips (as we used to see in 2.4)?

This very naturally leads into confusion about the relationship between Actions/Keyframing and the NLA. People starting thinking: "oh, perhaps I firstly need to add an strip, and add keyframes to that", which as I've discussed before, is a very very bad idea. I've ranted about the problems this approach causes before.

6 comments:

  1. Nice Additions Joshua!

    Aligorith, in the Graph editor there is a command "flatten handles". It would be also nice to have a command like Equalize length of the selected handles. What do you think?

    ReplyDelete
  2. Does each strip need the 'Act:' in front of it? Don't we already know they're actions? You can see the problem with it quite clearly above since you can't read the actual names.

    If some signifier is necessary, why not put it right aligned at the end of the strip, or an icon on the right side of the strip?

    Looking at that image, it would also be nice if the default theme colours for the strip backgrounds were inverted (dark/light), so your eye could easily follow across from the name to find the strips. Right now the whole point of those alternating lines is lost...

    cheers

    ReplyDelete
  3. Maybe that last comment doesn't make much sense, I meant to try something more like --> http://www.pasteall.org/pic/14703 where the lines act to guide your eye to match up the name with the strip.

    Maybe it would even help more if it alternated based on objects? (very crude --> http://www.pasteall.org/pic/14706 )

    I guess it all depends on what information is more important to group together/isolate from each other/link to the information on the left hand side pane. Needs some more though, and probably can be simplified imo.

    Looking at this more now as well, Are those <> keyframe icons really necessary next to each track name? Are they communicating any useful information? To me they're not, and I would say remove them.

    cheers

    ReplyDelete
  4. Another major improvement! I definitely agree entirely merging the object line would cause confusion. I also wonder what the "Act" bit serves. If it isn't an Action, its a transition or meta - which are already distinguished with colour.

    ReplyDelete
  5. Matt+Mike: The "Act:" bit indeed was a bit redundant. That was part of the names of the strips though (rather than being display only). I've changed the code to not do this for new strips, though old strips will not be updated.

    ReplyDelete
  6. Matt:
    1) The backdrops behind the strips indicate extrapolation mode of the strips, hence the similarity to the strip colours.

    2) The keyframe icons (accidentally committed) are actually the toggles for "solo"ing a track. The original small dots turned out to be a bit too easy to miss, though using keyframe diamonds isn't that great either. I've been trying to get hold of some star icons which match our theme to use instead.

    Icons fitting this description (or alternative proposals) are very welcome ;)

    ReplyDelete