Page MenuHome

UV Editor, additional Pixel snapping modes
ClosedPublic

Authored by Joep Peters (Joep) on Jan 1 2019, 12:22 PM.

Details

Summary

This revision adds functionality to choose either between corner, center or no pixel snapping while editing UVs. It replaces the current Snap to Pixels feature (which only snaps to corners) and makes the SI_PIXELSNAP flag deprecated.

Diff Detail

Repository
rB Blender

Event Timeline

Joep Peters (Joep) edited the summary of this revision. (Show Details)Jan 1 2019, 3:48 PM

The calculation of offset has to be done only once, moved it out of the for loop.

I'll commit with some tweaks.

This revision is now accepted and ready to land.Jan 22 2019, 5:03 PM
This revision was automatically updated to reflect the committed changes.

@Brecht Van Lommel (brecht) Thank you for your review! I'm super happy now! :)

Why would you want to snap to the center of a pixel?

Why would you want to snap to the center of a pixel?

I'm really glad to see this and from a game dev point of view its really useful with low res textures and allowing for floating point inaccuracy