From bf0f1184192f8f18dc259a732d3186660558a8b0 Mon Sep 17 00:00:00 2001 From: ishbosamiya Date: Thu, 19 Aug 2021 17:32:58 +0530 Subject: adaptive_cloth: ClothNodeData: interp flags correctly --- source/blender/blenkernel/intern/cloth_remesh.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender') 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); -- cgit v1.2.3