diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-08 18:04:54 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-08 18:23:25 +0300 |
commit | 3e86bb2d0bf1b13b4e482411dd176bac13e90961 (patch) | |
tree | c39469aa0af98e89dfbfac847e842c56a913cf92 /source/blender/editors/sculpt_paint/sculpt.c | |
parent | 1ce55693f511013ceed962e8614aa61dd2dff4d5 (diff) |
Sculpt/Paint: move PBVH building to use evaluated mesh instead of deprecated Derivedmesh.
Pretty straightforward changes, merely mimicking dm-related code,
which was already essentially using either Mesh or BMesh data to
build the PBVH...
Note that we "lose" the subsurf (a.k.a. grid) PBVH case here, but that
one was already dead code in current blender2.8, since final dm is
always a cddm built from evaluated mesh.
Proper fix is pending new code for subsurf/multires area.
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 2e9d55a4c6f..3475aadd171 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -5210,14 +5210,12 @@ static void sculpt_dynamic_topology_triangulate(BMesh *bm) void sculpt_pbvh_clear(Object *ob) { SculptSession *ss = ob->sculpt; - DerivedMesh *dm = ob->derivedFinal; /* Clear out any existing DM and PBVH */ - if (ss->pbvh) + if (ss->pbvh) { BKE_pbvh_free(ss->pbvh); + } ss->pbvh = NULL; - if (dm) - dm->getPBVH(NULL, dm); BKE_object_free_derived_caches(ob); } |