Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/undo/ed_undo.c
| Show First 20 Lines • Show All 246 Lines • ▼ Show 20 Lines | static int ed_undo_step_impl(bContext *C, | ||||
| } | } | ||||
| /* App-Handlers (pre). */ | /* App-Handlers (pre). */ | ||||
| { | { | ||||
| /* Note: ignore grease pencil for now. */ | /* Note: ignore grease pencil for now. */ | ||||
| Main *bmain = CTX_data_main(C); | Main *bmain = CTX_data_main(C); | ||||
| wm->op_undo_depth++; | wm->op_undo_depth++; | ||||
| BKE_callback_exec_id( | BKE_callback_exec_id( | ||||
| bmain, &scene->id, (step_for_callback > 0) ? BKE_CB_EVT_UNDO_PRE : BKE_CB_EVT_REDO_PRE); | bmain, &scene->id, (step_for_callback == STEP_UNDO) ? BKE_CB_EVT_UNDO_PRE : BKE_CB_EVT_REDO_PRE); | ||||
| wm->op_undo_depth--; | wm->op_undo_depth--; | ||||
| } | } | ||||
| /* Undo System */ | /* Undo System */ | ||||
| { | { | ||||
| if (undo_name) { | if (undo_name) { | ||||
| BKE_undosys_step_undo_with_data(wm->undo_stack, C, step_data_from_name); | BKE_undosys_step_undo_with_data(wm->undo_stack, C, step_data_from_name); | ||||
| } | } | ||||
| Show All 32 Lines | static int ed_undo_step_impl(bContext *C, | ||||
| } | } | ||||
| /* App-Handlers (post). */ | /* App-Handlers (post). */ | ||||
| { | { | ||||
| Main *bmain = CTX_data_main(C); | Main *bmain = CTX_data_main(C); | ||||
| scene = CTX_data_scene(C); | scene = CTX_data_scene(C); | ||||
| wm->op_undo_depth++; | wm->op_undo_depth++; | ||||
| BKE_callback_exec_id( | BKE_callback_exec_id( | ||||
| bmain, &scene->id, step_for_callback > 0 ? BKE_CB_EVT_UNDO_POST : BKE_CB_EVT_REDO_POST); | bmain, &scene->id, (step_for_callback == STEP_UNDO) ? BKE_CB_EVT_UNDO_POST : BKE_CB_EVT_REDO_POST); | ||||
| wm->op_undo_depth--; | wm->op_undo_depth--; | ||||
| } | } | ||||
| if (G.debug & G_DEBUG_IO) { | if (G.debug & G_DEBUG_IO) { | ||||
| Main *bmain = CTX_data_main(C); | Main *bmain = CTX_data_main(C); | ||||
| if (bmain->lock != NULL) { | if (bmain->lock != NULL) { | ||||
| BKE_report(reports, RPT_INFO, "Checking sanity of current .blend file *AFTER* undo step"); | BKE_report(reports, RPT_INFO, "Checking sanity of current .blend file *AFTER* undo step"); | ||||
| BLO_main_validate_libraries(bmain, reports); | BLO_main_validate_libraries(bmain, reports); | ||||
| ▲ Show 20 Lines • Show All 669 Lines • Show Last 20 Lines | |||||