Page MenuHome

Fix T72900: Unneeded Redraws when gizmos are hidden in 3d viewport
AbandonedPublic

Authored by Jeroen Bakker (jbakker) on Mon, Jan 6, 4:52 PM.

Details

Summary

When 3d viewport has gizmos hidden, the gizmos refresh states won't be reset,
resulting in too many redraws. This fix will reset the refresh tag in
the gizmo map after the redraw.

There are other ways how to solve this, but as the reset is very small I
chose this option. Other options are

  • move this into the draw manager
  • add ar parameters to the WM_gizmomap_tag_refresh_check

Diff Detail

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

Event Timeline

Jeroen Bakker (jbakker) edited the summary of this revision. (Show Details)Mon, Jan 6, 4:56 PM
Jeroen Bakker (jbakker) retitled this revision from Fix T72900: Redraw when gizmos are hidden to Fix T72900: Unneeded Redraws when gizmos are hidden in 3d viewport.
Jeroen Bakker (jbakker) planned changes to this revision.Mon, Jan 6, 5:24 PM
Jeroen Bakker (jbakker) requested review of this revision.Mon, Jan 6, 6:13 PM

There is no ideal place to solve this issue, without doing more refactoring. As gizmo's and wm are closer to each other I propose the current patch.

Jeroen Bakker (jbakker) edited the summary of this revision. (Show Details)Mon, Jan 6, 6:13 PM

Wanted to mention it here but this patch doesn't seem to fix a similar, perhaps related(?), issue: Extra viewport redraws happen if you have Gizmos visible, and you just mouse over them. Mousing over the gizmo, which highlights it a bit, causes the entire viewport to re-render which makes them quite unusable to have enabled, in rendered view at least.

Do you want a separate bug for this? Or do you want to attempt to address here if it's sufficiently related?

Hi @Jesse Y (deadpin),

would be ok to add a separate report at least. There has been a change to the gizmos that introduces these issues, we need to rethink if that implementation is mature enough. Can you mention this ticket/patch in your report.

@Jeroen Bakker (jbakker) thanks for looking into this.

While I wanted to avoid adding gizmo logic into gestures, in this case the chance of a feedback loop is too high.
This check to redraw has been moved to the tweak operator - limiting the tag for when it's needed.

rB830aa758b40bea7b40116049a3535103337a3003

Other solution got committed, so closing this one.