diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-07 19:15:27 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-07 19:18:05 +0300 |
commit | 3800be695bc19dcbefc23fe7b157f104b1efb8dc (patch) | |
tree | de6ed183d07f85eccdbb31739b88db425b743269 /source/blender/modifiers/intern/MOD_weightvg_util.h | |
parent | 15f9ca05d1307dcaf63f9ead81ea95283b9484e5 (diff) |
Modifier stack: move vgroup editing modifiers to new Mesh-based system.
Some notes here:
* Proximity with non-mesh objects (like curve, see TEST_2 scene in
weightvg testfile) are not working currently. This is known TODO of COW
depsgraph project.
* Proximity modifier is slower, due to some other TODO pending on
BVHTree creation/caching for Mesh.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_weightvg_util.h')
-rw-r--r-- | source/blender/modifiers/intern/MOD_weightvg_util.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.h b/source/blender/modifiers/intern/MOD_weightvg_util.h index 03bcbb6eb97..73552e50d0f 100644 --- a/source/blender/modifiers/intern/MOD_weightvg_util.h +++ b/source/blender/modifiers/intern/MOD_weightvg_util.h @@ -32,7 +32,9 @@ #define __MOD_WEIGHTVG_UTIL_H__ struct CurveMapping; -struct DerivedMesh; +struct MDeformVert; +struct MDeformWeight; +struct Mesh; struct Object; struct Tex; struct Scene; @@ -70,16 +72,16 @@ void weightvg_do_map(int num, float *new_w, short mode, struct CurveMapping *cma * vertex index (in case the weight tables do not cover the whole vertices...). * XXX The standard "factor" value is assumed in [0.0, 1.0] range. Else, weird results might appear. */ -void weightvg_do_mask(int num, const int *indices, float *org_w, const float *new_w, Object *ob, - DerivedMesh *dm, float fact, const char defgrp_name[MAX_VGROUP_NAME], - struct Scene *scene, Tex *texture, int tex_use_channel, int tex_mapping, +void weightvg_do_mask(const int num, const int *indices, float *org_w, const float *new_w, Object *ob, + struct Mesh *mesh, const float fact, const char defgrp_name[MAX_VGROUP_NAME], + struct Scene *scene, Tex *texture, const int tex_use_channel, const int tex_mapping, Object *tex_map_object, const char *tex_uvlayer_name); /* Applies weights to given vgroup (defgroup), and optionally add/remove vertices from the group. * If indices is not NULL, it must be a table of same length as weights, mapping to the real * vertex index (in case the weight table does not cover the whole vertices...). */ -void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, MDeformWeight **dws, int num, +void weightvg_update_vg(struct MDeformVert *dvert, int defgrp_idx, struct MDeformWeight **dws, int num, const int *indices, const float *weights, const bool do_add, const float add_thresh, const bool do_rem, const float rem_thresh); |