diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-09-07 11:46:26 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-09-07 11:46:26 +0400 |
commit | 520778163debe82b8cebe9ddec6ab4111ab2d6bd (patch) | |
tree | 0fa15a08c9bb5e8af49979ab5d2afca06bae500a /source/blender/modifiers/intern/MOD_weightvg_util.c | |
parent | 6d18b1800a9bbbb7ab0ab03907a1d2a720d7f8d0 (diff) |
interface + naming improvements to vertex wright modifier
- WeightVG -> Vertex Weight
- mapping_mode -> falloff_type
- nicer layout for VertexWeightModifiers add/remove options
Diffstat (limited to 'source/blender/modifiers/intern/MOD_weightvg_util.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_weightvg_util.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.c b/source/blender/modifiers/intern/MOD_weightvg_util.c index 52c851c5a1d..51465cc80b0 100644 --- a/source/blender/modifiers/intern/MOD_weightvg_util.c +++ b/source/blender/modifiers/intern/MOD_weightvg_util.c @@ -63,16 +63,16 @@ * vertex index (in case the weight tables do not cover the whole vertices...). * cmap might be NULL, in which case curve mapping mode will return unmodified data. */ -void weightvg_do_map(int num, float *new_w, short mode, CurveMapping *cmap) +void weightvg_do_map(int num, float *new_w, short falloff_type, CurveMapping *cmap) { int i; /* Return immediately, if we have nothing to do! */ /* Also security checks... */ - if(((mode == MOD_WVG_MAPPING_CURVE) && (cmap == NULL)) - || !ELEM7(mode, MOD_WVG_MAPPING_CURVE, MOD_WVG_MAPPING_SHARP, MOD_WVG_MAPPING_SMOOTH, - MOD_WVG_MAPPING_ROOT, MOD_WVG_MAPPING_SPHERE, MOD_WVG_MAPPING_RANDOM, - MOD_WVG_MAPPING_STEP)) + if(((falloff_type == MOD_WVG_MAPPING_CURVE) && (cmap == NULL)) + || !ELEM7(falloff_type, MOD_WVG_MAPPING_CURVE, MOD_WVG_MAPPING_SHARP, MOD_WVG_MAPPING_SMOOTH, + MOD_WVG_MAPPING_ROOT, MOD_WVG_MAPPING_SPHERE, MOD_WVG_MAPPING_RANDOM, + MOD_WVG_MAPPING_STEP)) return; /* Map each weight (vertex) to its new value, accordingly to the chosen mode. */ @@ -81,7 +81,7 @@ void weightvg_do_map(int num, float *new_w, short mode, CurveMapping *cmap) /* Code borrowed from the warp modifier. */ /* Closely matches PROP_SMOOTH and similar. */ - switch(mode) { + switch(falloff_type) { case MOD_WVG_MAPPING_CURVE: fac = curvemapping_evaluateF(cmap, 0, fac); break; |