[Bf-blender-cvs] [650e3ccc2da] refactor-mesh-uv-map-generic: Cleanup: run make format.

Martijn Versteegh noreply at git.blender.org
Wed Oct 12 11:37:17 CEST 2022


Commit: 650e3ccc2daac35cffc665cc0f161986605a3f6d
Author: Martijn Versteegh
Date:   Wed Oct 12 11:36:09 2022 +0200
Branches: refactor-mesh-uv-map-generic
https://developer.blender.org/rB650e3ccc2daac35cffc665cc0f161986605a3f6d

Cleanup: run make format.

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

M	source/blender/blenkernel/BKE_attribute.h
M	source/blender/blenkernel/BKE_mesh_legacy_convert.h
M	source/blender/blenkernel/BKE_mesh_tangent.h
M	source/blender/blenkernel/intern/customdata.cc
M	source/blender/blenkernel/intern/mesh.cc
M	source/blender/blenkernel/intern/mesh_legacy_convert.cc
M	source/blender/bmesh/intern/bmesh_interp.c
M	source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc
M	source/blender/modifiers/intern/MOD_uvproject.cc
M	source/blender/modifiers/intern/MOD_uvwarp.cc

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

diff --git a/source/blender/blenkernel/BKE_attribute.h b/source/blender/blenkernel/BKE_attribute.h
index cc25bc3b897..b5d880bdc07 100644
--- a/source/blender/blenkernel/BKE_attribute.h
+++ b/source/blender/blenkernel/BKE_attribute.h
@@ -141,7 +141,6 @@ struct CustomDataLayer *BKE_id_attributes_color_find(const struct ID *id, const
 
 bool BKE_id_attribute_calc_unique_name(struct ID *id, const char *name, char *outname);
 
-
 inline char const *get_uv_map_vert_selection_name(char const *uv_map_name, char *buffer)
 {
   size_t len = strlen(uv_map_name);
@@ -178,7 +177,6 @@ inline char const *get_uv_map_pin_name(char const *uv_map_name, char *buffer)
   return buffer;
 }
 
-
 #ifdef __cplusplus
 }
 #endif
diff --git a/source/blender/blenkernel/BKE_mesh_legacy_convert.h b/source/blender/blenkernel/BKE_mesh_legacy_convert.h
index 1cd15e66567..8f6f79545cf 100644
--- a/source/blender/blenkernel/BKE_mesh_legacy_convert.h
+++ b/source/blender/blenkernel/BKE_mesh_legacy_convert.h
@@ -12,8 +12,8 @@
 #ifdef __cplusplus
 #  include "BLI_array.hh"
 #  include "BLI_resource_scope.hh"
-#  include "BLI_vector.hh"
 #  include "BLI_span.hh"
+#  include "BLI_vector.hh"
 #  include "DNA_customdata_types.h"
 #endif
 
diff --git a/source/blender/blenkernel/BKE_mesh_tangent.h b/source/blender/blenkernel/BKE_mesh_tangent.h
index d46f2dce692..28c54ccbc02 100644
--- a/source/blender/blenkernel/BKE_mesh_tangent.h
+++ b/source/blender/blenkernel/BKE_mesh_tangent.h
@@ -79,17 +79,18 @@ void BKE_mesh_add_loop_tangent_named_layer_for_uv(struct CustomData *uv_data,
  * Also, we calculate tangent_mask that works as a descriptor of tangents state.
  * If tangent_mask has changed, then recalculate tangents.
  */
-void BKE_mesh_calc_loop_tangent_step_0(const struct CustomData *loopData,
-                                       bool calc_active_tangent,
-                                       const char (*tangent_names)[68 /* MAX_CUSTOMDATA_LAYER_NAME */],
-                                       int tangent_names_count,
-                                       bool *rcalc_act,
-                                       bool *rcalc_ren,
-                                       int *ract_uv_n,
-                                       int *rren_uv_n,
-                                       char *ract_uv_name,
-                                       char *rren_uv_name,
-                                       short *rtangent_mask);
+void BKE_mesh_calc_loop_tangent_step_0(
+    const struct CustomData *loopData,
+    bool calc_active_tangent,
+    const char (*tangent_names)[68 /* MAX_CUSTOMDATA_LAYER_NAME */],
+    int tangent_names_count,
+    bool *rcalc_act,
+    bool *rcalc_ren,
+    int *ract_uv_n,
+    int *rren_uv_n,
+    char *ract_uv_name,
+    char *rren_uv_name,
+    short *rtangent_mask);
 
 #ifdef __cplusplus
 }
diff --git a/source/blender/blenkernel/intern/customdata.cc b/source/blender/blenkernel/intern/customdata.cc
index 7c5570b7713..582414dddd7 100644
--- a/source/blender/blenkernel/intern/customdata.cc
+++ b/source/blender/blenkernel/intern/customdata.cc
@@ -3529,7 +3529,7 @@ bool CustomData_set_layer_name(CustomData *data, const int type, const int n, co
 const char *CustomData_get_layer_name(const CustomData *data, const int type, const int n)
 {
   const int layer_index = CustomData_get_layer_index_n(data, type, n);
-  
+
   return (layer_index == -1) ? nullptr : data->layers[layer_index].name;
 }
 
diff --git a/source/blender/blenkernel/intern/mesh.cc b/source/blender/blenkernel/intern/mesh.cc
index bf5fbc8f108..072451bc621 100644
--- a/source/blender/blenkernel/intern/mesh.cc
+++ b/source/blender/blenkernel/intern/mesh.cc
@@ -512,7 +512,8 @@ static int customdata_compare(
   }
 
   if (layer_count1 != layer_count2) {
-    /* TODO(@HooglyBoogly): Re-enable after tests are updated for material index refactor and UV as generic attribute refactor. */
+    /* TODO(@HooglyBoogly): Re-enable after tests are updated for material index refactor and UV as
+     * generic attribute refactor. */
     // return MESHCMP_CDLAYERS_MISMATCH;
   }
 
diff --git a/source/blender/blenkernel/intern/mesh_legacy_convert.cc b/source/blender/blenkernel/intern/mesh_legacy_convert.cc
index 9e3b336a8ad..856f4d07049 100644
--- a/source/blender/blenkernel/intern/mesh_legacy_convert.cc
+++ b/source/blender/blenkernel/intern/mesh_legacy_convert.cc
@@ -1213,11 +1213,11 @@ void BKE_mesh_legacy_convert_uvs_to_struct(
     const Span<float2> coords{static_cast<const float2 *>(layer.data), mesh->totloop};
     CustomDataLayer mloopuv_layer = layer;
     mloopuv_layer.type = CD_MLOOPUV;
-    MutableSpan<MLoopUV> mloopuv = temp_mloopuv_for_convert. construct<Array<MLoopUV>>(
+    MutableSpan<MLoopUV> mloopuv = temp_mloopuv_for_convert.construct<Array<MLoopUV>>(
         mesh->totloop);
     mloopuv_layer.data = mloopuv.data();
 
-	char buffer[MAX_CUSTOMDATA_LAYER_NAME];
+    char buffer[MAX_CUSTOMDATA_LAYER_NAME];
     const VArray<bool> vert_selection = attributes.lookup_or_default<bool>(
         get_uv_map_vert_selection_name(layer.name, buffer), ATTR_DOMAIN_CORNER, false);
     const VArray<bool> edge_selection = attributes.lookup_or_default<bool>(
@@ -1349,7 +1349,6 @@ void BKE_mesh_legacy_convert_uvs_to_generic(Mesh *mesh)
       &mesh->ldata,
       CD_PROP_FLOAT2,
       CustomData_get_named_layer_index(&mesh->ldata, CD_PROP_FLOAT2, default_uv.c_str()));
-
 }
 
 /** \name Selection Attribute and Legacy Flag Conversion
diff --git a/source/blender/bmesh/intern/bmesh_interp.c b/source/blender/bmesh/intern/bmesh_interp.c
index 724845f1079..0c13e6d892b 100644
--- a/source/blender/bmesh/intern/bmesh_interp.c
+++ b/source/blender/bmesh/intern/bmesh_interp.c
@@ -884,19 +884,22 @@ void BM_data_layer_ensure_named(BMesh *bm, CustomData *data, int type, const cha
 void BM_uv_map_ensure_vert_selection_attribute(BMesh *bm, const char *uv_map_name)
 {
   char name[MAX_CUSTOMDATA_LAYER_NAME];
-  BM_data_layer_ensure_named(bm, &bm->ldata, CD_PROP_FLOAT2, get_uv_map_vert_selection_name(uv_map_name, name));
+  BM_data_layer_ensure_named(
+      bm, &bm->ldata, CD_PROP_FLOAT2, get_uv_map_vert_selection_name(uv_map_name, name));
 }
 
 void BM_uv_map_ensure_edge_selection_attribute(BMesh *bm, const char *uv_map_name)
 {
   char name[MAX_CUSTOMDATA_LAYER_NAME];
-  BM_data_layer_ensure_named(bm, &bm->ldata, CD_PROP_FLOAT2, get_uv_map_edge_selection_name(uv_map_name, name));
+  BM_data_layer_ensure_named(
+      bm, &bm->ldata, CD_PROP_FLOAT2, get_uv_map_edge_selection_name(uv_map_name, name));
 }
 
 void BM_uv_map_ensure_pin_attribute(BMesh *bm, const char *uv_map_name)
 {
   char name[MAX_CUSTOMDATA_LAYER_NAME];
-  BM_data_layer_ensure_named(bm, &bm->ldata, CD_PROP_FLOAT2, get_uv_map_pin_name(uv_map_name, name));
+  BM_data_layer_ensure_named(
+      bm, &bm->ldata, CD_PROP_FLOAT2, get_uv_map_pin_name(uv_map_name, name));
 }
 
 void BM_data_layer_free(BMesh *bm, CustomData *data, int type)
diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc b/source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc
index ba3be5ca2f1..324dca3a785 100644
--- a/source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc
+++ b/source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc
@@ -306,16 +306,16 @@ void OBJMesh::store_uv_coords_and_indices()
   const float limit[2] = {STD_UV_CONNECT_LIMIT, STD_UV_CONNECT_LIMIT};
 
   UvVertMap *uv_vert_map = BKE_mesh_uv_vert_map_create(
-                                                       polys.data(),
-                                                       nullptr,
-                                                       nullptr,
-                                                       loops.data(),
-                                                       reinterpret_cast<const float(*)[2]>(uv_map.data()),
-                                                       polys.size(),
-                                                       totvert,
-                                                       limit,
-                                                       false,
-                                                       false);
+      polys.data(),
+      nullptr,
+      nullptr,
+      loops.data(),
+      reinterpret_cast<const float(*)[2]>(uv_map.data()),
+      polys.size(),
+      totvert,
+      limit,
+      false,
+      false);
 
   uv_indices_.resize(polys.size());
   /* At least total vertices of a mesh will be present in its texture map. So
diff --git a/source/blender/modifiers/intern/MOD_uvproject.cc b/source/blender/modifiers/intern/MOD_uvproject.cc
index a6d273c9c67..f707ac6834c 100644
--- a/source/blender/modifiers/intern/MOD_uvproject.cc
+++ b/source/blender/modifiers/intern/MOD_uvproject.cc
@@ -185,7 +185,7 @@ static Mesh *uvprojectModifier_do(UVProjectModifierData *umd,
   loops_num = mesh->totloop;
 
   /* make sure we are not modifying the original UV map */
-  float(*mloop_uv)[2] = static_cast<float (*)[2]>(CustomData_duplicate_referenced_layer_named(
+  float(*mloop_uv)[2] = static_cast<float(*)[2]>(CustomData_duplicate_referenced_layer_named(
       &mesh->ldata, CD_PROP_FLOAT2, uvname, loops_num));
 
   coords = BKE_mesh_vert_coords_alloc(mesh, &verts_num);
diff --git a/source/blender/modifiers/intern/MOD_uvwarp.cc b/source/blender/modifiers/intern/MOD_uvwarp.cc
index 2b70b51970e..35052541b72 100644
--- a/source/blender/modifiers/intern/MOD_uvwarp.cc
+++ b/source/blender/modifiers/intern/MOD_uvwarp.cc
@@ -198,7 +198,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
   loops_num = mesh->totloop;
 
   /* make sure we are not modifying the original UV map */
-  float (*mloopuv)[2] = static_cast<float (*)[2]>(CustomData_duplicate_referenced_layer_named(
+  float(*mloopuv)[2] = static_cast<float(*)[2]>(CustomData_duplicate_referenced_layer_named(
       &mesh->ldata, CD_PROP_FLOAT2, uvname, loops_num));
   MOD_get_vgroup(ctx->object, mesh, umd->vgroup_name, &dvert, &defgrp_index);



More information about the Bf-blender-cvs mailing list