Blender V5.3
ed_undo.cc File Reference
#include <atomic>
#include <cstring>
#include "CLG_log.h"
#include "DNA_key_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BLI_listbase.hh"
#include "BLI_task_c.hh"
#include "BLI_utildefines.hh"
#include "BLI_vector.hh"
#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_object.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"
#include "RNA_prototypes.hh"

Go to the source code of this file.

Namespaces

namespace  blender
 BMesh Iterators.

Functions

Generic Undo System Access

Non-operator undo editor functions.

bool blender::ED_undo_is_state_valid (bContext *C)
void blender::ED_undo_group_begin (bContext *C)
void blender::ED_undo_group_end (bContext *C)
void blender::ED_undo_push (bContext *C, const char *str, UndoEncodeHints hints=UndoEncodeHints(0))
static void blender::ed_undo_step_pre (bContext *C, wmWindowManager *wm, const enum eUndoStepDir undo_dir, ReportList *reports)
static void blender::ed_undo_step_post (bContext *C, wmWindowManager *wm, const enum eUndoStepDir undo_dir, ReportList *reports)
static wmOperatorStatus blender::ed_undo_step_direction (bContext *C, enum eUndoStepDir step, ReportList *reports)
static int blender::ed_undo_step_by_name (bContext *C, const char *undo_name, ReportList *reports)
static int blender::ed_undo_step_by_index (bContext *C, const int undo_index, ReportList *reports)
static bool blender::ed_undo_grouped_check_by_name (const UndoStack *ustack, const char *str)
void blender::ED_undo_grouped_push (bContext *C, const char *str, UndoEncodeHints hints=UndoEncodeHints(0))
void blender::ED_undo_pop (bContext *C)
void blender::ED_undo_redo (bContext *C)
static void blender::ed_undo_push_check_id_changes_fn (TaskPool *__restrict pool, void *taskdata)
static bool blender::ed_undo_push_check_id_changes_outside_mode (Main *bmain)
static UndoEncodeHints blender::undo_encode_hints_from_context (bContext *C, const char *str)
void blender::ED_undo_push_op (bContext *C, wmOperator *op)
void blender::ED_undo_grouped_push_op (bContext *C, wmOperator *op)
void blender::ED_undo_pop_op (bContext *C, wmOperator *op)
bool blender::ED_undo_is_valid (const bContext *C, const char *undoname)
bool blender::ED_undo_has_redo_step (const bContext *C)
bool blender::ED_undo_is_memfile_compatible (const bContext *C)
std::optional< UndoEncodeHints > blender::ED_undo_is_legacy_compatible_for_property (bContext *C, ID *id, const PointerRNA &ptr, const PropertyRNA &prop)
UndoStack * blender::ED_undo_stack_get ()
Undo, Undo Push & Redo Operators
static void blender::ed_undo_refresh_for_op (bContext *C)
static wmOperatorStatus blender::ed_undo_exec (bContext *C, wmOperator *op)
static wmOperatorStatus blender::ed_undo_push_exec (bContext *C, wmOperator *op)
static wmOperatorStatus blender::ed_redo_exec (bContext *C, wmOperator *op)
static wmOperatorStatus blender::ed_undo_redo_exec (bContext *C, wmOperator *)
static bool blender::ed_undo_is_init_poll (bContext *C)
static bool blender::ed_undo_is_init_and_screenactive_poll (bContext *C)
static bool blender::ed_undo_redo_poll (bContext *C)
static bool blender::ed_undo_poll (bContext *C)
void blender::ED_OT_undo (wmOperatorType *ot)
void blender::ED_OT_undo_push (wmOperatorType *ot)
static bool blender::ed_redo_poll (bContext *C)
void blender::ED_OT_redo (wmOperatorType *ot)
void blender::ED_OT_undo_redo (wmOperatorType *ot)
Operator Repeat
bool blender::ED_undo_operator_repeat (bContext *C, wmOperator *op)
void blender::ED_undo_operator_repeat_cb (bContext *C, void *arg_op, void *arg_unused)
void blender::ED_undo_operator_repeat_cb_evt (bContext *C, void *arg_op, int arg_unused)
Undo History Operator

See TOPBAR_MT_undo_history which is used to access this operator.

static wmOperatorStatus blender::undo_history_exec (bContext *C, wmOperator *op)
static wmOperatorStatus blender::undo_history_invoke (bContext *C, wmOperator *op, const wmEvent *)
void blender::ED_OT_undo_history (wmOperatorType *ot)
Undo Helper Functions
void blender::ED_undo_object_set_active_or_warn (const Main &bmain, Scene *scene, ViewLayer *view_layer, Object *ob, const char *info, CLG_LogRef *log)
void blender::ED_undo_object_editmode_validate_scene_from_windows (wmWindowManager *wm, const Scene *scene_ref, Scene **scene_p, ViewLayer **view_layer_p)
void blender::ED_undo_object_editmode_restore_helper (Scene *scene, ViewLayer *view_layer, Object **object_array, uint object_array_len, uint object_array_stride)
Undo View Layer Helper Functions

Needed because view layer functions such as BKE_view_layer_array_from_objects_in_edit_mode_unique_data also check visibility, which is not reliable when it comes to object undo operations, since hidden objects can be operated on in the properties editor, and local collections may be used.

Vector< Object * > blender::ED_undo_editmode_objects_from_view_layer (const Main &bmain, const Scene *scene, ViewLayer *view_layer)
Vector< Base * > blender::ED_undo_editmode_bases_from_view_layer (const Main &bmain, const Scene *scene, ViewLayer *view_layer)
size_t blender::ED_undosys_total_memory_calc (UndoStack *ustack)

Variables

static CLG_LogRef blender::LOG = {"undo"}