Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_undo.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_undo.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c
index e12ef2df4ab..3feb8e105e6 100644
--- a/source/blender/editors/sculpt_paint/sculpt_undo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_undo.c
@@ -142,12 +142,10 @@ static bool sculpt_undo_restore_coords(bContext *C, DerivedMesh *dm, SculptUndoN
Scene *scene = CTX_data_scene(C);
Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
Object *ob = CTX_data_active_object(C);
- EvaluationContext eval_ctx;
+ Depsgraph *depsgraph = CTX_data_depsgraph(C);
SculptSession *ss = ob->sculpt;
MVert *mvert;
int *index;
-
- CTX_data_eval_ctx(C, &eval_ctx);
if (unode->maxvert) {
/* regular mesh restore */
@@ -161,7 +159,7 @@ static bool sculpt_undo_restore_coords(bContext *C, DerivedMesh *dm, SculptUndoN
if (kb) {
ob->shapenr = BLI_findindex(&key->block, kb) + 1;
- BKE_sculpt_update_mesh_elements(&eval_ctx, scene, sd, ob, 0, false);
+ BKE_sculpt_update_mesh_elements(depsgraph, scene, sd, ob, 0, false);
WM_event_add_notifier(C, NC_OBJECT | ND_DATA, ob);
}
else {
@@ -477,7 +475,7 @@ static void sculpt_undo_restore_list(bContext *C, ListBase *lb)
Scene *scene = CTX_data_scene(C);
Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
Object *ob = CTX_data_active_object(C);
- EvaluationContext eval_ctx;
+ Depsgraph *depsgraph = CTX_data_depsgraph(C);
DerivedMesh *dm;
SculptSession *ss = ob->sculpt;
SculptUndoNode *unode;
@@ -485,8 +483,6 @@ static void sculpt_undo_restore_list(bContext *C, ListBase *lb)
bool need_mask = false;
bool partial_update = true;
- CTX_data_eval_ctx(C, &eval_ctx);
-
for (unode = lb->first; unode; unode = unode->next) {
if (STREQ(unode->idname, ob->id.name)) {
if (unode->type == SCULPT_UNDO_MASK) {
@@ -498,10 +494,10 @@ static void sculpt_undo_restore_list(bContext *C, ListBase *lb)
}
}
- BKE_sculpt_update_mesh_elements(&eval_ctx, scene, sd, ob, 0, need_mask);
+ BKE_sculpt_update_mesh_elements(depsgraph, scene, sd, ob, 0, need_mask);
/* call _after_ sculpt_update_mesh_elements() which may update 'ob->derivedFinal' */
- dm = mesh_get_derived_final(&eval_ctx, scene, ob, 0);
+ dm = mesh_get_derived_final(depsgraph, scene, ob, 0);
if (lb->first && sculpt_undo_bmesh_restore(C, lb->first, ob, ss))
return;