Page MenuHome

UV Editor: Grid and snapping improvements
ClosedPublic

Authored by Siddhartha Jejurkar (sidd017) on Sep 29 2021, 12:59 AM.

Details

Summary

Implements T89789, T89792, custom grid (described as dynamic grid in
T78389) and UV grid snapping (T78391)
Replaces the default UV editor grid with 2 new types of grid :

  • Custom grid: Allows the user to create an NxN grid, where the value of N is specified by the user.
  • Subdividing grid: Subdivides the UV editor grid when the user zooms in the viewport and vice versa when zooming out.

UV snapping improvements :

  • Increment snapping: Increment values for snapping are calculated based on which grid type is being used in the UV editor (subdividing or custom). In general the increment value is equal to the distance between 2 visible grid lines.
  • Absolute grid snap: New toggle added to increment snapping option in the UV editor, allows UV grid snapping during translation.

Diff Detail

Repository
rB Blender
Branch
UV-GRID-AND-SNAPPING (branched from master)
Build Status
Buildable 17402
Build 17402: arc lint + arc unit

Event Timeline

Siddhartha Jejurkar (sidd017) requested review of this revision.Sep 29 2021, 12:59 AM
Siddhartha Jejurkar (sidd017) created this revision.
  • Use define for grid size
  • Strip white-space.
  • Use separate flag for UV settings (to avoid confusion mixing in sequencer/node/uv-editor flags in the one value).
  • Use cleared flag for SI_DYNAMIC_GRID.
  • Use ELEM macro.
source/blender/draw/engines/overlay/overlay_grid.c
85โ€“86

This should be version patched, also, a default of 1 is odd since this removes all sub divisions within the image, maybe 10 would be better?

  • Version existing files.
  • Use name "Custom" instead of "Dynamic"
This revision is now accepted and ready to land.Sep 29 2021, 8:53 AM
  • Correct version patching logic