Scripts icon indicating copy to clipboard operation
Scripts copied to clipboard

Preserve UVs

Open 80kg-spb opened this issue 1 year ago • 4 comments

Will an option similar to "Preserve UVs" in Maya be added? Currently, distortions appear on the UVs when using the tool.

80kg-spb avatar Jan 09 '25 22:01 80kg-spb

I assume you're referring to the Merge Tool? (This repo has more than one add-on in it.)

Hmm, for vertex mode this is as simple as changing line 527 or 528(?) in __init.py__ to

bpy.ops.mesh.merge(type=self.merge_location, uvs=True)

if you want it always on.

For edge mode we use bmesh.ops.weld_verts which is a lower level function that doesn't immediately appear to have a preserve UVs function. Might need to look more into this, or rewrite the way we do edge merging.

MightyBOBcnc avatar Jan 09 '25 22:01 MightyBOBcnc

  • Added in 1.4.0
  • https://github.com/Stromberg90/Scripts/releases/download/v1.4.0/mesh_merge_tool.zip

MightyBOBcnc avatar Mar 23 '25 06:03 MightyBOBcnc

See comments on the code merge for 1.4.0. There appears to be a better way to handle UV preservation on island borders.

image

MightyBOBcnc avatar Mar 29 '25 20:03 MightyBOBcnc

I'm not sure if the underlying logic is accessible from the python API. Yay. The bmesh.ops merging operators and bpy.ops merge operator use rudimentary snap logic that isn't tied into the Correct Face Attributes code, and I can't even figure out where in the C code the Correct Face Attributes routines live.

MightyBOBcnc avatar Mar 30 '25 01:03 MightyBOBcnc