[Bf-blender-cvs] [6be9b26bec0] temp-T97352-3d-texturing-seam-bleeding-b2: Something was missing in previous commit. Half of the file was committed....

Jeroen Bakker noreply at git.blender.org
Tue Jul 5 13:10:02 CEST 2022


Commit: 6be9b26bec0790bd1979bb20e88abb0f23819c90
Author: Jeroen Bakker
Date:   Tue Jul 5 13:09:49 2022 +0200
Branches: temp-T97352-3d-texturing-seam-bleeding-b2
https://developer.blender.org/rB6be9b26bec0790bd1979bb20e88abb0f23819c90

Something was missing in previous commit. Half of the file was committed....

===================================================================

M	source/blender/blenkernel/BKE_uv_islands.hh

===================================================================

diff --git a/source/blender/blenkernel/BKE_uv_islands.hh b/source/blender/blenkernel/BKE_uv_islands.hh
index c60f1e08c90..295f5f25a04 100644
--- a/source/blender/blenkernel/BKE_uv_islands.hh
+++ b/source/blender/blenkernel/BKE_uv_islands.hh
@@ -699,12 +699,25 @@ struct UVIsland {
     return result;
   }
 
+  UVEdge *lookup (const UVEdge&edge) {
+    UVVertex * found_vertex = lookup(*edge.vertices[0]);
+    if (found_vertex == nullptr) {
+      return nullptr;
+    }
+    for (UVEdge*e: found_vertex->uv_edges) {
+      UVVertex*other_vertex = e->get_other_uv_vertex(found_vertex->vertex);
+      if (other_vertex->vertex == edge.vertices[1]->vertex && other_vertex->uv == edge.vertices[1]->uv) {
+        return e;
+      }
+    }
+    return nullptr;
+  }
+
   UVEdge *lookup_or_create(const UVEdge &edge)
   {
-    for (UVEdge &uv_edge : uv_edges) {
-      if (uv_edge.has_same_uv_vertices(edge)) {
-        return &uv_edge;
-      }
+    UVEdge *found_edge = lookup(edge);
+    if (found_edge != nullptr) {
+      return found_edge;
     }
 
     uv_edges.append(edge);



More information about the Bf-blender-cvs mailing list