2 * ***** BEGIN GPL LICENSE BLOCK *****
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
19 * All rights reserved.
21 * The Original Code is: all of this file.
23 * Contributor(s): none yet.
25 * ***** END GPL LICENSE BLOCK *****
30 /** \file BKE_blender.h
34 * \brief Blender util stuff
41 /* these lines are grep'd, watch out for our not-so-awesome regex
42 * and keep comment above the defines.
43 * Use STRINGIFY() rather than defining with quotes */
44 #define BLENDER_VERSION 260
45 #define BLENDER_SUBVERSION 2
47 #define BLENDER_MINVERSION 250
48 #define BLENDER_MINSUBVERSION 0
50 /* used by packaging tools */
51 /* can be left blank, otherwise a,b,c... etc with no quotes */
52 #define BLENDER_VERSION_CHAR a
53 /* alpha/beta/rc/release, docs use this */
54 #define BLENDER_VERSION_CYCLE alpha
63 int BKE_read_file(struct bContext *C, const char *filepath, struct ReportList *reports);
65 #define BKE_READ_FILE_FAIL 0 /* no load */
66 #define BKE_READ_FILE_OK 1 /* OK */
67 #define BKE_READ_FILE_OK_USERPREFS 2 /* OK, and with new user settings */
69 int BKE_read_file_from_memory(struct bContext *C, char* filebuf, int filelength, struct ReportList *reports);
70 int BKE_read_file_from_memfile(struct bContext *C, struct MemFile *memfile, struct ReportList *reports);
72 void free_blender(void);
73 void initglobals(void);
75 /* load new userdef from file, exit blender */
76 void BKE_userdef_free(void);
78 /* set this callback when a UI is running */
79 void set_blender_test_break_cb(void (*func)(void) );
80 int blender_test_break(void);
83 extern void BKE_write_undo(struct bContext *C, const char *name);
84 extern void BKE_undo_step(struct bContext *C, int step);
85 extern void BKE_undo_name(struct bContext *C, const char *name);
86 extern int BKE_undo_valid(const char *name);
87 extern void BKE_reset_undo(void);
88 extern char *BKE_undo_menu_string(void);
89 extern void BKE_undo_number(struct bContext *C, int nr);
90 extern const char *BKE_undo_get_name(int nr, int *active);
91 extern void BKE_undo_save_quit(void);
92 extern struct Main *BKE_undo_get_main(struct Scene **scene);