Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-09-07 11:46:26 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-07 11:46:26 +0400
commit520778163debe82b8cebe9ddec6ab4111ab2d6bd (patch)
tree0fa15a08c9bb5e8af49979ab5d2afca06bae500a /source/blender/modifiers/intern
parent6d18b1800a9bbbb7ab0ab03907a1d2a720d7f8d0 (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')
-rw-r--r--source/blender/modifiers/intern/MOD_weightvg_util.c12
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgedit.c10
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgmix.c2
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgproximity.c8
4 files changed, 16 insertions, 16 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;
diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.c b/source/blender/modifiers/intern/MOD_weightvgedit.c
index 7a7f69c4751..0b6b69b2b3c 100644
--- a/source/blender/modifiers/intern/MOD_weightvgedit.c
+++ b/source/blender/modifiers/intern/MOD_weightvgedit.c
@@ -62,7 +62,7 @@ static void initData(ModifierData *md)
{
WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md;
wmd->edit_flags = 0;
- wmd->mapping_mode = MOD_WVG_MAPPING_NONE;
+ wmd->falloff_type = MOD_WVG_MAPPING_NONE;
wmd->default_weight = 0.0f;
wmd->cmap_curve = curvemapping_add(1, 0.0, 0.0, 1.0, 1.0);
@@ -90,7 +90,7 @@ static void copyData(ModifierData *md, ModifierData *target)
BLI_strncpy(twmd->defgrp_name, wmd->defgrp_name, sizeof(twmd->defgrp_name));
twmd->edit_flags = wmd->edit_flags;
- twmd->mapping_mode = wmd->mapping_mode;
+ twmd->falloff_type = wmd->falloff_type;
twmd->default_weight = wmd->default_weight;
twmd->cmap_curve = curvemapping_copy(wmd->cmap_curve);
@@ -268,8 +268,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der
}
/* Do mapping. */
- if (wmd->mapping_mode != MOD_WVG_MAPPING_NONE) {
- weightvg_do_map(numVerts, new_w, wmd->mapping_mode, wmd->cmap_curve);
+ if (wmd->falloff_type != MOD_WVG_MAPPING_NONE) {
+ weightvg_do_map(numVerts, new_w, wmd->falloff_type, wmd->cmap_curve);
}
/* Do masking. */
@@ -298,7 +298,7 @@ static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob,
ModifierTypeInfo modifierType_WeightVGEdit = {
- /* name */ "WeightVGEdit",
+ /* name */ "VertexWeightEdit",
/* structName */ "WeightVGEditModifierData",
/* structSize */ sizeof(WeightVGEditModifierData),
/* type */ eModifierTypeType_Nonconstructive,
diff --git a/source/blender/modifiers/intern/MOD_weightvgmix.c b/source/blender/modifiers/intern/MOD_weightvgmix.c
index 97857644c35..8bfc56fc18f 100644
--- a/source/blender/modifiers/intern/MOD_weightvgmix.c
+++ b/source/blender/modifiers/intern/MOD_weightvgmix.c
@@ -438,7 +438,7 @@ static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob,
ModifierTypeInfo modifierType_WeightVGMix = {
- /* name */ "WeightVGMix",
+ /* name */ "VertexWeightMix",
/* structName */ "WeightVGMixModifierData",
/* structSize */ sizeof(WeightVGMixModifierData),
/* type */ eModifierTypeType_Nonconstructive,
diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c
index 55f0102bef3..ffb783f8adc 100644
--- a/source/blender/modifiers/intern/MOD_weightvgproximity.c
+++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c
@@ -220,7 +220,7 @@ static void initData(ModifierData *md)
wmd->proximity_mode = MOD_WVG_PROXIMITY_OBJECT;
wmd->proximity_flags = MOD_WVG_PROXIMITY_GEOM_VERTS;
- wmd->mapping_mode = MOD_WVG_MAPPING_NONE;
+ wmd->falloff_type = MOD_WVG_MAPPING_NONE;
wmd->mask_constant = 1.0f;
wmd->mask_tex_use_channel = MOD_WVG_MASK_TEX_USE_INT; /* Use intensity by default. */
@@ -238,7 +238,7 @@ static void copyData(ModifierData *md, ModifierData *target)
twmd->proximity_flags = wmd->proximity_flags;
twmd->proximity_ob_target = wmd->proximity_ob_target;
- twmd->mapping_mode = wmd->mapping_mode;
+ twmd->falloff_type = wmd->falloff_type;
twmd->mask_constant = wmd->mask_constant;
BLI_strncpy(twmd->mask_defgrp_name, wmd->mask_defgrp_name, sizeof(twmd->mask_defgrp_name));
@@ -498,7 +498,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der
wmd->mask_tex_mapping, wmd->mask_tex_map_obj, wmd->mask_tex_uvlayer_name);
/* Map distances to weights. */
- do_map(org_w, numIdx, wmd->min_dist, wmd->max_dist, wmd->mapping_mode);
+ do_map(org_w, numIdx, wmd->min_dist, wmd->max_dist, wmd->falloff_type);
/* Update vgroup. Note we never add nor remove vertices from vgroup here. */
weightvg_update_vg(dvert, defgrp_idx, numIdx, indices, org_w, 0, 0.0f, 0, 0.0f);
@@ -522,7 +522,7 @@ static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob,
ModifierTypeInfo modifierType_WeightVGProximity = {
- /* name */ "WeightVGProximity",
+ /* name */ "VertexWeightProximity",
/* structName */ "WeightVGProximityModifierData",
/* structSize */ sizeof(WeightVGProximityModifierData),
/* type */ eModifierTypeType_Nonconstructive,