Page MenuHome

Fix T97049: Auto-keyframing warning message shows on top of navigator
Needs ReviewPublic

Authored by Abhinav Chennubhotla (PhoenixFlame101) on Apr 10 2022, 7:35 PM.

Details

Summary

Fix T97049: Auto-keyframing warning message shows on top of navigator

Fix by shifting message to left by length equal to size of gizmo.

Before:

After:

Diff Detail

Repository
rB Blender
Branch
T97049-fix (branched from master)
Build Status
Buildable 21567
Build 21567: arc lint + arc unit

Event Timeline

Hi, thanks for the patch. Change looks good to me.
Someone from UI team need to review this patch. Maybe @Harley Acheson (harley) ?

With patch applied, If you change Preferences / Interface/ Resolution Scale to 2X you see this:

So just needs to have U.gizmo_size_navigate_v3d scaled by U.dpi_fac most likely (not tested).

But note that if you leave Resolution Scale at 1X, but change Preferences / Viewport / Display / 3D Viewport Axis Size to 160 you get this:

So the position calculation might need a bit of thought and testing to ensure either or both can be changed.

Fix by shifting message to left by length equal to size of gizmo.
Size of gizmo depends on mini axis type, so added check for that.
Multiply offset value by dpi_fac so it works on different resolution
scales

TODO:

  • Get correct offset value for USER_MINI_AXIS_TYPE_MINIMAL
  • Fix value of printable_size changing with gizmo size

Reviewers:
harley

The problem here seems to be that printable_size (the size of the text it seems) is changing with the size of the gizmo. At size 80, printable_size[0] is 87 and at size 200, it is 235. Even the y value is changing, as you can see the record icon is slightly below the text.

I couldn't find a solution for this issue after digging through the source code for a while, so maybe the right course of action is to open up another bug report and discuss there?

The offset value for USER_MINI_AXIS_TYPE_MINIMAL also seems to be missing from UserDef attributes. In release/scripts/startup/bl_ui/space_userpref.py mini_axis_size is mentioned but I could only find it in an rna file, not as an attribute. Any help with this? I put in gizmo_size_navigate_v3d as a placeholder so it's at least somewhat functional.

Also the offset value for USER_MINI_AXIS_TYPE_NONE is set to 25, since that seems to be a value that works and the text doesn't overlap with the zoom and pan buttons.