Page MenuHome

Blender 2.90 Tris to Quads breaks UVs even with Compare UVs checked.
Confirmed, NormalPublicBUG

Description

System Information
Operating system: Windows 10
Graphics card: Nvidia Geforce GTX 1050 Ti

Blender Version
Broken: 2.90
Worked: 2.83

Short description of error
"Compare UVs" option of Tris to Quads does not stop UV map from breaking after applying it.
Exact steps for others to reproduce the error
Press Space, then select Tris to Quads, check "Compare UVs" and you'll see that UV Map will break.
Blend file is attached.

Event Timeline

Germano Cavalcante (mano-wii) changed the task status from Needs Triage to Confirmed.Wed, Sep 9, 5:15 PM
Germano Cavalcante (mano-wii) changed the subtype of this task from "Report" to "Bug".
Germano Cavalcante (mano-wii) added projects: Modeling, Restricted Project.

I can confirm.
It seems that there is an error in the calculation of the final customdata offset.
This deserves to be investigated.

diff --git a/source/blender/bmesh/operators/bmo_join_triangles.c b/source/blender/bmesh/operators/bmo_join_triangles.c
index efb8b810581..dceb2c58625 100644
--- a/source/blender/bmesh/operators/bmo_join_triangles.c
+++ b/source/blender/bmesh/operators/bmo_join_triangles.c
@@ -166,7 +166,7 @@ static bool bm_edge_delimit_cdata(CustomData *ldata,
   r_delim_cd->cd_type = type;
   r_delim_cd->cd_size = CustomData_sizeof(r_delim_cd->cd_type);
   r_delim_cd->cd_offset = CustomData_get_n_offset(ldata, type, 0);
-  r_delim_cd->cd_offset_end = r_delim_cd->cd_size * layer_len;
+  r_delim_cd->cd_offset_end = r_delim_cd->cd_offset + r_delim_cd->cd_size * layer_len;
   return (r_delim_cd->cd_offset != -1);
 }