Blender V5.0
ED_undo.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "BLI_sys_types.h"
12#include "BLI_vector.hh"
13
14struct Base;
15struct CLG_LogRef;
16struct ID;
17struct MemFile;
18struct PointerRNA;
19struct Object;
20struct Scene;
21struct UndoStack;
22struct ViewLayer;
23struct bContext;
24struct wmOperator;
25struct wmOperatorType;
26struct wmWindowManager;
27
28/* undo.c */
29
36void ED_undo_push(bContext *C, const char *str);
38void ED_undo_grouped_push(bContext *C, const char *str);
48
58void ED_undo_operator_repeat_cb(bContext *C, void *arg_op, void *arg_unused);
59void ED_undo_operator_repeat_cb_evt(bContext *C, void *arg_op, int arg_unused);
60
64bool ED_undo_is_valid(const bContext *C, const char *undoname);
65
67
68/* Unfortunate workaround for limits mixing undo systems. */
69
79
95 const Scene *scene_ref,
96 Scene **scene_p,
97 ViewLayer **view_layer_p);
98
103 ViewLayer *view_layer,
104 Object **object_array,
105 uint object_array_len,
106 uint object_array_stride);
107
109 ViewLayer *view_layer);
111 ViewLayer *view_layer);
112
121
122/* Helpers. */
123
125 Scene *scene, ViewLayer *view_layer, Object *ob, const char *info, CLG_LogRef *log);
126
127/* `undo_system_types.cc` */
128
131
132/* `memfile_undo.cc` */
133
unsigned int uint
void ED_undo_object_set_active_or_warn(Scene *scene, ViewLayer *view_layer, Object *ob, const char *info, CLG_LogRef *log)
Definition ed_undo.cc:775
void ED_undo_push(bContext *C, const char *str)
Definition ed_undo.cc:98
bool ED_undo_is_legacy_compatible_for_property(bContext *C, ID *id, PointerRNA &ptr)
Definition ed_undo.cc:405
void ED_OT_redo(wmOperatorType *ot)
Definition ed_undo.cc:601
UndoStack * ED_undo_stack_get()
Definition ed_undo.cc:442
blender::Vector< Base * > ED_undo_editmode_bases_from_view_layer(const Scene *scene, ViewLayer *view_layer)
Definition ed_undo.cc:886
void ED_undosys_type_free()
void ED_undosys_type_init()
void ED_undo_push_op(bContext *C, wmOperator *op)
Definition ed_undo.cc:359
void ED_undosys_stack_memfile_id_changed_tag(UndoStack *ustack, ID *id)
void ED_undo_pop_op(bContext *C, wmOperator *op)
Definition ed_undo.cc:375
MemFile * ED_undosys_stack_memfile_get_if_active(UndoStack *ustack)
void ED_undo_group_begin(bContext *C)
Definition ed_undo.cc:86
size_t ED_undosys_total_memory_calc(UndoStack *ustack)
Definition ed_undo.cc:916
bool ED_undo_is_valid(const bContext *C, const char *undoname)
Definition ed_undo.cc:381
void ED_OT_undo_redo(wmOperatorType *ot)
Definition ed_undo.cc:613
void ED_OT_undo_push(wmOperatorType *ot)
Definition ed_undo.cc:570
void ED_undo_operator_repeat_cb_evt(bContext *C, void *arg_op, int arg_unused)
Definition ed_undo.cc:713
void ED_undo_operator_repeat_cb(bContext *C, void *arg_op, void *arg_unused)
Definition ed_undo.cc:708
void ED_undo_redo(bContext *C)
Definition ed_undo.cc:354
bool ED_undo_is_state_valid(bContext *C)
Definition ed_undo.cc:63
void ED_OT_undo(wmOperatorType *ot)
Definition ed_undo.cc:558
bool ED_undo_operator_repeat(bContext *C, wmOperator *op)
Definition ed_undo.cc:631
void ED_OT_undo_history(wmOperatorType *ot)
Definition ed_undo.cc:754
void ED_undo_object_editmode_restore_helper(Scene *scene, ViewLayer *view_layer, Object **object_array, uint object_array_len, uint object_array_stride)
Definition ed_undo.cc:811
void ED_undo_grouped_push_op(bContext *C, wmOperator *op)
Definition ed_undo.cc:365
blender::Vector< Object * > ED_undo_editmode_objects_from_view_layer(const Scene *scene, ViewLayer *view_layer)
Definition ed_undo.cc:856
bool ED_undo_is_memfile_compatible(const bContext *C)
Definition ed_undo.cc:387
void ED_undo_pop(bContext *C)
Definition ed_undo.cc:350
void ED_undo_object_editmode_validate_scene_from_windows(wmWindowManager *wm, const Scene *scene_ref, Scene **scene_p, ViewLayer **view_layer_p)
Definition ed_undo.cc:794
void ED_undo_group_end(bContext *C)
Definition ed_undo.cc:92
void ED_undo_grouped_push(bContext *C, const char *str)
Definition ed_undo.cc:337
#define C
Definition RandGen.cpp:29
#define str(s)
#define log
Definition DNA_ID.h:414
PointerRNA * ptr
Definition wm_files.cc:4238
wmOperatorType * ot
Definition wm_files.cc:4237