[Bf-blender-cvs] [bf0f1184192] soc-2021-adaptive-cloth: adaptive_cloth: ClothNodeData: interp flags correctly

ishbosamiya noreply at git.blender.org
Sun Aug 22 17:23:40 CEST 2021


Commit: bf0f1184192f8f18dc259a732d3186660558a8b0
Author: ishbosamiya
Date:   Thu Aug 19 17:32:58 2021 +0530
Branches: soc-2021-adaptive-cloth
https://developer.blender.org/rBbf0f1184192f8f18dc259a732d3186660558a8b0

adaptive_cloth: ClothNodeData: interp flags correctly

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

M	source/blender/blenkernel/intern/cloth_remesh.cc

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

diff --git a/source/blender/blenkernel/intern/cloth_remesh.cc b/source/blender/blenkernel/intern/cloth_remesh.cc
index e76b51629e3..d1aeec382a8 100644
--- a/source/blender/blenkernel/intern/cloth_remesh.cc
+++ b/source/blender/blenkernel/intern/cloth_remesh.cc
@@ -136,8 +136,10 @@ class ClothNodeData {
     }
 
     ClothVertex cn;
-    /* TODO(ish): figure out how to handle the flags */
-    /* cn.flags; */
+    /* CLOTH_VERT_FLAG_PINNED should not be propagated so that the
+     * artist has the choice of pinning only verts that they want */
+    cn.flags |= (this->cloth_node_data.flags | other.cloth_node_data.flags) &
+                (CLOTH_VERT_FLAG_NOSELFCOLL | CLOTH_VERT_FLAG_NOOBJCOLL);
     interp_v3_v3v3(cn.v, this->cloth_node_data.v, other.cloth_node_data.v, 0.5);
     interp_v3_v3v3(cn.xconst, this->cloth_node_data.xconst, other.cloth_node_data.xconst, 0.5);
     interp_v3_v3v3(cn.x, this->cloth_node_data.x, other.cloth_node_data.x, 0.5);



More information about the Bf-blender-cvs mailing list