diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-10-06 06:19:04 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-10-06 06:19:04 +0400 |
commit | e1ce98f8ae3dff12608ffd78bc27fc8d9d3a0845 (patch) | |
tree | c11c0ab39600a9baed8acca9a551710a4edbdc05 /source/blender/editors/sculpt_paint | |
parent | 4e6be49ca46f20879c9e1e75ec9cb9340eabf62f (diff) |
fix error in last commit & remove commented code which is now working in 2.5x.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index c3b575d5d21..8040c98bec9 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -1813,7 +1813,7 @@ static char *wpaint_make_validmap(Object *ob) ModifierData *md; char *vgroup_validmap; GHash *gh; - int i = 0, step1=1; + int i, step1=1; if(ob->defbase.first == NULL) { return NULL; @@ -1826,7 +1826,7 @@ static char *wpaint_make_validmap(Object *ob) BLI_ghash_insert(gh, dg->name, NULL); } - vgroup_validmap= MEM_callocN(i, "wpaint valid map"); + vgroup_validmap= MEM_callocN(BLI_ghash_size(gh), "wpaint valid map"); /*now loop through the armature modifiers and identify deform bones*/ for (md = ob->modifiers.first; md; md= !md->next && step1 ? (step1=0), modifiers_getVirtualModifierList(ob) : md->next) { @@ -1898,18 +1898,10 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *UNUSED wpd->auto_normalize = ts->auto_normalize; wpd->defbase_tot = BLI_countlist(&ob->defbase); wpd->lock_flags = gen_lock_flags(ob, wpd->defbase_tot); - if (wpd->auto_normalize || ts->multipaint || wpd->lock_flags) + if (wpd->auto_normalize || ts->multipaint || wpd->lock_flags) { wpd->vgroup_validmap = wpaint_make_validmap(ob); - - // if(qual & LR_CTRLKEY) { - // sample_wpaint(scene, ar, v3d, 0); - // return; - // } - // if(qual & LR_SHIFTKEY) { - // sample_wpaint(scene, ar, v3d, 1); - // return; - // } - + } + /* ALLOCATIONS! no return after this line */ /* painting on subsurfs should give correct points too, this returns me->totvert amount */ wpd->vertexcosnos= mesh_get_mapped_verts_nors(scene, ob); @@ -1937,9 +1929,7 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *UNUSED if(ob->defbase.first==NULL) { ED_vgroup_add(ob); } - - // if(ob->lay & v3d->lay); else error("Active object is not in this layer"); - + /* imat for normals */ mul_m4_m4m4(mat, ob->obmat, wpd->vc.rv3d->viewmat); invert_m4_m4(imat, mat); |