Friday, March 22, 2013

Driver Debugging Tools

Over the past few weeks, I've been working on various tools and tweaks to make it a bit easier to track down problems with drivers. I'll start with the latest and most visible addition, before showing off some of the less visible things...

1) Driver Value Indicators
In r.55489, I've just committed a way of showing the relationship between the "driver value" (i.e. result of the stuff in NKEY panel) and the values applied to properties being driven (i.e. sliders). This is shown in the screenshot below:

The x-axis in this mode is in terms of "driver values" (instead of frames, as for animation). Hence, we find the point along the x-axis where the driver value lies, and we draw a line upwards from that (vertical dotted line) to look for where this intersects the F-Curve associated with the driver (light red line). The y-value of this intersection point (horizontal dotted line, which we take back to the vertical/y-axis) is the property value.

2) Error Filter
Instead of checking the console or scrolling and expanding the entire list to see whether there were any broken drivers, there is now an easier way. Simply activate the "broken drivers" filter (the help/lifesaver-ring) to see just the drivers which are currently disabled or have some unresolved errors that need cleaning up.

NOTE: this option also works for animation, and can be used to identify F-Curves which have invalid RNA-Paths (perhaps as a result of stuff being removed or renamed).

3) Invalid Driver Targets are now Highlighted
In conjunction with the Error Filter, invalid targets are now indicated in the UI using the "red alert" highlights. So now, there isn't any need to bring up the console to try and guess what went wrong.

For example:

No target object specified...

Two target objects required, but only the first was set...

We need bones (and in the same armature), not just any old objects!

Of course, these are not all of the errors that can occur here, though they give a good taste of what's expected here. Also, although it might still help to have explanations about the exact cause of the errors in each case, these indicators already go a long way towards making things better by already showing where the errors are/were detected.

No comments:

Post a Comment