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 261
45 #define BLENDER_SUBVERSION 0
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
53 /* alpha/beta/rc/release, docs use this */
54 #define BLENDER_VERSION_CYCLE alpha
56 extern char versionstr[]; /* from blender.c */
65 int BKE_read_file(struct bContext *C, const char *filepath, struct ReportList *reports);
67 #define BKE_READ_FILE_FAIL 0 /* no load */
68 #define BKE_READ_FILE_OK 1 /* OK */
69 #define BKE_READ_FILE_OK_USERPREFS 2 /* OK, and with new user settings */
71 int BKE_read_file_from_memory(struct bContext *C, char* filebuf, int filelength, struct ReportList *reports);
72 int BKE_read_file_from_memfile(struct bContext *C, struct MemFile *memfile, struct ReportList *reports);
74 void free_blender(void);
75 void initglobals(void);
77 /* load new userdef from file, exit blender */
78 void BKE_userdef_free(void);
80 /* set this callback when a UI is running */
81 void set_blender_test_break_cb(void (*func)(void) );
82 int blender_test_break(void);
85 extern void BKE_write_undo(struct bContext *C, const char *name);
86 extern void BKE_undo_step(struct bContext *C, int step);
87 extern void BKE_undo_name(struct bContext *C, const char *name);
88 extern int BKE_undo_valid(const char *name);
89 extern void BKE_reset_undo(void);
90 extern char *BKE_undo_menu_string(void);
91 extern void BKE_undo_number(struct bContext *C, int nr);
92 extern const char *BKE_undo_get_name(int nr, int *active);
93 extern void BKE_undo_save_quit(void);
94 extern struct Main *BKE_undo_get_main(struct Scene **scene);