diff options
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_vertex.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 9387b84f437..51b96fb9c99 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -1151,18 +1151,24 @@ static void vertex_paint_init_session_data(const ToolSettings *ts, Object *ob) gmap->vert_to_poly = NULL; BKE_mesh_vert_loop_map_create(&gmap->vert_to_loop, &gmap->vert_map_mem, + me->mvert, + me->medge, me->mpoly, me->mloop, me->totvert, me->totpoly, - me->totloop); + me->totloop, + false); BKE_mesh_vert_poly_map_create(&gmap->vert_to_poly, &gmap->poly_map_mem, + me->mvert, + me->medge, me->mpoly, me->mloop, me->totvert, me->totpoly, - me->totloop); + me->totloop, + false); } /* Create average brush arrays */ @@ -1247,7 +1253,7 @@ static void ed_vwpaintmode_enter_generic( /* Create vertex/weight paint mode session data */ if (ob->sculpt) { if (ob->sculpt->cache) { - SCULPT_cache_free(ob->sculpt->cache); + SCULPT_cache_free(ob->sculpt, ob->sculpt->cache); ob->sculpt->cache = NULL; } BKE_sculptsession_free(ob); @@ -1316,7 +1322,7 @@ static void ed_vwpaintmode_exit_generic(Object *ob, const eObjectMode mode_flag) /* If the cache is not released by a cancel or a done, free it now. */ if (ob->sculpt && ob->sculpt->cache) { - SCULPT_cache_free(ob->sculpt->cache); + SCULPT_cache_free(ob->sculpt, ob->sculpt->cache); ob->sculpt->cache = NULL; } @@ -2510,7 +2516,7 @@ static void wpaint_stroke_done(const bContext *C, struct PaintStroke *stroke) WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); - SCULPT_cache_free(ob->sculpt->cache); + SCULPT_cache_free(ob->sculpt, ob->sculpt->cache); ob->sculpt->cache = NULL; } @@ -2561,7 +2567,7 @@ static void wpaint_cancel(bContext *C, wmOperator *op) { Object *ob = CTX_data_active_object(C); if (ob->sculpt->cache) { - SCULPT_cache_free(ob->sculpt->cache); + SCULPT_cache_free(ob->sculpt, ob->sculpt->cache); ob->sculpt->cache = NULL; } @@ -3450,7 +3456,7 @@ static void vpaint_stroke_done(const bContext *C, struct PaintStroke *stroke) MEM_freeN(vpd); - SCULPT_cache_free(ob->sculpt->cache); + SCULPT_cache_free(ob->sculpt, ob->sculpt->cache); ob->sculpt->cache = NULL; } @@ -3502,7 +3508,7 @@ static void vpaint_cancel(bContext *C, wmOperator *op) { Object *ob = CTX_data_active_object(C); if (ob->sculpt->cache) { - SCULPT_cache_free(ob->sculpt->cache); + SCULPT_cache_free(ob->sculpt, ob->sculpt->cache); ob->sculpt->cache = NULL; } |