From a650258158dd7ad8fa9b6cb1b7da749e30ae15c1 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 9 Sep 2019 10:25:04 +0200 Subject: Python handlers: Pass depsgraph to events where it makes sense The goal is to make it possible to access evaluated datablocks at a corresponding context. For example, be able to check evaluated state if an object used for rendering. Allows to write scripts in a safe manner for T63548 and T60094. Reviewers: brecht Differential Revision: https://developer.blender.org/D5726 --- source/blender/editors/undo/ed_undo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/undo') diff --git a/source/blender/editors/undo/ed_undo.c b/source/blender/editors/undo/ed_undo.c index df927726e82..315a4c73e5f 100644 --- a/source/blender/editors/undo/ed_undo.c +++ b/source/blender/editors/undo/ed_undo.c @@ -172,7 +172,7 @@ static int ed_undo_step_impl( /* Note: ignore grease pencil for now. */ Main *bmain = CTX_data_main(C); wm->op_undo_depth++; - BKE_callback_exec( + BKE_callback_exec_id( bmain, &scene->id, (step_for_callback > 0) ? BKE_CB_EVT_UNDO_PRE : BKE_CB_EVT_REDO_PRE); wm->op_undo_depth--; } @@ -220,7 +220,7 @@ static int ed_undo_step_impl( Main *bmain = CTX_data_main(C); scene = CTX_data_scene(C); wm->op_undo_depth++; - BKE_callback_exec( + BKE_callback_exec_id( bmain, &scene->id, step_for_callback > 0 ? BKE_CB_EVT_UNDO_POST : BKE_CB_EVT_REDO_POST); wm->op_undo_depth--; } -- cgit v1.2.3