Friday, January 27, 2012

Action Constraint GUI - Revised

While checking out a bug report today, I realised that the current GUI for the Action Constraint doesn't actually make any sense from a workflow/IA perspective. The following diagram explains exactly why:

As can be seen, the parameters used for the input and output ranges are all jumbled up. It is not that clear to see that:
- The "Transformation Channel" refers to a value from the constraint's "target" (i.e. "Driver_1" here)
- The "Convert" field here only refers to how the target is used
- That the target range is used as input to looking up values in the Action (the layout implies the opposite, especially in left-to-right languages)

Hence, in an attempt to clarify this relationship, I've devised an updated representation for trunk:
Here it's much more obvious that there is the set of "input" range settings and a set of "output" range settings.

There's also less clutter, since some of lengthy (and often truncated) labels before aren't really needed anymore. By using layout for grouping and classification, we're able to figure out what they mean and how they related to each other given the extra contextual information.

As you might also notice, I've switched the order of axis displays to be in front of the transform name (just like in the Animation Editors). However here, this has been done because the widget names often got truncated, missing out the interesting parts of the text. By switching the representation, the interesting stuff still gets shown when the layout gets compacted.

All together now:

Before I finish off,  thought I'd make a quick note about the target range units, since this was the topic of the bug report I had been working on.

Since the number fields used here are used for different types of transforms, we can't explicitly put any units on them (at least not from the PyAPI in its current state. See my earlier post about adding units to active keyframe panel for more details about these issues.). Hence, all quantities here are in Blender's default units for various measurements:
- Distances/Locations are in Blender Units (1 BU = 1 m by convention)
- Rotations are in Degrees
- Scaling is, umm... Scaling Factors!

Hopefully this will clarify any confusion out there about this constraint.


  1. why not put near all the target elements (including range)? like this

    1. IMO, there is more of a vertical flow to these layouts, meaning that it is easier to keep looking down for all the related settings instead of jumping across horizontally for the rest of the settings.

      I suspect that one of the reasons you bring this up is that gap after the action name perhaps breaking the vertical flow a bit. Indeed that was something that was a bit tricky to deal with (though perhaps one day this gap will need to get filled if we change the way Keying Sets group F-Curves). In the interests of getting the ranges to line up though, this gap was the natural consequence of that.

      Hopefully that answers your question :)

  2. "...I suspect one of the Reasons That You Bring up this Is that gap after the action name."
    it's what!
    and also that in my vertical flow, everything that appears before "to action" concerns "from" (including the target, bone, etc..)
    I think your new layout is much clearer, however,
    mine was only a small observation
    good job!