Page MenuHome

Fix T87041: Driver Editor not updated in realtime
ClosedPublic

Authored by Philipp Oeser (lichtwerk) on Jul 22 2021, 11:12 PM.

Details

Summary

Caused by rBbbb2e0614fc3: Performance: Draw play head as an overlay

Since above commit only the playhead is updated as an overlay in
animation playback (was moved out of drawing of the main region for
perfomance reasons).
The driver value "debug" visualization is very useful to have during
playback though but was left in main region drawing as part of
draw_fcurve (thus does not update in realtime anymore).

Moving graph_draw_driver_debug into the overlay is not feasible
because it requires animation filtering which has significant overhead which needs to be avoided in the overlay which is redrawn on every UI interaction.

Now tag the whole main region for updates in the Driver Editor during playback instead (which will make the Drivers Editor as slow during playback as before rBbbb2e0614fc3 -- but with realtime updates of the debug visualization).

Diff Detail

Repository
rB Blender
Branch
T87041 (branched from master)
Build Status
Buildable 16033
Build 16033: arc lint + arc unit

Event Timeline

Philipp Oeser (lichtwerk) requested review of this revision.Jul 22 2021, 11:12 PM
Philipp Oeser (lichtwerk) created this revision.
source/blender/editors/space_graph/space_graph.c
342 ↗(On Diff #39835)

ANIM_animdata_filter has an overhead. doing this for every redraw would impact the performance (how well does it perform in large scenes.) For large scenes it would be better to tweak screen_animation_region_tag_redraw.

Jeroen Bakker (jbakker) requested changes to this revision.Jul 26 2021, 11:51 AM

I rather see the tweak in screen_animation_region_tag_redraw. Overlays aren't cached and are drawn every draw loop of blender. This means that everything a user does requires recalculating the anim data. I think it is better to stance the result in the offscreen buffers.

This revision now requires changes to proceed.Jul 26 2021, 11:51 AM

I rather see the tweak in screen_animation_region_tag_redraw. Overlays aren't cached and are drawn every draw loop of blender. This means that everything a user does requires recalculating the anim data. I think it is better to stance the result in the offscreen buffers.

Not sure I understand correctly: animfilter has overhead, yes, but it would only be done in context of a drivers editor? If a Drivers Editor is there, then true, there's overhead, but same would happen if I tweak screen_animation_region_tag_redraw
to tag the main region for redrawing then, no? (even worse, all fcurves would -- unneccessarily -- be drawn)? So a couple of questions:

  • we dont want to couple fcurve drawing with graph_draw_driver_debug, right? (most of the time we only want to refresh the latter, not the former)
  • if we dont want to trigger the drawing of graph_draw_driver_debug in the overlay, where else?
  • you mention screen_animation_region_tag_redraw but are you proposing to draw from there (call graph_draw_driver_debug there?)?
  • if I tag the main region for redraw in screen_animation_region_tag_redraw, then we are back at drawing the fcurves as well (which we dont want, right?)
  • dont draw driver debugviz in the overlay, instead tag the whole main region for update during playback in the Drivers Editor (see comment in code for reasoning)
This revision is now accepted and ready to land.Aug 2 2021, 8:42 AM