|
Blender V5.0
|
#include <cstring>#include "CLG_log.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "BLI_listbase.h"#include "BLI_utildefines.h"#include "BKE_blender_undo.hh"#include "BKE_callbacks.hh"#include "BKE_context.hh"#include "BKE_global.hh"#include "BKE_layer.hh"#include "BKE_main.hh"#include "BKE_paint.hh"#include "BKE_report.hh"#include "BKE_scene.hh"#include "BKE_screen.hh"#include "BKE_undo_system.hh"#include "BKE_workspace.hh"#include "BLO_blend_validate.hh"#include "ED_asset.hh"#include "ED_gpencil_legacy.hh"#include "ED_object.hh"#include "ED_outliner.hh"#include "ED_render.hh"#include "ED_screen.hh"#include "ED_sculpt.hh"#include "ED_undo.hh"#include "WM_api.hh"#include "WM_toolsystem.hh"#include "WM_types.hh"#include "RNA_access.hh"#include "RNA_define.hh"#include "RNA_enum_types.hh"Go to the source code of this file.
Variables | |
| static CLG_LogRef | LOG = {"undo"} |
| void ED_OT_redo | ( | wmOperatorType * | ot | ) |
Definition at line 601 of file ed_undo.cc.
References ed_redo_exec(), ed_redo_poll(), and ot.
Referenced by ED_operatortypes_edutils().
| void ED_OT_undo | ( | wmOperatorType * | ot | ) |
Definition at line 558 of file ed_undo.cc.
References ed_undo_exec(), ed_undo_poll(), and ot.
Referenced by ED_operatortypes_edutils().
| void ED_OT_undo_history | ( | wmOperatorType * | ot | ) |
Definition at line 754 of file ed_undo.cc.
References ed_undo_is_init_and_screenactive_poll(), ot, RNA_def_int(), undo_history_exec(), and undo_history_invoke().
Referenced by ED_operatortypes_edutils().
| void ED_OT_undo_push | ( | wmOperatorType * | ot | ) |
Definition at line 570 of file ed_undo.cc.
References BKE_UNDO_STR_MAX, ED_operator_screenactive(), ed_undo_push_exec(), OPTYPE_INTERNAL, ot, and RNA_def_string().
Referenced by ED_operatortypes_edutils().
| void ED_OT_undo_redo | ( | wmOperatorType * | ot | ) |
Definition at line 613 of file ed_undo.cc.
References ed_undo_redo_exec(), ed_undo_redo_poll(), and ot.
Referenced by ED_operatortypes_edutils().
|
static |
Definition at line 496 of file ed_undo.cc.
References C, ed_undo_refresh_for_op(), ed_undo_step_direction(), OPERATOR_FINISHED, wmOperator::reports, ret, and STEP_REDO.
Referenced by ED_OT_redo().
|
static |
Definition at line 592 of file ed_undo.cc.
References C, CTX_wm_manager(), ed_undo_is_init_and_screenactive_poll(), wmWindowManager::runtime, and undo_stack.
Referenced by ED_OT_redo().
| Vector< Base * > ED_undo_editmode_bases_from_view_layer | ( | const Scene * | scene, |
| ViewLayer * | view_layer ) |
Definition at line 886 of file ed_undo.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BKE_view_layer_active_base_get(), BKE_view_layer_object_bases_get(), BKE_view_layer_synced_ensure(), BLI_assert, Object::data, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::is_empty(), Object::mode, Base::next, OB_MODE_EDIT, Base::object, and Object::type.
Referenced by ED_undo_object_editmode_restore_helper().
| Vector< Object * > ED_undo_editmode_objects_from_view_layer | ( | const Scene * | scene, |
| ViewLayer * | view_layer ) |
Definition at line 856 of file ed_undo.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), BKE_view_layer_active_base_get(), BKE_view_layer_object_bases_get(), BKE_view_layer_synced_ensure(), BLI_assert, Object::data, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::is_empty(), Object::mode, Base::next, OB_MODE_EDIT, Base::object, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size(), and Object::type.
Referenced by armature_undosys_step_encode(), curve_undosys_step_encode(), lattice_undosys_step_encode(), mball_undosys_step_encode(), mesh_undosys_step_encode(), blender::ed::curves::undo::step_encode(), blender::ed::greasepencil::undo::step_encode(), and blender::ed::pointcloud::undo::step_encode().
|
static |
Definition at line 468 of file ed_undo.cc.
References C, CTX_wm_manager(), ed_undo_refresh_for_op(), ed_undo_step_direction(), OPERATOR_FINISHED, wmOperator::reports, ret, STEP_UNDO, and WM_operator_stack_clear().
Referenced by ED_OT_undo().
| void ED_undo_group_begin | ( | bContext * | C | ) |
Definition at line 86 of file ed_undo.cc.
References BKE_undosys_stack_group_begin(), C, CTX_wm_manager(), and wmWindowManager::runtime.
Referenced by blender::ed::outliner::do_outliner_item_mode_toggle_generic(), and blender::ed::object::object_transfer_mode_to_base().
| void ED_undo_group_end | ( | bContext * | C | ) |
Definition at line 92 of file ed_undo.cc.
References BKE_undosys_stack_group_end(), C, CTX_wm_manager(), and wmWindowManager::runtime.
Referenced by blender::ed::outliner::do_outliner_item_mode_toggle_generic(), and blender::ed::object::object_transfer_mode_to_base().
| void ED_undo_grouped_push | ( | bContext * | C, |
| const char * | str ) |
Definition at line 337 of file ed_undo.cc.
References BKE_undosys_stack_clear_active(), C, CTX_wm_manager(), ED_undo_push(), UndoStep::name, str, and STREQ.
Referenced by blender::ed::object::shapekey::ShapeKeyItem::delete_item(), ED_undo_grouped_push_op(), and view3d_camera_lock_undo_ex().
| void ED_undo_grouped_push_op | ( | bContext * | C, |
| wmOperator * | op ) |
Definition at line 365 of file ed_undo.cc.
References C, ED_undo_grouped_push(), wmOperatorType::name, wmOperator::type, and wmOperatorType::undo_group.
Referenced by wm_handler_fileselect_do(), and wm_operator_finished().
|
static |
Definition at line 534 of file ed_undo.cc.
References C, ED_operator_screenactive(), and ed_undo_is_init_poll().
Referenced by ED_OT_undo_history(), ed_redo_poll(), ed_undo_poll(), and ed_undo_redo_poll().
|
static |
Definition at line 519 of file ed_undo.cc.
References C, CTX_wm_manager(), and CTX_wm_operator_poll_msg_set().
Referenced by ed_undo_is_init_and_screenactive_poll().
| bool ED_undo_is_legacy_compatible_for_property | ( | bContext * | C, |
| ID * | id, | ||
| PointerRNA & | ptr ) |
When a property of ID changes, return false.
This is to avoid changes to a property making undo pushes which are ignored by the undo-system. For example, changing a brush property isn't stored by sculpt-mode undo steps. This workaround is needed until the limitation is removed, see: #61948.
Definition at line 405 of file ed_undo.cc.
References BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), C, CLOG_DEBUG, CTX_data_scene(), CTX_data_view_layer(), Object::data, GS, ID_CHECK_UNDO, LOG, Object::mode, ID::name, OB_MODE_ALL_PAINT, OB_MODE_EDIT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, ptr, and RNA_struct_undo_check().
Referenced by radial_control_modal(), and ui_apply_but_undo().
| bool ED_undo_is_memfile_compatible | ( | const bContext * | C | ) |
Definition at line 387 of file ed_undo.cc.
References BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), C, CTX_data_scene(), CTX_data_view_layer(), Object::mode, and OB_MODE_EDIT.
Referenced by ED_view3d_camera_lock_undo_test(), fly_modal(), memfile_undosys_poll(), and walk_modal().
| bool ED_undo_is_state_valid | ( | bContext * | C | ) |
Run from the main event loop, basic checks that undo is left in a correct state.
Definition at line 63 of file ed_undo.cc.
References C, CTX_wm_manager(), and wmWindowManager::runtime.
Referenced by wm_event_do_handlers().
| bool ED_undo_is_valid | ( | const bContext * | C, |
| const char * | undoname ) |
Name optionally, function used to check for operator redo panel.
Definition at line 381 of file ed_undo.cc.
References BKE_undosys_stack_has_undo(), C, and CTX_wm_manager().
Referenced by WM_operator_check_ui_enabled().
| void ED_undo_object_editmode_restore_helper | ( | Scene * | scene, |
| ViewLayer * | view_layer, | ||
| Object ** | object_array, | ||
| uint | object_array_len, | ||
| uint | object_array_stride ) |
Load all our objects from object_array into edit-mode, clear everything else.
Definition at line 811 of file ed_undo.cc.
References blender::ed::object::BA_DESELECT, blender::ed::object::base_select(), Object::data, ED_undo_editmode_bases_from_view_layer(), blender::ed::object::editmode_enter_ex(), blender::ed::object::editmode_exit_ex(), blender::ed::object::EM_FREEDATA, blender::ed::object::EM_NO_CONTEXT, G_MAIN, i, ID_TAG_DOIT, POINTER_OFFSET, and ID::tag.
Referenced by armature_undosys_step_decode(), curve_undosys_step_decode(), font_undosys_step_decode(), lattice_undosys_step_decode(), mball_undosys_step_decode(), mesh_undosys_step_decode(), blender::ed::curves::undo::step_decode(), blender::ed::greasepencil::undo::step_decode(), and blender::ed::pointcloud::undo::step_decode().
| void ED_undo_object_editmode_validate_scene_from_windows | ( | wmWindowManager * | wm, |
| const Scene * | scene_ref, | ||
| Scene ** | scene_p, | ||
| ViewLayer ** | view_layer_p ) |
This function addresses the problem of restoring undo steps when multiple windows are used. Since undo steps don't track the full context that created them it's possible an edit-mode undo step will attempt to restore edit-mode into a different window, scene or view-layer.
Values scene_p & view_layer_p (typically initialized from the context) are updated from the visible windows using scene_ref as a reference. If the no window can be found, the values are left as-is.
Since users may close windows before undoing, it's expected the window may be unavailable. When this happens the edit-mode objects wont be restored into edit-mode by ED_undo_object_editmode_restore_helper which is acceptable since objects which aren't visible in any window don't need to enter edit-mode.
Definition at line 794 of file ed_undo.cc.
References LISTBASE_FOREACH, and WM_window_get_active_view_layer().
Referenced by armature_undosys_step_decode(), curve_undosys_step_decode(), font_undosys_step_decode(), lattice_undosys_step_decode(), mball_undosys_step_decode(), mesh_undosys_step_decode(), particle_undosys_step_decode(), blender::ed::curves::undo::step_decode(), blender::ed::greasepencil::undo::step_decode(), and blender::ed::pointcloud::undo::step_decode().
| void ED_undo_object_set_active_or_warn | ( | Scene * | scene, |
| ViewLayer * | view_layer, | ||
| Object * | ob, | ||
| const char * | info, | ||
| CLG_LogRef * | log ) |
Definition at line 775 of file ed_undo.cc.
References ViewLayer::basact, blender::ed::object::base_active_refresh(), BKE_view_layer_active_object_get(), BKE_view_layer_base_find(), BKE_view_layer_synced_ensure(), CLOG_WARN, G_MAIN, Object::id, log, and ID::name.
Referenced by armature_undosys_step_decode(), curve_undosys_step_decode(), font_undosys_step_decode(), lattice_undosys_step_decode(), mball_undosys_step_decode(), mesh_undosys_step_decode(), particle_undosys_step_decode(), blender::ed::curves::undo::step_decode(), blender::ed::greasepencil::undo::step_decode(), and blender::ed::pointcloud::undo::step_decode().
| bool ED_undo_operator_repeat | ( | bContext * | C, |
| wmOperator * | op ) |
UI callbacks should call this rather than calling WM_operator_repeat() themselves.
Definition at line 631 of file ed_undo.cc.
References BKE_area_find_region_active_win(), C, wmOperatorType::check, CLOG_INFO, CLOG_WARN, CTX_data_scene(), CTX_wm_area(), CTX_wm_manager(), CTX_wm_region(), CTX_wm_region_popup(), CTX_wm_region_set(), ED_area_type_hud_redo_region_find(), ED_region_tag_refresh_ui(), ED_undo_pop_op(), ED_undo_redo(), G, G_DEBUG, wmOperatorType::idname, LOG, wmOperatorType::name, OPERATOR_FINISHED, printf, ARegion::regiontype, RGN_TYPE_HUD, wmOperator::type, WM_JOB_TYPE_ANY, WM_jobs_test(), WM_operator_free_all_after(), WM_operator_poll(), WM_operator_repeat(), and WM_operator_repeat_check().
Referenced by ED_undo_operator_repeat_cb(), ED_undo_operator_repeat_cb_evt(), ed_undo_redo_exec(), file_browse_exec(), gizmo_bisect_exec(), gizmo_placement_exec(), gizmo_spin_exec(), and wm_block_redo_cb().
| void ED_undo_operator_repeat_cb | ( | bContext * | C, |
| void * | arg_op, | ||
| void * | arg_unused ) |
Convenience since UI callbacks use this mostly.
Definition at line 708 of file ed_undo.cc.
References C, and ED_undo_operator_repeat().
| void ED_undo_operator_repeat_cb_evt | ( | bContext * | C, |
| void * | arg_op, | ||
| int | arg_unused ) |
Definition at line 713 of file ed_undo.cc.
References C, and ED_undo_operator_repeat().
Referenced by uiTemplateOperatorRedoProperties().
|
static |
Definition at line 549 of file ed_undo.cc.
References C, CTX_wm_manager(), ed_undo_is_init_and_screenactive_poll(), wmWindowManager::runtime, and undo_stack.
Referenced by ED_OT_undo().
| void ED_undo_pop | ( | bContext * | C | ) |
Definition at line 350 of file ed_undo.cc.
References C, ed_undo_step_direction(), and STEP_UNDO.
Referenced by redraw_timer_step().
| void ED_undo_pop_op | ( | bContext * | C, |
| wmOperator * | op ) |
Definition at line 375 of file ed_undo.cc.
References C, ed_undo_step_by_name(), wmOperatorType::name, wmOperator::reports, and wmOperator::type.
Referenced by ED_undo_operator_repeat(), and gizmo_tweak_start_and_finish().
| void ED_undo_push | ( | bContext * | C, |
| const char * | str ) |
Definition at line 98 of file ed_undo.cc.
References BKE_undosys_print(), BKE_undosys_stack_limit_steps_and_memory(), BKE_undosys_step_push(), C, CLG_LEVEL_DEBUG, CLOG_CHECK, CLOG_INFO, CTX_wm_manager(), G, LOG, memory_limit, NC_WM, ND_LIB_OVERRIDE_CHANGED, wmWindowManager::runtime, str, U, UNDO_PUSH_RET_OVERRIDE_CHANGED, WM_file_tag_modified(), and WM_main_add_notifier().
Referenced by blender::ed::space_node::attribute_search_exec_fn(), blender::nodes::attribute_search_exec_fn(), clear_render_border_exec(), colorband_add(), colorband_buttons_layout(), colorband_distribute(), colorband_flip(), colorband_tools_fn(), curve_profile_presets_fn(), curve_profile_tools_fn(), curvemap_tools_func(), delete_fmodifier_cb(), blender::ui::bonecollections::BoneCollectionItem::delete_item(), blender::ui::greasepencil::LayerGroupViewItem::delete_item(), blender::ui::greasepencil::LayerViewItem::delete_item(), blender::ed::outliner::do_outliner_item_editmode_toggle(), blender::ed::outliner::do_outliner_item_mode_toggle_generic(), blender::ed::outliner::do_outliner_item_posemode_toggle(), driver_add_var_cb(), driver_delete_var_cb(), blender::ed::asset_browser::AssetCatalogDropTarget::drop_assets_into_catalog(), drop_color_invoke(), ED_undo_grouped_push(), ed_undo_push_exec(), ED_undo_push_op(), blender::ui::greasepencil::eyedropper_add_material(), file_browse_exec(), fly_modal(), fmodifier_reorder(), gizmo_tweak_finish(), blender::ed::space_node::grid_search_exec_fn(), blender::io::usd::import_endjob(), import_endjob(), blender::nodes::layer_name_search_exec_fn(), blender::ed::space_node::layer_search_exec_fn(), blender::ed::outliner::namebutton_fn(), blender::ed::object::object_transfer_mode_to_base(), blender::ed::object::shapekey::ShapeKeyItem::on_activate(), blender::ui::bonecollections::BoneCollectionItem::on_activate(), blender::ui::greasepencil::LayerGroupViewItem::on_activate(), blender::ui::greasepencil::LayerViewItem::on_activate(), blender::ed::object::shapekey::ShapeKeyDropTarget::on_drop(), blender::ui::bonecollections::BoneCollectionDropTarget::on_drop(), blender::ui::greasepencil::LayerNodeDropTarget::on_drop(), blender::ed::outliner::outliner_action_set_exec(), blender::ed::outliner::outliner_animdata_operation_exec(), blender::ed::outliner::outliner_constraint_operation_exec(), blender::ed::outliner::outliner_data_operation_exec(), blender::ed::outliner::outliner_id_operation_exec(), blender::ed::outliner::outliner_lib_operation_exec(), blender::ed::outliner::outliner_liboverride_operation_exec(), blender::ed::outliner::outliner_modifier_operation_exec(), blender::ed::outliner::outliner_object_operation_exec(), blender::ed::outliner::outliner_scene_operation_exec(), pack_islands_endjob(), blender::ed::sculpt_paint::undo::push_multires_mesh_end(), radial_control_modal(), blender::ed::object::shapekey::ShapeKeyItem::rename(), blender::ui::bonecollections::BoneCollectionItem::rename(), blender::ui::greasepencil::LayerGroupViewItem::rename(), blender::ui::greasepencil::LayerViewItem::rename(), render_border_exec(), template_id_cb(), text_autocomplete_invoke(), text_autocomplete_modal(), ui_apply_but_funcs_after(), blender::ed::space_node::ui_node_link(), view3d_camera_lock_undo_ex(), view3d_collection_drop_copy_external_asset(), and walk_modal().
|
static |
Definition at line 479 of file ed_undo.cc.
References BKE_UNDO_STR_MAX, BKE_undosys_stack_create(), C, CTX_wm_manager(), ED_undo_push(), G, OPERATOR_FINISHED, wmOperator::ptr, RNA_string_get(), and str.
Referenced by ED_OT_undo_push().
| void ED_undo_push_op | ( | bContext * | C, |
| wmOperator * | op ) |
Definition at line 359 of file ed_undo.cc.
References C, ED_undo_push(), wmOperatorType::name, and wmOperator::type.
Referenced by image_clipboard_paste_exec(), new_texture_exec(), paint_mask_extract_exec(), blender::ed::animrig::pose_asset_delete_exec(), blender::ed::animrig::pose_asset_modify_exec(), wm_block_redo_cb(), wm_handler_fileselect_do(), and wm_operator_finished().
| void ED_undo_redo | ( | bContext * | C | ) |
Definition at line 354 of file ed_undo.cc.
References C, ed_undo_step_direction(), and STEP_REDO.
Referenced by ED_undo_operator_repeat(), and redraw_timer_step().
|
static |
Definition at line 505 of file ed_undo.cc.
References C, CTX_wm_window(), ED_undo_operator_repeat(), OPERATOR_CANCELLED, OPERATOR_FINISHED, ret, WM_event_add_mousemove(), and WM_operator_last_redo().
Referenced by ED_OT_undo_redo().
|
static |
Definition at line 542 of file ed_undo.cc.
References C, ed_undo_is_init_and_screenactive_poll(), wmOperatorType::name, wmOperator::type, WM_operator_check_ui_enabled(), and WM_operator_last_redo().
Referenced by ED_OT_undo_redo().
|
static |
Refresh to run after user activated undo/redo actions.
Definition at line 457 of file ed_undo.cc.
References C, CTX_wm_manager(), CTX_wm_window(), ED_outliner_select_sync_from_all_tag(), WM_event_add_mousemove(), and WM_operator_stack_clear().
Referenced by ed_redo_exec(), ed_undo_exec(), and undo_history_exec().
| UndoStack * ED_undo_stack_get | ( | ) |
Ideally we won't access the stack directly, this is needed for modes which handle undo themselves (bypassing ED_undo_push).
Using global isn't great, this just avoids doing inline, causing BKE_global.hh & BKE_main.hh includes.
Definition at line 442 of file ed_undo.cc.
References G_MAIN.
Referenced by bpy_app_memory_usage_undo(), blender::ed::sculpt_paint::dyntopo::disable_with_undo(), ED_image_paint_tile_map_get(), ED_image_undo_push(), ED_image_undo_push_end(), ED_paintcurve_undo_push_begin(), ED_paintcurve_undo_push_end(), ED_text_undo_push_init(), blender::ed::sculpt_paint::dyntopo::enable_with_undo(), blender::ed::sculpt_paint::undo::geometry_begin_ex(), blender::ed::sculpt_paint::undo::geometry_end(), blender::ed::sculpt_paint::undo::get_active_step(), image_undo_push_begin(), image_undosys_step_encode(), memfile_undosys_poll(), memfile_undosys_step_encode(), blender::ed::sculpt_paint::undo::push_begin_ex(), blender::ed::sculpt_paint::undo::push_enter_sculpt_mode(), text_undosys_poll(), and text_undosys_step_encode_init().
|
static |
Load the step matching given index in the stack. May undo or redo several steps at once. The target step will be the one indicated by the given index.
Definition at line 311 of file ed_undo.cc.
References BKE_undosys_step_load_from_index(), BLI_assert, BLI_findindex(), C, CLOG_INFO, CTX_wm_manager(), ed_undo_step_post(), ed_undo_step_pre(), LOG, OPERATOR_CANCELLED, OPERATOR_FINISHED, STEP_REDO, and STEP_UNDO.
Referenced by undo_history_exec().
|
static |
Undo the step matching given name. May undo several steps at once. The target step will be the one immediately before given named one.
Definition at line 267 of file ed_undo.cc.
References BKE_undosys_step_calc_direction(), BKE_undosys_step_find_by_name(), BKE_undosys_step_load_data_ex(), BLI_assert, C, CLOG_ERROR, CLOG_INFO, CTX_wm_manager(), ed_undo_step_post(), ed_undo_step_pre(), ELEM, LOG, OPERATOR_CANCELLED, OPERATOR_FINISHED, UndoStep::prev, STEP_REDO, and STEP_UNDO.
Referenced by ED_undo_pop_op().
|
static |
Undo or redo one step from current active one. May undo or redo several steps at once only if the target step is a 'skipped' one. The target step will be the one immediately before or after the active one.
Definition at line 238 of file ed_undo.cc.
References BKE_undosys_step_redo(), BKE_undosys_step_undo(), BLI_assert, C, CLOG_INFO, CTX_wm_manager(), ed_undo_step_post(), ed_undo_step_pre(), ELEM, LOG, OPERATOR_FINISHED, step, STEP_REDO, and STEP_UNDO.
Referenced by ed_redo_exec(), ed_undo_exec(), ED_undo_pop(), and ED_undo_redo().
|
static |
Common post management of undo/redo (calling post handlers, adding notifiers etc.).
Definition at line 194 of file ed_undo.cc.
References BKE_callback_exec_id(), BKE_CB_EVT_REDO_POST, BKE_CB_EVT_UNDO_POST, BKE_report(), BKE_undosys_print(), BLI_assert, BLO_main_validate_libraries(), C, CLG_LEVEL_DEBUG, CLOG_CHECK, CTX_data_main(), CTX_data_scene(), ELEM, G, G_DEBUG_IO, Scene::id, Main::lock, LOG, NC_WINDOW, NC_WM, ND_UNDO, RPT_INFO, STEP_REDO, STEP_UNDO, blender::ed::asset::list::storage_tag_main_data_dirty(), WM_event_add_notifier(), WM_toolsystem_refresh_active(), and WM_toolsystem_refresh_screen_all().
Referenced by ed_undo_step_by_index(), ed_undo_step_by_name(), and ed_undo_step_direction().
|
static |
Common pre management of undo/redo (killing all running jobs, calling pre handlers, etc.).
Definition at line 157 of file ed_undo.cc.
References BKE_callback_exec_id(), BKE_CB_EVT_REDO_PRE, BKE_CB_EVT_UNDO_PRE, BKE_report(), BLI_assert, BLO_main_validate_libraries(), C, CTX_data_main(), CTX_data_scene(), ELEM, G, G_DEBUG_IO, Scene::id, Main::lock, wmWindowManager::op_undo_depth, RPT_DEBUG, STEP_REDO, STEP_UNDO, and WM_jobs_kill_all().
Referenced by ed_undo_step_by_index(), ed_undo_step_by_name(), and ed_undo_step_direction().
| size_t ED_undosys_total_memory_calc | ( | UndoStack * | ustack | ) |
Get the total memory usage of all undo steps in the current undo stack.
This function iterates through all undo steps and calculates their memory consumption. For sculpt undo steps, it uses the specialized sculpt memory calculation function. For other undo step types, it uses the generic data_size field.
Definition at line 916 of file ed_undo.cc.
References BKE_UNDOSYS_TYPE_SCULPT, ListBase::first, UndoStep::next, blender::ed::sculpt_paint::undo::step_memory_size_get(), and UndoStack::steps.
Referenced by bpy_app_memory_usage_undo().
|
static |
Definition at line 727 of file ed_undo.cc.
References C, ed_undo_refresh_for_op(), ed_undo_step_by_index(), NC_WINDOW, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, ret, RNA_property_int_get(), RNA_property_is_set(), RNA_struct_find_property(), and WM_event_add_notifier().
Referenced by ED_OT_undo_history(), and undo_history_invoke().
|
static |
Definition at line 743 of file ed_undo.cc.
References C, blender::wm::InvokeDefault, OPERATOR_FINISHED, wmOperator::ptr, RNA_property_is_set(), RNA_struct_find_property(), undo_history_exec(), and WM_menu_name_call().
Referenced by ED_OT_undo_history().
|
static |
We only need this locally.
Definition at line 55 of file ed_undo.cc.