diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-21 18:43:51 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-21 18:43:51 +0400 |
commit | 8bd7c3fba2749fdf2b16c4f32abf1a35692bc5bb (patch) | |
tree | ec5506895139ed6a09921c60eaf61bd8eb7f2226 /source/blender/modifiers/intern/MOD_weightvg_util.c | |
parent | 809fce9d00ecf8eea2c3d2ea52c3de2ec2ede1ee (diff) |
change curve evaluation functions never to modify curve data (ensures thread safety), now initializations has to be done outside evaluation.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_weightvg_util.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_weightvg_util.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.c b/source/blender/modifiers/intern/MOD_weightvg_util.c index 81cdad0d5e5..7181b5bbb44 100644 --- a/source/blender/modifiers/intern/MOD_weightvg_util.c +++ b/source/blender/modifiers/intern/MOD_weightvg_util.c @@ -73,6 +73,10 @@ void weightvg_do_map(int num, float *new_w, short falloff_type, CurveMapping *cm return; } + if (cmap && falloff_type == MOD_WVG_MAPPING_CURVE) { + curvemapping_initialize(cmap); + } + /* Map each weight (vertex) to its new value, accordingly to the chosen mode. */ for (i = 0; i < num; ++i) { float fac = new_w[i]; |