[Bf-blender-cvs] [4ffa05c30b1] master: Cleanup: move undo into it's own directory
Campbell Barton
noreply at git.blender.org
Mon Apr 2 15:08:02 CEST 2018
Commit: 4ffa05c30b10eb8a07dd0a9b43466f6d11bc1364
Author: Campbell Barton
Date: Mon Apr 2 15:02:08 2018 +0200
Branches: master
https://developer.blender.org/rB4ffa05c30b10eb8a07dd0a9b43466f6d11bc1364
Cleanup: move undo into it's own directory
Split out undo API from ED_util.h into ED_undo.h
===================================================================
M build_files/cmake/macros.cmake
M doc/doxygen/doxygen.source.h
M source/blender/editors/CMakeLists.txt
M source/blender/editors/animation/fmodifier_ui.c
M source/blender/editors/armature/editarmature_retarget.c
M source/blender/editors/curve/editcurve_add.c
A source/blender/editors/include/ED_undo.h
M source/blender/editors/include/ED_util.h
M source/blender/editors/interface/interface_handlers.c
M source/blender/editors/interface/interface_templates.c
M source/blender/editors/object/object_edit.c
M source/blender/editors/render/render_internal.c
M source/blender/editors/screen/screen_ops.c
M source/blender/editors/space_buttons/buttons_ops.c
M source/blender/editors/space_clip/clip_toolbar.c
M source/blender/editors/space_graph/graph_buttons.c
M source/blender/editors/space_logic/logic_window.c
M source/blender/editors/space_node/node_templates.c
M source/blender/editors/space_outliner/outliner_select.c
M source/blender/editors/space_outliner/outliner_tools.c
M source/blender/editors/space_view3d/view3d_header.c
M source/blender/editors/space_view3d/view3d_toolbar.c
A source/blender/editors/undo/CMakeLists.txt
R094 source/blender/editors/util/undo.c source/blender/editors/undo/ed_undo.c
R097 source/blender/editors/util/memfile_undo.c source/blender/editors/undo/memfile_undo.c
R075 source/blender/editors/util/util_intern.h source/blender/editors/undo/undo_intern.h
R096 source/blender/editors/util/undo_system_types.c source/blender/editors/undo/undo_system_types.c
M source/blender/editors/util/CMakeLists.txt
M source/blender/windowmanager/intern/wm_event_system.c
M source/blender/windowmanager/intern/wm_files.c
M source/blender/windowmanager/intern/wm_init_exit.c
M source/blender/windowmanager/intern/wm_operators.c
===================================================================
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 3f0868229e2..d159bde845d 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -559,8 +559,7 @@ function(SETUP_BLENDER_SORTED_LIBS)
set(BLENDER_SORTED_LIBS
bf_windowmanager
- # needed twice because of text undo
- bf_editor_util
+ bf_editor_undo
bf_editor_space_api
bf_editor_space_action
diff --git a/doc/doxygen/doxygen.source.h b/doc/doxygen/doxygen.source.h
index 16ebe407f5f..9390193ae20 100644
--- a/doc/doxygen/doxygen.source.h
+++ b/doc/doxygen/doxygen.source.h
@@ -316,6 +316,10 @@
* \ingroup editors
*/
+/** \defgroup edundo undo utilities
+ * \ingroup editors
+ */
+
/** \defgroup spuv UV editing
* \ingroup editors
*/
diff --git a/source/blender/editors/CMakeLists.txt b/source/blender/editors/CMakeLists.txt
index be8829b0418..17a8eef1bdb 100644
--- a/source/blender/editors/CMakeLists.txt
+++ b/source/blender/editors/CMakeLists.txt
@@ -59,6 +59,7 @@ if(WITH_BLENDER)
add_subdirectory(space_userpref)
add_subdirectory(space_view3d)
add_subdirectory(transform)
+ add_subdirectory(undo)
add_subdirectory(util)
add_subdirectory(uvedit)
endif()
diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c
index 8d77460e197..8106be79521 100644
--- a/source/blender/editors/animation/fmodifier_ui.c
+++ b/source/blender/editors/animation/fmodifier_ui.c
@@ -62,7 +62,7 @@
#include "UI_resources.h"
#include "ED_anim_api.h"
-#include "ED_util.h"
+#include "ED_undo.h"
/* ********************************************** */
/* UI STUFF */
diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c
index 2fb216c2ef8..3dd41f25e09 100644
--- a/source/blender/editors/armature/editarmature_retarget.c
+++ b/source/blender/editors/armature/editarmature_retarget.c
@@ -42,7 +42,7 @@
#include "BKE_context.h"
#include "ED_armature.h"
-#include "ED_util.h"
+#include "ED_undo.h"
#include "BIF_retarget.h"
diff --git a/source/blender/editors/curve/editcurve_add.c b/source/blender/editors/curve/editcurve_add.c
index cc8e272d4f7..b23f0f967ec 100644
--- a/source/blender/editors/curve/editcurve_add.c
+++ b/source/blender/editors/curve/editcurve_add.c
@@ -52,7 +52,7 @@
#include "ED_object.h"
#include "ED_screen.h"
-#include "ED_util.h"
+#include "ED_undo.h"
#include "ED_view3d.h"
#include "ED_curve.h"
diff --git a/source/blender/editors/include/ED_util.h b/source/blender/editors/include/ED_undo.h
similarity index 68%
copy from source/blender/editors/include/ED_util.h
copy to source/blender/editors/include/ED_undo.h
index 5a373cebac1..044d69cfced 100644
--- a/source/blender/editors/include/ED_util.h
+++ b/source/blender/editors/include/ED_undo.h
@@ -15,42 +15,20 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * The Original Code is Copyright (C) 2008 Blender Foundation.
- * All rights reserved.
- *
- *
- * Contributor(s): Blender Foundation
- *
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file ED_util.h
+/** \file ED_undo.h
* \ingroup editors
*/
-#ifndef __ED_UTIL_H__
-#define __ED_UTIL_H__
+#ifndef __ED_UNDO_H__
+#define __ED_UNDO_H__
struct bContext;
-struct SpaceLink;
struct wmOperator;
struct wmOperatorType;
struct UndoStack;
-struct ScrArea;
-struct PackedFile;
-
-/* ed_util.c */
-
-void ED_editors_init(struct bContext *C);
-void ED_editors_exit(struct bContext *C);
-
-bool ED_editors_flush_edits(const struct bContext *C, bool for_render);
-
-void ED_spacedata_id_remap(struct ScrArea *sa, struct SpaceLink *sl, struct ID *old_id, struct ID *new_id);
-
-void ED_OT_flush_edits(struct wmOperatorType *ot);
-
-/* ************** Undo ************************ */
/* undo.c */
void ED_undo_push(struct bContext *C, const char *str);
@@ -80,12 +58,5 @@ void ED_undosys_type_free(void);
/* memfile_undo.c */
struct MemFile *ED_undosys_stack_memfile_get_active(struct UndoStack *ustack);
-/* ************** XXX OLD CRUFT WARNING ************* */
-
-void apply_keyb_grid(int shift, int ctrl, float *val, float fac1, float fac2, float fac3, int invert);
-
-/* where else to go ? */
-void unpack_menu(struct bContext *C, const char *opname, const char *id_name, const char *abs_name, const char *folder, struct PackedFile *pf);
-
-#endif /* __ED_UTIL_H__ */
+#endif /* __ED_UNDO_H__ */
diff --git a/source/blender/editors/include/ED_util.h b/source/blender/editors/include/ED_util.h
index 5a373cebac1..2653585dacc 100644
--- a/source/blender/editors/include/ED_util.h
+++ b/source/blender/editors/include/ED_util.h
@@ -32,11 +32,9 @@
#define __ED_UTIL_H__
struct bContext;
-struct SpaceLink;
-struct wmOperator;
struct wmOperatorType;
-struct UndoStack;
struct ScrArea;
+struct SpaceLink;
struct PackedFile;
/* ed_util.c */
@@ -50,36 +48,6 @@ void ED_spacedata_id_remap(struct ScrArea *sa, struct SpaceLink *sl, struct I
void ED_OT_flush_edits(struct wmOperatorType *ot);
-/* ************** Undo ************************ */
-
-/* undo.c */
-void ED_undo_push(struct bContext *C, const char *str);
-void ED_undo_push_op(struct bContext *C, struct wmOperator *op);
-void ED_undo_grouped_push(struct bContext *C, const char *str);
-void ED_undo_grouped_push_op(struct bContext *C, struct wmOperator *op);
-void ED_undo_pop_op(struct bContext *C, struct wmOperator *op);
-void ED_undo_pop(struct bContext *C);
-void ED_undo_redo(struct bContext *C);
-void ED_OT_undo(struct wmOperatorType *ot);
-void ED_OT_undo_push(struct wmOperatorType *ot);
-void ED_OT_redo(struct wmOperatorType *ot);
-void ED_OT_undo_redo(struct wmOperatorType *ot);
-void ED_OT_undo_history(struct wmOperatorType *ot);
-
-int ED_undo_operator_repeat(struct bContext *C, struct wmOperator *op);
-/* convenience since UI callbacks use this mostly*/
-void ED_undo_operator_repeat_cb(struct bContext *C, void *arg_op, void *arg_unused);
-void ED_undo_operator_repeat_cb_evt(struct bContext *C, void *arg_op, int arg_unused);
-
-bool ED_undo_is_valid(const struct bContext *C, const char *undoname);
-
-/* undo_system_types.c */
-void ED_undosys_type_init(void);
-void ED_undosys_type_free(void);
-
-/* memfile_undo.c */
-struct MemFile *ED_undosys_stack_memfile_get_active(struct UndoStack *ustack);
-
/* ************** XXX OLD CRUFT WARNING ************* */
void apply_keyb_grid(int shift, int ctrl, float *val, float fac1, float fac2, float fac3, int invert);
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index bf39a8d353f..9f7cd62227c 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -74,7 +74,7 @@
#include "BKE_paint.h"
#include "ED_screen.h"
-#include "ED_util.h"
+#include "ED_undo.h"
#include "ED_keyframing.h"
#include "UI_interface.h"
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 82a502db0ad..b92216138fd 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -75,7 +75,7 @@
#include "ED_screen.h"
#include "ED_object.h"
#include "ED_render.h"
-#include "ED_util.h"
+#include "ED_undo.h"
#include "RNA_access.h"
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index cbdc9685f2c..c83e25fa9c2 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -94,7 +94,7 @@
#include "ED_lattice.h"
#include "ED_object.h"
#include "ED_screen.h"
-#include "ED_util.h"
+#include "ED_undo.h"
#include "ED_image.h"
#include "RNA_access.h"
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c
index 92fb140243f..d81b85f1414 100644
--- a/source/blender/editors/render/render_internal.c
+++ b/source/blender/editors/render/render_internal.c
@@ -74,6 +74,7 @@
#include "ED_render.h"
#include "ED_screen.h"
#include "ED_util.h"
+#include "ED_undo.h"
#include "ED_view3d.h"
#include "RE_pipeline.h"
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 2bf2c532ded..62113cafebb 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -74,6 +74,7 @@
#include "ED_screen_types.h"
#include "ED_sequencer.h"
#include "ED_util.h"
+#include "ED_undo.h"
#include "ED_view3d.h"
#include "RNA_access.h"
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c
index fc1b6877f5e..2a703ebb46c 100644
--- a/source/blender/editors/space_buttons/buttons_ops.c
+++ b/source/blender/editors/space_buttons/buttons_ops.c
@@ -51,7 +51,7 @@
#include "WM_types.h"
#include "ED_screen.h"
-#include "ED_util.h"
+#include "ED_undo.h"
#include "RNA_access.h"
diff --git a/source/blender/editors/space_clip/clip_toolbar.c b/source/blender/editors/space_clip/clip_toolbar.c
index 1504ce1a7ba..d2a7244eded 100644
--- a/source/blender/editors/space_clip/clip_toolbar.c
+++ b/source/blender/editors/space_clip/clip_toolbar.c
@@ -49,7 +49,7 @@
#include "WM_api.h"
#include "ED_screen.h"
-#include "ED_util.h"
+#include "ED_undo.h"
#include "UI_interface.h"
#include "UI_resources.h"
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c
index df6bd01144d..1ada5538fe3 100644
--- a/source/blender/editors/space_graph/graph_buttons.c
+++ b/source/blender/editors/space_graph/graph_buttons.c
@@ -64,7 +64,7 @@
#include "ED_anim_api.h"
#include "ED_keyframing.h"
#include "ED_screen.h"
-#include "ED_util.h"
+#include "ED_undo.h"
#include "UI_interface.h"
#include "UI_resources.h"
diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c
index e
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list