4 * ***** BEGIN GPL LICENSE BLOCK *****
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
21 * All rights reserved.
23 * The Original Code is: all of this file.
25 * Contributor(s): none yet.
27 * ***** END GPL LICENSE BLOCK *****
32 /** \file BKE_blender.h
36 * \brief Blender util stuff
43 /* these lines are grep'd, watch out for our not-so-awesome regex
44 * and keep comment above the defines.
45 * Use STRINGIFY() rather than defining with quotes */
46 #define BLENDER_VERSION 258
47 #define BLENDER_SUBVERSION 1
49 #define BLENDER_MINVERSION 250
50 #define BLENDER_MINSUBVERSION 0
52 /* used by packaging tools */
53 /* can be left blank, otherwise a,b,c... etc with no quotes */
54 #define BLENDER_VERSION_CHAR a
55 /* alpha/beta/rc/release, docs use this */
56 #define BLENDER_VERSION_CYCLE release
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 char *BKE_undo_get_name(int nr, int *active);
93 void BKE_undo_save(char *fname);
94 extern void BKE_undo_save_quit(void);
95 extern struct Main *BKE_undo_get_main(struct Scene **scene);