blog. feed tags

Add keys to change Grid Scale in Blender

· blender, blender-tips, short

In Blender, sometimes it’s nice to be able to change the grid scale while modelling. There’s an input for that in the Viewport Overlays menu, but that can be hard to reach and slow to change. A much better solution is to add keybinds, and Blender makes this really easy!

Go to 3D View > 3D View (Global) key section, and add two entries. Use whatever keys you want (I’m using ; and ' to shrink and enlarge grid spacing, respectively), change the operator to wm.context_scale_float and the context attribute to area.spaces[0].overlay.grid_scale, change the Value of each to whatever step size you want, and voilà! Grid changes on the fly.

I’m using a step size of 0.5x and 2x, because I like Hammer. A word of warning, though: by default, the orthographic views actually choose a subdivision level from the scene’s unit system, which can take edits off-grid, in a way. To fix this you have to change the scene’s units to “None” instead of “Metric”, and then you can change the “Subdivisons”, per 3D view, to whatever step size you’ve chosen. Perspective and Camera views don’t do this (even if the camera is orthographic!)

And finally, I’ve added another key to reset the grid scale: Shift-;, using wm.context_set_float instead of ...scale_float and a Value of 1.0.