diff options
author | Joseph Eagar <joeedh@gmail.com> | 2021-08-17 06:50:02 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2021-08-17 06:50:02 +0300 |
commit | 9503751c83345b2941a4fc41dcc979ef456b0c5f (patch) | |
tree | 3fadb7567304a58ba233c32e017fb2f8f5f41bca /source/blender/editors/sculpt_paint/paint_mask.c | |
parent | dcaba4c5e3494240464ed6cc6330f40c30ba0e0e (diff) |
Sculpt dyntopo
* Added a limited "fast draw" mode to pbvh drawing
that tries to limit data sent to the GPU.
- Facesets and mask data are disabled.
- Indexed mode is forced.
- Does not work (at all) for multires.
* Finally fixed some outstanding bmesh sculpt undo bugs:
- Forgot to mark pbvh nodes to update their bounds, which
produced a bug I had thought was caused by something else.
- Hopefully fixed a long-standing occasional memory corruption
bug.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_mask.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_mask.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_mask.c b/source/blender/editors/sculpt_paint/paint_mask.c index b3fcb9155f3..04db16d4516 100644 --- a/source/blender/editors/sculpt_paint/paint_mask.c +++ b/source/blender/editors/sculpt_paint/paint_mask.c @@ -1305,19 +1305,20 @@ static void sculpt_gesture_apply_trim(SculptGestureContext *sgcontext) MEM_freeN(looptris); - if (sgcontext->ss && sgcontext->ss->bm) { //rebuild pbvh + if (sgcontext->ss && sgcontext->ss->bm) { // rebuild pbvh BKE_pbvh_free(sgcontext->ss->pbvh); sgcontext->ss->pbvh = BKE_pbvh_new(); BKE_pbvh_build_bmesh(sgcontext->ss->pbvh, sgcontext->ss->bm, - false, + sgcontext->ss->bm_smooth_shading, sgcontext->ss->bm_log, sgcontext->ss->cd_vert_node_offset, sgcontext->ss->cd_face_node_offset, - sgcontext->ss->cd_dyn_vert); + sgcontext->ss->cd_dyn_vert, + sgcontext->ss->fast_draw); } - else { //save result to mesh + else { // save result to mesh Mesh *result = BKE_mesh_from_bmesh_nomain(bm, (&(struct BMeshToMeshParams){ .calc_object_remap = false, |