Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-12-08 16:55:11 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-12-08 17:14:10 +0300
commit61776befc3f88c373e47ccbdf8c75e2ca0f4e987 (patch)
tree0214b7c5146300d41b7bcbe99f87c92599608e7f /source/blender/editors/undo
parent8f1997975dc60bc1c18992458603ecd58dfded6d (diff)
Cleanup: move public doc-strings into headers for 'editors'
Ref T92709
Diffstat (limited to 'source/blender/editors/undo')
-rw-r--r--source/blender/editors/undo/ed_undo.c23
-rw-r--r--source/blender/editors/undo/memfile_undo.c16
-rw-r--r--source/blender/editors/undo/undo_intern.h2
3 files changed, 2 insertions, 39 deletions
diff --git a/source/blender/editors/undo/ed_undo.c b/source/blender/editors/undo/ed_undo.c
index fa722d0646a..ca8b86d525d 100644
--- a/source/blender/editors/undo/ed_undo.c
+++ b/source/blender/editors/undo/ed_undo.c
@@ -77,9 +77,6 @@ static CLG_LogRef LOG = {"ed.undo"};
* Non-operator undo editor functions.
* \{ */
-/**
- * Run from the main event loop, basic checks that undo is left in a correct state.
- */
bool ED_undo_is_state_valid(bContext *C)
{
wmWindowManager *wm = CTX_wm_manager(C);
@@ -438,7 +435,6 @@ void ED_undo_pop_op(bContext *C, wmOperator *op)
ed_undo_step_by_name(C, op->type->name, op->reports);
}
-/* name optionally, function used to check for operator redo panel */
bool ED_undo_is_valid(const bContext *C, const char *undoname)
{
wmWindowManager *wm = CTX_wm_manager(C);
@@ -461,14 +457,6 @@ bool ED_undo_is_memfile_compatible(const bContext *C)
return true;
}
-/**
- * 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: T61948.
- */
bool ED_undo_is_legacy_compatible_for_property(struct bContext *C, ID *id)
{
ViewLayer *view_layer = CTX_data_view_layer(C);
@@ -494,13 +482,6 @@ bool ED_undo_is_legacy_compatible_for_property(struct bContext *C, ID *id)
return true;
}
-/**
- * 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.h' & 'BKE_main.h' includes.
- */
UndoStack *ED_undo_stack_get(void)
{
wmWindowManager *wm = G_MAIN->wm.first;
@@ -682,7 +663,6 @@ void ED_OT_undo_redo(wmOperatorType *ot)
/** \name Operator Repeat
* \{ */
-/* ui callbacks should call this rather than calling WM_operator_repeat() themselves */
int ED_undo_operator_repeat(bContext *C, wmOperator *op)
{
int ret = 0;
@@ -899,9 +879,6 @@ void ED_undo_object_set_active_or_warn(
}
}
-/**
- * Load all our objects from `object_array` into edit-mode, clear everything else.
- */
void ED_undo_object_editmode_restore_helper(struct bContext *C,
Object **object_array,
uint object_array_len,
diff --git a/source/blender/editors/undo/memfile_undo.c b/source/blender/editors/undo/memfile_undo.c
index ad3b4162f89..b6ad5603808 100644
--- a/source/blender/editors/undo/memfile_undo.c
+++ b/source/blender/editors/undo/memfile_undo.c
@@ -325,7 +325,6 @@ static void memfile_undosys_step_free(UndoStep *us_p)
BKE_memfile_undo_free(us->data);
}
-/* Export for ED_undo_sys. */
void ED_memfile_undosys_type(UndoType *ut)
{
ut->name = "Global Undo";
@@ -364,21 +363,6 @@ struct MemFile *ED_undosys_stack_memfile_get_active(UndoStack *ustack)
return NULL;
}
-/**
- * If the last undo step is a memfile one, find the first #MemFileChunk matching given ID
- * (using its session UUID), and tag it as "changed in the future".
- *
- * Since non-memfile undo-steps cannot automatically set this flag in the previous step as done
- * with memfile ones, this has to be called manually by relevant undo code.
- *
- * \note Only current known case for this is undoing a switch from Object to Sculpt mode (see
- * T82388).
- *
- * \note Calling this ID by ID is not optimal, as it will loop over all #MemFile.chunks until it
- * finds the expected one. If this becomes an issue we'll have to add a mapping from session UUID
- * to first #MemFileChunk in #MemFile itself
- * (currently we only do that in #MemFileWriteData when writing a new step).
- */
void ED_undosys_stack_memfile_id_changed_tag(UndoStack *ustack, ID *id)
{
UndoStep *us = ustack->step_active;
diff --git a/source/blender/editors/undo/undo_intern.h b/source/blender/editors/undo/undo_intern.h
index 660f1a5b57d..d27bc1c8c0a 100644
--- a/source/blender/editors/undo/undo_intern.h
+++ b/source/blender/editors/undo/undo_intern.h
@@ -25,4 +25,6 @@
struct UndoType;
/* memfile_undo.c */
+
+/** Export for ED_undo_sys. */
void ED_memfile_undosys_type(struct UndoType *ut);