[Bf-blender-cvs] [250f174ce3d] refactor-mesh-uv-map-generic: Fix build errors

Hans Goudey noreply at git.blender.org
Wed Aug 31 06:50:17 CEST 2022


Commit: 250f174ce3de776faa9940a1e68542199d26378a
Author: Hans Goudey
Date:   Tue Aug 30 23:50:10 2022 -0500
Branches: refactor-mesh-uv-map-generic
https://developer.blender.org/rB250f174ce3de776faa9940a1e68542199d26378a

Fix build errors

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

M	source/blender/blenkernel/BKE_attribute.h
M	source/blender/editors/mesh/mesh_data.cc
M	source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp

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

diff --git a/source/blender/blenkernel/BKE_attribute.h b/source/blender/blenkernel/BKE_attribute.h
index 6d089bf0215..13eefd27bec 100644
--- a/source/blender/blenkernel/BKE_attribute.h
+++ b/source/blender/blenkernel/BKE_attribute.h
@@ -20,7 +20,6 @@ struct CustomData;
 struct CustomDataLayer;
 struct ID;
 struct ReportList;
-struct Mesh;
 
 /** #Attribute.domain */
 typedef enum eAttrDomain {
diff --git a/source/blender/editors/mesh/mesh_data.cc b/source/blender/editors/mesh/mesh_data.cc
index f80d6cda928..1de4518da8f 100644
--- a/source/blender/editors/mesh/mesh_data.cc
+++ b/source/blender/editors/mesh/mesh_data.cc
@@ -318,7 +318,7 @@ static bool *ensure_corner_boolean_attribute(Mesh &mesh, const blender::StringRe
       &mesh.ldata, CD_PROP_BOOL, name.c_str(), mesh.totloop));
   if (!data) {
     data = static_cast<bool *>(CustomData_add_layer_named(
-        &mesh.ldata, CD_PROP_BOOL, CD_CALLOC, nullptr, mesh.totpoly, name.c_str()));
+        &mesh.ldata, CD_PROP_BOOL, CD_SET_DEFAULT, nullptr, mesh.totpoly, name.c_str()));
   }
   return data;
 }
diff --git a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
index 32312377ec1..a6fec3b56b1 100644
--- a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
+++ b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
@@ -598,14 +598,14 @@ void BlenderStrokeRenderer::GenerateStrokeMesh(StrokeGroup *group, bool hasTex)
         &mesh->ldata, CD_PROP_FLOAT2, CD_SET_DEFAULT, nullptr, mesh->totloop, uvNames[0]);
     CustomData_set_layer_active(&mesh->ldata, CD_PROP_FLOAT2, 0);
     BKE_mesh_update_customdata_pointers(mesh, true);
-    loopsuv[0] = mesh->mloopuv;
+    loopsuv[0] = reinterpret_cast<blender::float2 *>(mesh->mloopuv);
 
     // Second UV layer
     CustomData_add_layer_named(
         &mesh->ldata, CD_PROP_FLOAT2, CD_SET_DEFAULT, nullptr, mesh->totloop, uvNames[1]);
     CustomData_set_layer_active(&mesh->ldata, CD_PROP_FLOAT2, 1);
     BKE_mesh_update_customdata_pointers(mesh, true);
-    loopsuv[1] = mesh->mloopuv;
+    loopsuv[1] = reinterpret_cast<blender::float2 *>(mesh->mloopuv);
   }
 
   // colors and transparency (the latter represented by grayscale colors)



More information about the Bf-blender-cvs mailing list