Page MenuHome

Transform: improve UV correction behavior on connected faces
AbandonedPublic

Authored by Germano Cavalcante (mano-wii) on Jul 13 2020, 2:12 PM.

Details

Summary

Part of T78671

The original code captures groups of loops to "merge".
This restores the initial state of some UVs.

The solution proposed in this patch is to skip this "merge" process for
all transform modes other than Edge/Vert Slide (where this code was
originally implemented).

This simplifies and greatly improves the code's performance.

Diff Detail

Repository
rB Blender
Branch
transform_customdata_uv_conected (branched from master)
Build Status
Buildable 9134
Build 9134: arc lint + arc unit

Event Timeline

Germano Cavalcante (mano-wii) requested review of this revision.Jul 13 2020, 2:12 PM
Germano Cavalcante (mano-wii) created this revision.
Germano Cavalcante (mano-wii) added a project: Restricted Project.Jul 13 2020, 2:15 PM

In general this seems fine, comments inline.

source/blender/editors/transform/transform_convert_mesh.c
1031–1032

Suggest to assign NULL in this case, so it's not left unset.

1033

l_num is used uninitialized here, re-ordering solves.

1131

It might be good to assign use_merge_loop_groups to TransCustomDataLayer, then we shouldn't need to assign it elsewhere.

1369

Why did this need to be removed?

This revision is now accepted and ready to land.Jul 21 2020, 11:01 AM

Some more testing, I'm not sure about removing groups by default.

It's good for extrude but breaks up contiguous UV's when making smaller adjustments to vertices.

Some options:

  • Only use this when extruding.
  • Detect cases where this should be used, don't use grouping with zero area faces for e.g.
  • Make this an option.
Germano Cavalcante (mano-wii) marked 4 inline comments as done.
  • Rebase Master
  • Fix errors
  • assign use_merge_loop_groups to TransCustomDataLayer

I am still thinking of a better solution for which cases this solution is indicated.

  • Fix slide operations not using group merge

Resolved in rB6a689b5047b2

source/blender/editors/transform/transform_convert_mesh.c
1369

Apparently, this condition is only for optimization (since these values are checked within the function).
This condition fails to pass vertices whose loops will be reprojected but are not defined in groups (to merge).
So it will ignore the CustomData correction code as groups are no longer needed.