CurvesGeometry: Add initial vertex group support #106944

Merged
Falk David merged 24 commits from filedescriptor/blender:curves-deform-verts into main 2023-09-27 10:26:16 +02:00
2 changed files with 8 additions and 6 deletions
Showing only changes of commit a0454c26f3 - Show all commits

View File

@ -298,9 +298,9 @@ void BKE_defvert_extract_vgroup_to_faceweights(const struct MDeformVert *dvert,
float *r_weights);
namespace blender::bke {
VArray<float> varray_for_deform_verts(Span<MDeformVert> dverts, const int dvert_index);
VArray<float> varray_for_deform_verts(Span<MDeformVert> dverts, int defgroup_index);
filedescriptor marked this conversation as resolved Outdated
  • const int -> int
  • dvert_index -> defgroup_index/vgroup_index
- `const int` -> `int` - `dvert_index` -> `defgroup_index`/`vgroup_index`
VMutableArray<float> varray_for_mutable_deform_verts(MutableSpan<MDeformVert> dverts,
int dvert_index);
int defgroup_index);
} // namespace blender::bke
#endif

View File

@ -1758,13 +1758,15 @@ class VArrayImpl_For_VertexWeights final : public VMutableArrayImpl<float> {
}
};
VArray<float> varray_for_deform_verts(Span<MDeformVert> dverts, const int dvert_index)
VArray<float> varray_for_deform_verts(Span<MDeformVert> dverts, const int defgroup_index)
{
return VArray<float>::For<VArrayImpl_For_VertexWeights>(dverts, dvert_index);
return VArray<float>::For<VArrayImpl_For_VertexWeights>(dverts, defgroup_index);
}
VMutableArray<float> varray_for_mutable_deform_verts(MutableSpan<MDeformVert> dverts, const int dvert_index)
VMutableArray<float> varray_for_mutable_deform_verts(MutableSpan<MDeformVert> dverts,
const int defgroup_index)
{
return VMutableArray<float>::For<VArrayImpl_For_VertexWeights>(dverts, dvert_index);
return VMutableArray<float>::For<VArrayImpl_For_VertexWeights>(dverts, defgroup_index);
}
}
} // namespace blender::bke