Page MenuHome

Fix T61286: Viewport grid units not visible
ClosedPublic

Authored by Germano Cavalcante (mano-wii) on Feb 8 2019, 4:15 PM.

Details

Summary

The original code was commented on.
Unlike blender 2.79, the grid units are now displayed only when RV3D_VIEW_IS_AXIS.
The visible subdivisions in the grid are made by the GPU and depending on the pixel.
The code used here only mimics this behavior and adds a bit of overhead.

Diff Detail

Repository
rB Blender

Event Timeline

Harbormaster completed remote builds in B2861: Diff 13560.
Campbell Barton (campbellbarton) requested changes to this revision.Feb 11 2019, 6:26 AM

This ignores unit scale - which should be easy to fix.

However I'm not sure this is a good approach
it's not working well especially for Imperial.

See screenshot

This revision now requires changes to proceed.Feb 11 2019, 6:26 AM

After analyzing I realized that the grid drawing and the unit levels in the imperial system (buImperialLenDef) doesn't match.
The drawing of the grid highlights 10 in 10. It's as if the units are:

"0.01 foot"
"0.1 foot"
"foot"
"10 feet"
...

I think it is important to resolve the drawing issue first :\

  • Use unit_scale to get a smooth transition between base_unit and drawing.

But this does not fix the problem of the units that are displayed.

What is the status of this patch? People in devtalk are getting a little frustrated that this hasn’t been fixed.(not me)

I believe that at the current stage (close to the 2.80 release), this patch will have to be postponed to 2.81 :\
But it's always good to give a nudge (as you did) so this patch is not forgotten ;)

Yes, this is really missed here. Hope it gets back in soon. Having to ruler everything just to see scale is a pain.

  • Update to match master

This ignores unit scale - which should be easy to fix.
However I'm not sure this is a good approach
it's not working well especially for Imperial.
See screenshot

I didn't understand the unit scale issue but I believe that both this and the other problem mentioned were fixed.

  • Fix crash with no grid unit
This revision is now accepted and ready to land.Aug 20 2019, 2:18 PM