Blender  V2.59
BKE_blender.h
Go to the documentation of this file.
00001 /*
00002  * $Id: BKE_blender.h 39263 2011-08-10 16:05:20Z campbellbarton $ 
00003  *
00004  * ***** BEGIN GPL LICENSE BLOCK *****
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software Foundation,
00018  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019  *
00020  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
00021  * All rights reserved.
00022  *
00023  * The Original Code is: all of this file.
00024  *
00025  * Contributor(s): none yet.
00026  *
00027  * ***** END GPL LICENSE BLOCK *****
00028  */
00029 #ifndef BKE_BLENDER_H
00030 #define BKE_BLENDER_H
00031 
00039 #ifdef __cplusplus
00040 extern "C" {
00041 #endif
00042 
00043 /* these lines are grep'd, watch out for our not-so-awesome regex
00044  * and keep comment above the defines.
00045  * Use STRINGIFY() rather than defining with quotes */
00046 #define BLENDER_VERSION                 259
00047 #define BLENDER_SUBVERSION              0
00048 
00049 #define BLENDER_MINVERSION              250
00050 #define BLENDER_MINSUBVERSION   0
00051 
00052 /* used by packaging tools */
00053                 /* can be left blank, otherwise a,b,c... etc with no quotes */
00054 #define BLENDER_VERSION_CHAR
00055                 /* alpha/beta/rc/release, docs use this */
00056 #define BLENDER_VERSION_CYCLE   release
00057 
00058 struct ListBase;
00059 struct MemFile;
00060 struct bContext;
00061 struct ReportList;
00062 struct Scene;
00063 struct Main;
00064 
00065 int BKE_read_file(struct bContext *C, const char *filepath, struct ReportList *reports);
00066 
00067 #define BKE_READ_FILE_FAIL                              0 /* no load */
00068 #define BKE_READ_FILE_OK                                1 /* OK */
00069 #define BKE_READ_FILE_OK_USERPREFS              2 /* OK, and with new user settings */
00070 
00071 int BKE_read_file_from_memory(struct bContext *C, char* filebuf, int filelength, struct ReportList *reports);
00072 int BKE_read_file_from_memfile(struct bContext *C, struct MemFile *memfile, struct ReportList *reports);
00073 
00074 void free_blender(void);
00075 void initglobals(void);
00076 
00077 /* load new userdef from file, exit blender */
00078 void BKE_userdef_free(void);
00079 
00080 /* set this callback when a UI is running */
00081 void set_blender_test_break_cb(void (*func)(void) );
00082 int blender_test_break(void);
00083 
00084 /* global undo */
00085 extern void BKE_write_undo(struct bContext *C, const char *name);
00086 extern void BKE_undo_step(struct bContext *C, int step);
00087 extern void BKE_undo_name(struct bContext *C, const char *name);
00088 extern int BKE_undo_valid(const char *name);
00089 extern void BKE_reset_undo(void);
00090 extern char *BKE_undo_menu_string(void);
00091 extern void BKE_undo_number(struct bContext *C, int nr);
00092 extern char *BKE_undo_get_name(int nr, int *active);
00093 extern void BKE_undo_save_quit(void);
00094 extern struct Main *BKE_undo_get_main(struct Scene **scene);
00095 
00096 #ifdef __cplusplus
00097 }
00098 #endif
00099 
00100 #endif
00101