[Bf-blender-cvs] [0d743e8498e] temp-T97352-3d-texturing-seam-bleeding-b2: Removed unused code.

Jeroen Bakker noreply at git.blender.org
Mon Jun 20 12:44:28 CEST 2022


Commit: 0d743e8498eb56b36c7368b1171437a93304ddea
Author: Jeroen Bakker
Date:   Mon Jun 20 12:44:04 2022 +0200
Branches: temp-T97352-3d-texturing-seam-bleeding-b2
https://developer.blender.org/rB0d743e8498eb56b36c7368b1171437a93304ddea

Removed unused code.

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

M	source/blender/blenkernel/BKE_uv_islands.hh
M	source/blender/blenkernel/intern/uv_islands.cc

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

diff --git a/source/blender/blenkernel/BKE_uv_islands.hh b/source/blender/blenkernel/BKE_uv_islands.hh
index 4e1d5965876..432240fecf6 100644
--- a/source/blender/blenkernel/BKE_uv_islands.hh
+++ b/source/blender/blenkernel/BKE_uv_islands.hh
@@ -26,7 +26,7 @@ namespace blender::bke::uv_islands {
  * algorithm makes decisions.
  */
 //#define DEBUG_SVG
-// #define VALIDATE
+//#define VALIDATE
 
 struct UVIslands;
 struct UVIslandsMask;
@@ -734,6 +734,7 @@ struct UVIsland {
 #endif
 };
 
+#ifdef DEBUG_SVG
 /* Debug functions to export to a SVG file. */
 void svg_header(std::ostream &ss);
 void svg(std::ostream &ss, const UVIsland &islands, int step, int64_t first_new_prim_index);
@@ -743,6 +744,7 @@ void svg(std::ostream &ss, const UVPrimitive &primitive, int step);
 void svg(std::ostream &ss, const UVIslandsMask &mask, int step);
 void svg(std::ostream &ss, const UVBorder &border, int step);
 void svg_footer(std::ostream &ss);
+#endif
 
 struct UVIslands {
   Vector<UVIsland> islands;
@@ -947,41 +949,6 @@ struct UVIslandsMask {
   }
 
   void dilate(int max_iterations);
-
-  void print() const
-  {
-    int offset = 0;
-    for (int y = 0; y < resolution.y; y++) {
-      for (int x = 0; x < resolution.x; x++) {
-        uint16_t value = mask[offset++];
-        if (value == 0xffff) {
-          printf(" ");
-        }
-        else if (value == 0) {
-          printf("0");
-        }
-        else if (value == 1) {
-          printf("1");
-        }
-        else if (value == 2) {
-          printf("2");
-        }
-        else if (value == 3) {
-          printf("3");
-        }
-        else if (value == 4) {
-          printf("4");
-        }
-        else if (value == 5) {
-          printf("5");
-        }
-        else if (value == 6) {
-          printf("6");
-        }
-      }
-      printf("\n");
-    }
-  }
 };
 
 }  // namespace blender::bke::uv_islands
diff --git a/source/blender/blenkernel/intern/uv_islands.cc b/source/blender/blenkernel/intern/uv_islands.cc
index 731ad75c713..d3d31ecaa03 100644
--- a/source/blender/blenkernel/intern/uv_islands.cc
+++ b/source/blender/blenkernel/intern/uv_islands.cc
@@ -807,6 +807,7 @@ bool UVIslandsMask::is_masked(const short island_index, const float2 uv) const
 
 /** \} */
 
+#ifdef DEBUG_SVG
 /* -------------------------------------------------------------------- */
 /** \name SVG export
  *
@@ -998,7 +999,7 @@ void svg(std::ostream &ss, const UVPrimitive &primitive)
     svg_coords(ss, edge.get_uv_vertex(0)->uv);
   }
   ss << "\"/>\n";
-#if 0
+#  if 0
 
   float2 center(0.0, 0.0);
   for (const UVBorderEdge &edge : border.edges) {
@@ -1018,7 +1019,7 @@ void svg(std::ostream &ss, const UVPrimitive &primitive)
     ss << edge.get_uv_vertex(0)->vertex->v;
     ss << "</text>\n";
   }
-#endif
+#  endif
 }
 
 void svg(std::ostream &ss, const UVPrimitive &primitive, int step)
@@ -1055,5 +1056,6 @@ void svg(std::ostream &ss, const UVBorder &border, int step)
 }
 
 /** \} */
+#endif
 
 }  // namespace blender::bke::uv_islands



More information about the Bf-blender-cvs mailing list