diff options
Diffstat (limited to 'source/blender/blenkernel/BKE_deform.h')
-rw-r--r-- | source/blender/blenkernel/BKE_deform.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_deform.h b/source/blender/blenkernel/BKE_deform.h index e203549fef5..08312035e40 100644 --- a/source/blender/blenkernel/BKE_deform.h +++ b/source/blender/blenkernel/BKE_deform.h @@ -39,6 +39,10 @@ struct Object; struct ListBase; struct bDeformGroup; struct MDeformVert; +struct MVert; +struct MEdge; +struct MLoop; +struct MPoly; struct bDeformGroup *BKE_defgroup_new(struct Object *ob, const char *name); void defgroup_copy_list(struct ListBase *lb1, struct ListBase *lb2); @@ -85,6 +89,19 @@ void defvert_normalize_lock_map(struct MDeformVert *dvert, const bool *vgroup_subset, const int vgroup_tot, const bool *lock_flags, const int defbase_tot); +/* Utilities to 'extract' a given vgroup into a simple float array, for verts, but also edges/polys/loops. */ +void BKE_defvert_extract_vgroup_to_vertweights( + struct MDeformVert *dvert, const int defgroup, const int num_verts, float *r_weights, const bool invert_vgroup); +void BKE_defvert_extract_vgroup_to_edgeweights( + struct MDeformVert *dvert, const int defgroup, const int num_verts, struct MEdge *edges, const int num_edges, + float *r_weights, const bool invert_vgroup); +void BKE_defvert_extract_vgroup_to_loopweights( + struct MDeformVert *dvert, const int defgroup, const int num_verts, struct MLoop *loops, const int num_loops, + float *r_weights, const bool invert_vgroup); +void BKE_defvert_extract_vgroup_to_polyweights( + struct MDeformVert *dvert, const int defgroup, const int num_verts, struct MLoop *loops, const int num_loops, + struct MPoly *polys, const int num_polys, float *r_weights, const bool invert_vgroup); + /* utility function, note that MAX_VGROUP_NAME chars is the maximum string length since its only * used with defgroups currently */ |