您需要 登录 才可以下载或查看,没有账号?注册
x
本帖最后由 秋令6689 于 2022-5-25 16:19 编辑
开源网址:https://github.com/Radivarig/UvSquares
UV Squares AddonThis hugely popular addon for the UV Editor reshapes UV selections into a grid. It respects vertical and horizontal face ratios and can stretch out any selection shape. No more manual alignment of a distorted UV Blender’s UV unwrap is far from perfect. Quite often, you end up with a distorted shape of your object and have to clean it up. This takes time and effort as you select all the vertices and re-align them via the appropriate axis, repeating this endlessly. What if you could do it with a single button push? That is what UV Squares is all about. How does it work? The process is simple and quick. Once you have unwrapped your object, the UV Square addon will turn your UV into a perfect, clean shape, respecting the geometry of your object. The distortion is gone and you are good to go! UV Squares at a glance: - Reshape any selected UV faces (quads) to a grid of equivalent squares, or by their shape
- Align sequenced vertices on an axis and make them equally distanced
- Rip faces and single vertex
- Join selected vertices to any closest unselected vertices
Why was UV Squares created?“I was working on a model and was very satisfied with the final geometry. The last thing I needed to make it complete was a proper UV unwrap so it would fit the textures nicely. The problem was that I haven’t unwrapped and the bend (and other modifiers) were applied. I was experimenting with available unwrapping techniques but they didn’t quite work for me, I wanted to be able to simply select one part and stretch it out to a precise grid.” Reslav Hollós, UV Squares creator Features- Reshape selected UV faces (quads) to grid of either:
- equivalent squares (each square area is the same)
- or by respect to shape of an active quad (area of rectangles can differ but they fit into straight lines)
- convert multiple islands at once (select more than one separate UV chunk)
- Align sequenced vertices on an axis (X or Y axis is determined by slope automatically):
- make them equally distanced
- Rip faces (deselect vertices from unselected faces, as if there were seams)
- Join selected vertices to any closest unselected vertices
- Select single vertex and snap 2d cursor to it
Shortcuts- grid/aligning is Alt + E
- Rip faces is Alt + V
- Join vertices is Shift + Alt + V
NotesAligning to axis - All vertices have to be ordered/sequenced by x/y value depending of X/Y axis that they are getting aligned to. Otherwise you will have swapped vertices in the result.
- What script does here:
- set pivot to cursor (sets it back after)
- 2d cursor will snap to closest vertex and the alignment will be made at that verts x/y value, depending on the axis
- restrict scale to axis (recognize X or Y by the slope)
- scale to 0 to where the cursor has snapped
Reshaping to grid - Works on any UV selection shape of quad faces
- You can specify an active quad by making it the last selected face. If not, one face will automatically be taken
- 2d cursor is snapped to closest corner and is determining the direction for calculating the length of start and end of grid as well as length of one unit for square grid
Rip faces - Rip/separate any selected faces
- Rip single vertex
Join vertices - Snaps selected vertices to closest non selected
- For faces, if you want to connect islands back to their original place - use stitch (shortcut: V, while stitching press I to toggle island)
Development - When bumping versions increment both bl_info objects, one in __init__.py which is used for .zip install, and another in the main uv_squares.py file.
|