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>2013-08-04 07:45:30 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-08-04 07:45:30 +0400
commit93f5e2218a5103e91ff4c3943aec3bc3d6f9c69e (patch)
tree023faff5996a38655b1cab90396469be00e733cd /source/blender/modifiers
parent4bd60205fbdd7935fdda8f2d6f75e6ce3eb17c8f (diff)
code cleanup: replace strncpy -> BLI_strncpy, skip first 2 chars when making a hash from the object name.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgedit.c2
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgproximity.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.c b/source/blender/modifiers/intern/MOD_weightvgedit.c
index 959e4d4f59d..c8da0eb6de7 100644
--- a/source/blender/modifiers/intern/MOD_weightvgedit.c
+++ b/source/blender/modifiers/intern/MOD_weightvgedit.c
@@ -253,7 +253,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der
RNG *rng = NULL;
if (wmd->falloff_type == MOD_WVG_MAPPING_RANDOM)
- rng = BLI_rng_new_srandom(BLI_ghashutil_strhash(ob->id.name));
+ rng = BLI_rng_new_srandom(BLI_ghashutil_strhash(ob->id.name + 2));
weightvg_do_map(numVerts, new_w, wmd->falloff_type, wmd->cmap_curve, rng);
diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c
index f0e9a26f10a..63267538528 100644
--- a/source/blender/modifiers/intern/MOD_weightvgproximity.c
+++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c
@@ -216,7 +216,7 @@ static void do_map(Object *ob, float *weights, const int nidx, const float min_d
RNG *rng = NULL;
if (mode == MOD_WVG_MAPPING_RANDOM)
- rng = BLI_rng_new_srandom(BLI_ghashutil_strhash(ob->id.name));
+ rng = BLI_rng_new_srandom(BLI_ghashutil_strhash(ob->id.name + 2));
weightvg_do_map(nidx, weights, mode, NULL, rng);