diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-02-05 10:20:51 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-02-05 10:20:51 +0400 |
commit | 776ec0ec61cee0be4eb60511900f7fe8f01dbae5 (patch) | |
tree | 52a690b779119bb4d96f16e51aa68ec3038a78f5 /source/blender/editors/sculpt_paint | |
parent | 2277241ea66ed7672cb81616b1ef3369586aa18c (diff) |
add function for getting a polygon map: dm->getPolyMap(ob, dm).
polygon version of dm->getFaceMap(ob, dm)
sculpt uses this for checking connectivity.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 12 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_intern.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 682f0fad53a..d14e7da5537 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -905,8 +905,8 @@ static void calc_sculpt_normal(Sculpt *sd, Object *ob, float an[3], PBVHNode **n static void neighbor_average(SculptSession *ss, float avg[3], const unsigned vert) { int i, j, ok, total=0; - IndexNode *node= ss->fmap[vert].first; - char ncount= BLI_countlist(&ss->fmap[vert]); + IndexNode *node= ss->pmap[vert].first; + char ncount= BLI_countlist(&ss->pmap[vert]); MPoly *f; MLoop *ml; @@ -942,7 +942,7 @@ static void neighbor_average(SculptSession *ss, float avg[3], const unsigned ver for (i=0; i<3; ++i) { - if (ncount!=2 || BLI_countlist(&ss->fmap[f_adj_v[i]]) <= 2) { + if (ncount!=2 || BLI_countlist(&ss->pmap[f_adj_v[i]]) <= 2) { if(ss->deform_cos) add_v3_v3(avg, ss->deform_cos[f_adj_v[i]]); else add_v3_v3(avg, ss->mvert[f_adj_v[i]].co); ++total; @@ -1122,7 +1122,7 @@ static void smooth(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode, float if(ss->multires) { do_multires_smooth_brush(sd, ss, nodes[n], iteration != count ? 1.0f : last); } - else if(ss->fmap) + else if(ss->pmap) do_mesh_smooth_brush(sd, ss, nodes[n], iteration != count ? 1.0f : last); } @@ -2692,7 +2692,7 @@ static void sculpt_update_tex(const Scene *scene, Sculpt *sd, SculptSession *ss) } } -void sculpt_update_mesh_elements(Scene *scene, Sculpt *sd, Object *ob, int need_fmap) +void sculpt_update_mesh_elements(Scene *scene, Sculpt *sd, Object *ob, int need_pmap) { DerivedMesh *dm = mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH); SculptSession *ss = ob->sculpt; @@ -2724,7 +2724,7 @@ void sculpt_update_mesh_elements(Scene *scene, Sculpt *sd, Object *ob, int need_ } ss->pbvh = dm->getPBVH(ob, dm); - ss->fmap = (need_fmap && dm->getFaceMap)? dm->getFaceMap(ob, dm): NULL; + ss->pmap = (need_pmap && dm->getPolyMap)? dm->getPolyMap(ob, dm): NULL; if(ss->modifiers_active) { if(!ss->orig_cos) { diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h index 275d1d52355..5c739f043fe 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.h +++ b/source/blender/editors/sculpt_paint/sculpt_intern.h @@ -62,7 +62,7 @@ struct Brush *sculptmode_brush(void); void sculpt(Sculpt *sd); int sculpt_poll(struct bContext *C); -void sculpt_update_mesh_elements(struct Scene *scene, struct Sculpt *sd, struct Object *ob, int need_fmap); +void sculpt_update_mesh_elements(struct Scene *scene, struct Sculpt *sd, struct Object *ob, int need_pmap); /* Deformed mesh sculpt */ void free_sculptsession_deformMats(struct SculptSession *ss); |