[Bf-blender-cvs] [c90331221c8] soc-2021-adaptive-cloth: msgpack: adaptive_cloth: Mesh Elements: packer implementation

ishbosamiya noreply at git.blender.org
Wed Aug 4 11:29:32 CEST 2021


Commit: c90331221c86fcaee471e73f46623ece17d425f9
Author: ishbosamiya
Date:   Mon Jul 26 23:58:54 2021 +0530
Branches: soc-2021-adaptive-cloth
https://developer.blender.org/rBc90331221c86fcaee471e73f46623ece17d425f9

msgpack: adaptive_cloth: Mesh Elements: packer implementation

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

M	source/blender/blenkernel/BKE_cloth_remesh.hh

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

diff --git a/source/blender/blenkernel/BKE_cloth_remesh.hh b/source/blender/blenkernel/BKE_cloth_remesh.hh
index 1563ac84a1d..3cfc21b4db4 100644
--- a/source/blender/blenkernel/BKE_cloth_remesh.hh
+++ b/source/blender/blenkernel/BKE_cloth_remesh.hh
@@ -74,11 +74,19 @@ Mesh *BKE_cloth_remesh(struct Object *ob, struct ClothModifierData *clmd, struct
 #  include <string>
 #  include <tuple>
 
+#  include "msgpack.hpp"
+#  include "msgpack/adaptor/define_decl.hpp"
+
 #  include "BLI_float2.hh"
+#  include "BLI_float2_msgpack.hh"
 #  include "BLI_float3.hh"
+#  include "BLI_float3_msgpack.hh"
 #  include "BLI_generational_arena.hh"
+#  include "BLI_generational_arena_msgpack.hh"
 #  include "BLI_map.hh"
+#  include "BLI_map_msgpack.hh"
 #  include "BLI_vector.hh"
+#  include "BLI_vector_msgpack.hh"
 
 /* Public C++ code */
 namespace blender::bke {
@@ -149,6 +157,8 @@ class EmptyExtraData {
   {
     return other;
   }
+
+  MSGPACK_DEFINE_ARRAY();
 };
 
 namespace ga = blender::generational_arena;
@@ -300,6 +310,8 @@ template<typename T> class Node {
     return stream;
   }
 
+  MSGPACK_DEFINE(self_index, verts, pos, normal, extra_data);
+
   template<typename, typename, typename, typename> friend class Mesh;
 };
 
@@ -387,6 +399,8 @@ template<typename T> class Vert {
     return stream;
   }
 
+  MSGPACK_DEFINE(self_index, edges, node, uv, extra_data);
+
   template<typename, typename, typename, typename> friend class Mesh;
 };
 
@@ -488,6 +502,8 @@ template<typename T> class Edge {
     return stream;
   }
 
+  MSGPACK_DEFINE(self_index, faces, verts, extra_data);
+
   template<typename, typename, typename, typename> friend class Mesh;
 };
 
@@ -600,6 +616,8 @@ template<typename T> class Face {
     return stream;
   }
 
+  MSGPACK_DEFINE(self_index, verts, normal, extra_data);
+
   template<typename, typename, typename, typename> friend class Mesh;
 };



More information about the Bf-blender-cvs mailing list