[Bf-blender-cvs] [0fa3a00f340] blenloader-api: cleanup naming

Jacques Lucke noreply at git.blender.org
Sat Mar 7 19:09:28 CET 2020


Commit: 0fa3a00f3408b02920ab3a0ea005536228c3ab9c
Author: Jacques Lucke
Date:   Sat Mar 7 18:27:28 2020 +0100
Branches: blenloader-api
https://developer.blender.org/rB0fa3a00f3408b02920ab3a0ea005536228c3ab9c

cleanup naming

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

M	source/blender/blenloader/BLO_callback_api.h
M	source/blender/modifiers/intern/MOD_correctivesmooth.c
M	source/blender/modifiers/intern/MOD_hook.c
M	source/blender/modifiers/intern/MOD_meshdeform.c
M	source/blender/modifiers/intern/MOD_surfacedeform.c

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

diff --git a/source/blender/blenloader/BLO_callback_api.h b/source/blender/blenloader/BLO_callback_api.h
index 18f4e70e56b..3889e7088ed 100644
--- a/source/blender/blenloader/BLO_callback_api.h
+++ b/source/blender/blenloader/BLO_callback_api.h
@@ -56,14 +56,14 @@ void BLO_read_list(BloReader *reader, struct ListBase *list, BloLinkListFn callb
     BLI_endian_switch_##type_name##_array((void *)ptr, array_size); \
   }
 
-#define BLO_read_array_int32(reader, ptr, array_size) \
+#define BLO_read_int32_array(reader, ptr, array_size) \
   BLO_read_array_endian_corrected(reader, int32, ptr, array_size)
-#define BLO_read_array_uint32(reader, ptr, array_size) \
+#define BLO_read_uint32_array(reader, ptr, array_size) \
   BLO_read_array_endian_corrected(reader, uint32, ptr, array_size)
-#define BLO_read_array_float(reader, ptr, array_size) \
+#define BLO_read_float_array(reader, ptr, array_size) \
   BLO_read_array_endian_corrected(reader, float, ptr, array_size)
-#define BLO_read_array_float3(reader, ptr, array_size) \
-  BLO_read_array_float(reader, ptr, 3 * (int)(array_size))
+#define BLO_read_float3_array(reader, ptr, array_size) \
+  BLO_read_float_array(reader, ptr, 3 * (int)(array_size))
 
 #ifdef __cplusplus
 }
diff --git a/source/blender/modifiers/intern/MOD_correctivesmooth.c b/source/blender/modifiers/intern/MOD_correctivesmooth.c
index 99ffaec4ca3..23c2b712425 100644
--- a/source/blender/modifiers/intern/MOD_correctivesmooth.c
+++ b/source/blender/modifiers/intern/MOD_correctivesmooth.c
@@ -130,7 +130,7 @@ static void bloRead(BloReader *reader, ModifierData *md)
   CorrectiveSmoothModifierData *csmd = (CorrectiveSmoothModifierData *)md;
 
   if (csmd->bind_coords) {
-    BLO_read_array_float3(reader, csmd->bind_coords, csmd->bind_coords_num);
+    BLO_read_float3_array(reader, csmd->bind_coords, csmd->bind_coords_num);
   }
 
   /* runtime only */
diff --git a/source/blender/modifiers/intern/MOD_hook.c b/source/blender/modifiers/intern/MOD_hook.c
index 18b1327d956..fab48e7d9cf 100644
--- a/source/blender/modifiers/intern/MOD_hook.c
+++ b/source/blender/modifiers/intern/MOD_hook.c
@@ -138,7 +138,7 @@ static void bloWrite(BloWriter *writer, const ModifierData *md)
 static void bloRead(BloReader *reader, ModifierData *md)
 {
   HookModifierData *hmd = (HookModifierData *)md;
-  BLO_read_array_int32(reader, hmd->indexar, hmd->totindex);
+  BLO_read_int32_array(reader, hmd->indexar, hmd->totindex);
 
   BLO_read_update_address(reader, hmd->curfalloff);
   if (hmd->curfalloff) {
diff --git a/source/blender/modifiers/intern/MOD_meshdeform.c b/source/blender/modifiers/intern/MOD_meshdeform.c
index c86470d1a24..9ef35697123 100644
--- a/source/blender/modifiers/intern/MOD_meshdeform.c
+++ b/source/blender/modifiers/intern/MOD_meshdeform.c
@@ -184,15 +184,15 @@ static void bloRead(BloReader *reader, ModifierData *md)
   MeshDeformModifierData *mmd = (MeshDeformModifierData *)md;
 
   BLO_read_update_address(reader, mmd->bindinfluences);
-  BLO_read_array_int32(reader, mmd->bindoffsets, mmd->totvert + 1);
-  BLO_read_array_float3(reader, mmd->bindcagecos, mmd->totcagevert);
+  BLO_read_int32_array(reader, mmd->bindoffsets, mmd->totvert + 1);
+  BLO_read_float3_array(reader, mmd->bindcagecos, mmd->totcagevert);
 
   BLO_read_update_address(reader, mmd->dyngrid);
   BLO_read_update_address(reader, mmd->dyninfluences);
-  BLO_read_array_int32(reader, mmd->dynverts, mmd->totvert);
+  BLO_read_int32_array(reader, mmd->dynverts, mmd->totvert);
 
-  BLO_read_array_float(reader, mmd->bindweights, mmd->totvert);
-  BLO_read_array_float3(reader, mmd->bindcos, mmd->totcagevert);
+  BLO_read_float_array(reader, mmd->bindweights, mmd->totvert);
+  BLO_read_float3_array(reader, mmd->bindcos, mmd->totcagevert);
 }
 
 static float meshdeform_dynamic_bind(MeshDeformModifierData *mmd, float (*dco)[3], float vec[3])
diff --git a/source/blender/modifiers/intern/MOD_surfacedeform.c b/source/blender/modifiers/intern/MOD_surfacedeform.c
index 699a08bc89a..d912359571f 100644
--- a/source/blender/modifiers/intern/MOD_surfacedeform.c
+++ b/source/blender/modifiers/intern/MOD_surfacedeform.c
@@ -217,13 +217,13 @@ static void bloWrite(BloWriter *writer, const ModifierData *md)
       if (smd->verts[i].binds) {
         for (int j = 0; j < smd->verts[i].numbinds; j++) {
           SDefBind *bind = &smd->verts[i].binds[j];
-          BLO_write_int32_array(writer, bind->numverts, bind->vert_inds);
+          BLO_write_uint32_array(writer, (int)bind->numverts, bind->vert_inds);
 
           if (ELEM(bind->mode, MOD_SDEF_MODE_CENTROID, MOD_SDEF_MODE_LOOPTRI)) {
             BLO_write_float3_array(writer, 1, bind->vert_weights);
           }
           else {
-            BLO_write_float_array(writer, bind->numverts, bind->vert_weights);
+            BLO_write_float_array(writer, (int)bind->numverts, bind->vert_weights);
           }
         }
       }
@@ -243,13 +243,13 @@ static void bloRead(BloReader *reader, ModifierData *md)
       if (smd->verts[i].binds) {
         for (int j = 0; j < smd->verts[i].numbinds; j++) {
           SDefBind *bind = &smd->verts[i].binds[j];
-          BLO_read_array_uint32(reader, bind->vert_inds, bind->numverts);
+          BLO_read_uint32_array(reader, bind->vert_inds, bind->numverts);
 
           if (ELEM(bind->mode, MOD_SDEF_MODE_CENTROID, MOD_SDEF_MODE_LOOPTRI)) {
-            BLO_read_array_float3(reader, bind->vert_weights, 1);
+            BLO_read_float3_array(reader, bind->vert_weights, 1);
           }
           else {
-            BLO_read_array_float(reader, bind->vert_weights, bind->numverts);
+            BLO_read_float_array(reader, bind->vert_weights, bind->numverts);
           }
         }
       }



More information about the Bf-blender-cvs mailing list