Cleanup: move undo into it's own directory
authorCampbell Barton <ideasman42@gmail.com>
Mon, 2 Apr 2018 13:02:08 +0000 (15:02 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 2 Apr 2018 13:07:40 +0000 (15:07 +0200)
Split out undo API from ED_util.h into ED_undo.h

32 files changed:
build_files/cmake/macros.cmake
doc/doxygen/doxygen.source.h
source/blender/editors/CMakeLists.txt
source/blender/editors/animation/fmodifier_ui.c
source/blender/editors/armature/editarmature_retarget.c
source/blender/editors/curve/editcurve_add.c
source/blender/editors/include/ED_undo.h [new file with mode: 0644]
source/blender/editors/include/ED_util.h
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/object/object_edit.c
source/blender/editors/render/render_internal.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/space_buttons/buttons_ops.c
source/blender/editors/space_clip/clip_toolbar.c
source/blender/editors/space_graph/graph_buttons.c
source/blender/editors/space_logic/logic_window.c
source/blender/editors/space_node/node_templates.c
source/blender/editors/space_outliner/outliner_select.c
source/blender/editors/space_outliner/outliner_tools.c
source/blender/editors/space_view3d/view3d_header.c
source/blender/editors/space_view3d/view3d_toolbar.c
source/blender/editors/undo/CMakeLists.txt [new file with mode: 0644]
source/blender/editors/undo/ed_undo.c [moved from source/blender/editors/util/undo.c with 94% similarity]
source/blender/editors/undo/memfile_undo.c [moved from source/blender/editors/util/memfile_undo.c with 97% similarity]
source/blender/editors/undo/undo_intern.h [moved from source/blender/editors/util/util_intern.h with 75% similarity]
source/blender/editors/undo/undo_system_types.c [moved from source/blender/editors/util/undo_system_types.c with 96% similarity]
source/blender/editors/util/CMakeLists.txt
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_init_exit.c
source/blender/windowmanager/intern/wm_operators.c

index 3f0868229e2f184e824dc3d58c68862909d3c095..d159bde845d4661da076ba2f5b2347a2f0412655 100644 (file)
@@ -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
index 16ebe407f5f4479e5de1e10b764e0cc88f0204f9..9390193ae2025579f4d6263e1833089004f53846 100644 (file)
  *  \ingroup editors
  */
 
+/** \defgroup edundo undo utilities
+ *  \ingroup editors
+ */
+
 /** \defgroup spuv UV editing
  *  \ingroup editors
  */
index be8829b04185a95d06c51f58f324d9e2f4da0df8..17a8eef1bdb2af24fe56082012a2e4c3d7fbd1c2 100644 (file)
@@ -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()
index 8d77460e19701f693f528ae70542d739b28a0221..8106be79521dddcd074b7333f855849ae7d9bba9 100644 (file)
@@ -62,7 +62,7 @@
 #include "UI_resources.h"
 
 #include "ED_anim_api.h"
-#include "ED_util.h"
+#include "ED_undo.h"
 
 /* ********************************************** */
 /* UI STUFF */
index 2fb216c2ef8b71da0478005e66a9e2a8a6ea28c4..3dd41f25e0924bc970985f282295984ab21fbaf8 100644 (file)
@@ -42,7 +42,7 @@
 #include "BKE_context.h"
 
 #include "ED_armature.h"
-#include "ED_util.h"
+#include "ED_undo.h"
 
 #include "BIF_retarget.h"
 
index cc8e272d4f78a73a63c3e7ba2bd3ea185d0cb1a2..b23f0f967ec79d1b4ce2063f1a594da31fc7213e 100644 (file)
@@ -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_undo.h b/source/blender/editors/include/ED_undo.h
new file mode 100644 (file)
index 0000000..044d69c
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version. 
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file ED_undo.h
+ *  \ingroup editors
+ */
+
+#ifndef __ED_UNDO_H__
+#define __ED_UNDO_H__
+
+struct bContext;
+struct wmOperator;
+struct wmOperatorType;
+struct UndoStack;
+
+/* 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);
+
+#endif /* __ED_UNDO_H__ */
+
index 5a373cebac1bbf845c32bb13f47182ee1eb844ea..2653585dacca7d9be9158d6e93774cbe29b4d97f 100644 (file)
 #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);
index bf39a8d353fb2a1dadfb4ef118aab1d1359d40ce..9f7cd62227c606720fe3671abc23cb16d0ebecf7 100644 (file)
@@ -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"
index 82a502db0adac6fd2f404c70e7eda79927c34f27..b92216138fd74957b48c74043eb9cce5618ffb2e 100644 (file)
@@ -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"
 
index cbdc9685f2c5d7c8815d21d87eb1231907f4779f..c83e25fa9c28335df2afb85619c5684c24a72b14 100644 (file)
@@ -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"
index 92fb140243f7d50366037e5f605c49b747086371..d81b85f141440e18e2bc9d0b5f17acf7a1b01d61 100644 (file)
@@ -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"
index 2bf2c532dedba74448e7ae10752c09b87e63c86a..62113cafebb53039777c94e71129995638357fa4 100644 (file)
@@ -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"
index fc1b6877f5eb3cacf63a05e3e7ca2221073ffdc2..2a703ebb46c777708da54e40a8865d88664d9494 100644 (file)
@@ -51,7 +51,7 @@
 #include "WM_types.h"
 
 #include "ED_screen.h"
-#include "ED_util.h"
+#include "ED_undo.h"
 
 #include "RNA_access.h"
 
index 1504ce1a7bafb0edc3d4d3a6088d4942b6f98635..d2a7244ededff071c56b82974c44e80c3e49078f 100644 (file)
@@ -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"
index df6bd01144da682ab611ad5aaf194eb262d9f7b7..1ada5538fe39f22f04fb7a6ff100889301e91f2e 100644 (file)
@@ -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"
index e1a31be4afbc73920432a9c82357cf65831831e7..4dd3f3692045a249a70476010998752725a11772 100644 (file)
@@ -56,7 +56,7 @@
 #include "BKE_main.h"
 #include "BKE_sca.h"
 
-#include "ED_util.h"
+#include "ED_undo.h"
 
 #include "BLT_translation.h"
 
index 508a16926e67de8b86d69c40c19ebf47ba8d2a02..173c919e38cbb8be4f40b9f7f58cae2a993f53a5 100644 (file)
@@ -53,7 +53,7 @@
 
 #include "ED_node.h"  /* own include */
 
-#include "ED_util.h"
+#include "ED_undo.h"
 
 
 /************************* Node Socket Manipulation **************************/
index 12b9d273a47e77453554d48f74476b034a1f9627..7166e870f6e6bb78206c5740b2c720e54b976b63 100644 (file)
@@ -54,7 +54,7 @@
 #include "ED_object.h"
 #include "ED_screen.h"
 #include "ED_sequencer.h"
-#include "ED_util.h"
+#include "ED_undo.h"
 
 #include "WM_api.h"
 #include "WM_types.h"
index cf9deeaedf8e2f57ce004624aa56f4c4a2021414..84711bf7c3cd0ecfb77314761e2ead09412f5506 100644 (file)
@@ -68,7 +68,7 @@
 #include "ED_object.h"
 #include "ED_screen.h"
 #include "ED_sequencer.h"
-#include "ED_util.h"
+#include "ED_undo.h"
 
 #include "WM_api.h"
 #include "WM_types.h"
index 11dc4d10f2a7b0fd859e81343766dc8cc3f9695e..d80ef486663575b564a4803aa5efba413e0ff977 100644 (file)
@@ -54,7 +54,7 @@
 #include "WM_types.h"
 
 #include "ED_mesh.h"
-#include "ED_util.h"
+#include "ED_undo.h"
 #include "ED_screen.h"
 
 #include "UI_interface.h"
index 5e3c783c1b6c286af00da12aafb303dd297afa81..dfa64bd2015166685a953d2ea350c05f1b8761f7 100644 (file)
@@ -55,7 +55,7 @@
 #include "RNA_access.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/undo/CMakeLists.txt b/source/blender/editors/undo/CMakeLists.txt
new file mode 100644 (file)
index 0000000..8983260
--- /dev/null
@@ -0,0 +1,45 @@
+# ***** BEGIN GPL LICENSE BLOCK *****
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Contributor(s): Jacques Beaurain.
+#
+# ***** END GPL LICENSE BLOCK *****
+
+set(INC
+       ../include
+       ../../blenkernel
+       ../../blenlib
+       ../../blentranslation
+       ../../makesdna
+       ../../makesrna
+       ../../windowmanager
+       ../../../../intern/guardedalloc
+       ../../../../intern/clog
+)
+
+set(SRC
+       ed_undo.c
+       memfile_undo.c
+       undo_system_types.c
+
+       undo_intern.h
+)
+
+if(WITH_INTERNATIONAL)
+       add_definitions(-DWITH_INTERNATIONAL)
+endif()
+
+blender_add_lib(bf_editor_undo "${SRC}" "${INC}" "${INC_SYS}")
similarity index 94%
rename from source/blender/editors/util/undo.c
rename to source/blender/editors/undo/ed_undo.c
index fea3360a39c80cde703c8d0177697d22c40002fc..691ba066bf91f4ef74c579d62a668f5460ed6ed4 100644 (file)
  */
 
 /** \file blender/editors/util/undo.c
- *  \ingroup edutil
+ *  \ingroup edundo
  */
 
-#include <stdlib.h>
 #include <string.h>
-#include <math.h>
 
 #include "MEM_guardedalloc.h"
 
-#include "DNA_object_types.h"
 #include "DNA_scene_types.h"
 
 #include "BLI_utildefines.h"
 #include "BKE_blender_undo.h"
 #include "BKE_context.h"
 #include "BKE_global.h"
-#include "BKE_main.h"
 #include "BKE_screen.h"
 #include "BKE_undo_system.h"
 
-#include "ED_armature.h"
-#include "ED_particle.h"
-#include "ED_curve.h"
 #include "ED_gpencil.h"
-#include "ED_lattice.h"
-#include "ED_mball.h"
-#include "ED_mesh.h"
-#include "ED_object.h"
 #include "ED_render.h"
 #include "ED_screen.h"
-#include "ED_paint.h"
-#include "ED_util.h"
-#include "ED_text.h"
+#include "ED_undo.h"
 
 #include "WM_api.h"
 #include "WM_types.h"
 #include "UI_interface.h"
 #include "UI_resources.h"
 
-#include "util_intern.h"
-
-/* ***************** generic undo system ********************* */
+/* -------------------------------------------------------------------- */
+/** \name Generic Undo System Access
+ *
+ * Non-operator undo editor functions.
+ * \{ */
 
 void ED_undo_push(bContext *C, const char *str)
 {
@@ -201,6 +190,12 @@ bool ED_undo_is_valid(const bContext *C, const char *undoname)
        return BKE_undosys_stack_has_undo(wm->undo_stack, undoname);
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Undo, Undo Push & Redo Operators
+ * \{ */
+
 static int ed_undo_exec(bContext *C, wmOperator *UNUSED(op))
 {
        /* "last operator" should disappear, later we can tie this with undo stack nicer */
@@ -231,19 +226,17 @@ static int ed_undo_redo_exec(bContext *C, wmOperator *UNUSED(op))
 static int ed_undo_redo_poll(bContext *C)
 {
        wmOperator *last_op = WM_operator_last_redo(C);
-       return last_op && ED_operator_screenactive(C) && 
+       return last_op && ED_operator_screenactive(C) &&
                WM_operator_check_ui_enabled(C, last_op->type->name);
 }
 
-/* ********************** */
-
 void ED_OT_undo(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name = "Undo";
        ot->description = "Undo previous action";
        ot->idname = "ED_OT_undo";
-       
+
        /* api callbacks */
        ot->exec = ed_undo_exec;
        ot->poll = ED_operator_screenactive;
@@ -255,7 +248,7 @@ void ED_OT_undo_push(wmOperatorType *ot)
        ot->name = "Undo Push";
        ot->description = "Add an undo state (internal use only)";
        ot->idname = "ED_OT_undo_push";
-       
+
        /* api callbacks */
        ot->exec = ed_undo_push_exec;
 
@@ -270,7 +263,7 @@ void ED_OT_redo(wmOperatorType *ot)
        ot->name = "Redo";
        ot->description = "Redo previous action";
        ot->idname = "ED_OT_redo";
-       
+
        /* api callbacks */
        ot->exec = ed_redo_exec;
        ot->poll = ED_operator_screenactive;
@@ -282,12 +275,18 @@ void ED_OT_undo_redo(wmOperatorType *ot)
        ot->name = "Undo and Redo";
        ot->description = "Undo and redo previous action";
        ot->idname = "ED_OT_undo_redo";
-       
+
        /* api callbacks */
        ot->exec = ed_undo_redo_exec;
        ot->poll = ed_undo_redo_poll;
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Operator Repeat
+ * \{ */
+
 /* ui callbacks should call this rather than calling WM_operator_repeat() themselves */
 int ED_undo_operator_repeat(bContext *C, struct wmOperator *op)
 {
@@ -373,8 +372,11 @@ void ED_undo_operator_repeat_cb_evt(bContext *C, void *arg_op, int UNUSED(arg_ev
        ED_undo_operator_repeat(C, (wmOperator *)arg_op);
 }
 
+/** \} */
 
-/* ************************** */
+/* -------------------------------------------------------------------- */
+/** \name Undo History Operator
+ * \{ */
 
 /* create enum based on undo items */
 static const EnumPropertyItem *rna_undo_itemf(bContext *C, int *totitem)
@@ -390,7 +392,6 @@ static const EnumPropertyItem *rna_undo_itemf(bContext *C, int *totitem)
        for (UndoStep *us = wm->undo_stack->steps.first; us; us = us->next, i++) {
                if (us->skip == false) {
                        item_tmp.identifier = us->name;
-                       /* XXX This won't work with non-default contexts (e.g. operators) :/ */
                        item_tmp.name = IFACE_(us->name);
                        if (us == wm->undo_stack->step_active) {
                                item_tmp.icon = ICON_RESTRICT_VIEW_OFF;
@@ -423,7 +424,7 @@ static int undo_history_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSE
                        const int col_size = 20 + totitem / 12;
                        int i, c;
                        bool add_col = true;
-                       
+
                        for (c = 0, i = totitem; i--;) {
                                if (add_col && !(c % col_size)) {
                                        column = uiLayoutColumn(split, false);
@@ -435,12 +436,12 @@ static int undo_history_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSE
                                        add_col = true;
                                }
                        }
-                       
+
                        MEM_freeN((void *)item);
-                       
+
                        UI_popup_menu_end(C, pup);
                }
-               
+
        }
        return OPERATOR_CANCELLED;
 }
@@ -465,14 +466,14 @@ void ED_OT_undo_history(wmOperatorType *ot)
        ot->name = "Undo History";
        ot->description = "Redo specific action in history";
        ot->idname = "ED_OT_undo_history";
-       
+
        /* api callbacks */
        ot->invoke = undo_history_invoke;
        ot->exec = undo_history_exec;
        ot->poll = ED_operator_screenactive;
-       
+
        RNA_def_int(ot->srna, "item", 0, 0, INT_MAX, "Item", "", 0, INT_MAX);
 
 }
 
-
+/** \} */
similarity index 97%
rename from source/blender/editors/util/memfile_undo.c
rename to source/blender/editors/undo/memfile_undo.c
index 95af0c4814787d7f15a78c67f09b5a79b9279687..c336069bff83d3b3f56921c8b882f09d7aa1a7f0 100644 (file)
@@ -19,9 +19,9 @@
  */
 
 /** \file blender/editors/util/memfile_undo.c
- *  \ingroup edutil
+ *  \ingroup edundo
  *
- * Wrapper between 'BKE_undo.h' and 'BKE_undo_system.h'
+ * Wrapper between 'ED_undo.h' and 'BKE_undo_system.h' API's.
  */
 
 #include "BLI_utildefines.h"
 #include "WM_types.h"
 
 #include "ED_object.h"
-#include "ED_util.h"
+#include "ED_undo.h"
 #include "ED_render.h"
 
 
 #include "../blenloader/BLO_undofile.h"
 
-#include "util_intern.h"
+#include "undo_intern.h"
 
 /* -------------------------------------------------------------------- */
 /** \name Implements ED Undo System
similarity index 75%
rename from source/blender/editors/util/util_intern.h
rename to source/blender/editors/undo/undo_intern.h
index 6eda3900e91eaf8ca4e8124a41bd8ef4ccf0ead7..671f9637d65f40583032f78e212e8e2cd9cdb28d 100644 (file)
  * 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 blender/editors/util/util_intern.h
- *  \ingroup edutil
+/** \file blender/editors/undo/undo_intern.h
+ *  \ingroup edundo
  */
 
-
-#ifndef __UTIL_INTERN_H__
-#define __UTIL_INTERN_H__
+#ifndef __UNDO_INTERN_H__
+#define __UNDO_INTERN_H__
 
 /* internal exports only */
 
 struct UndoType;
-struct Main;
-struct Scene;
 
 /* memfile_undo.c */
 void ED_memfile_undosys_type(struct UndoType *ut);
 
-#endif /* __UTIL_INTERN_H__ */
+#endif /* __UNDO_INTERN_H__ */
similarity index 96%
rename from source/blender/editors/util/undo_system_types.c
rename to source/blender/editors/undo/undo_system_types.c
index a326d9eb85912d4cd185a643cf0a5cd32d79d2ac..f1ef444337c2d19921e94536cc580ce1d5863ecc 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 /** \file blender/editors/util/undo_system_types.c
- *  \ingroup edutil
+ *  \ingroup edundo
  */
 
 #include <string.h>
@@ -36,8 +36,8 @@
 #include "ED_particle.h"
 #include "ED_sculpt.h"
 #include "ED_text.h"
-#include "ED_util.h"
-#include "util_intern.h"
+#include "ED_undo.h"
+#include "undo_intern.h"
 
 /* Keep last */
 #include "BKE_undo_system.h"
index b2c0f6ad3094c652aa0eba01e57783db39ae73d5..8657c876d473974582a8901736134b536e1c26f5 100644 (file)
@@ -41,12 +41,8 @@ set(INC_SYS
 set(SRC
        ed_transverts.c
        ed_util.c
-       memfile_undo.c
        numinput.c
-       undo.c
-       undo_system_types.c
 
-       util_intern.h
        # general includes
        ../include/BIF_gl.h
        ../include/BIF_glutil.h
index b2df53321c01e19e4a689382ff5f972e24088259..4f441c293c40b3eb1efb889de060704c59d9f9ad 100644 (file)
@@ -67,6 +67,7 @@
 #include "ED_screen.h"
 #include "ED_view3d.h"
 #include "ED_util.h"
+#include "ED_undo.h"
 
 #include "RNA_access.h"
 
index 1d96d291dc45ffebe32b00694a2e60a6f978d780..da5ebd7abcd956b69ea7afb44f58f6e80fee3ff4 100644 (file)
 #include "ED_screen.h"
 #include "ED_view3d.h"
 #include "ED_util.h"
+#include "ED_undo.h"
 
 #include "GHOST_C-api.h"
 #include "GHOST_Path-api.h"
index b9ac05e0c57582180e5057b197c329fb89c8fb00..52682523212a777f1096386af5abf54139f145fd 100644 (file)
 #include "ED_space_api.h"
 #include "ED_screen.h"
 #include "ED_util.h"
+#include "ED_undo.h"
 
 #include "UI_interface.h"
 #include "BLF_api.h"
index b05b25967190d9285e8c693ec67b52c1c61d0f31..f46358f83cfef61c53a18bcb78c728948dc28e8a 100644 (file)
@@ -96,7 +96,7 @@
 
 #include "ED_numinput.h"
 #include "ED_screen.h"
-#include "ED_util.h"
+#include "ED_undo.h"
 #include "ED_view3d.h"
 
 #include "GPU_basic_shader.h"