From ecc4e55b6666bdb20ed8e2e8e9a7fc2fbeff3731 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 18 Dec 2008 02:56:48 +0000 Subject: 2.5 Context API This adds the context API as described here. The main practical change now is that C is not longer directly accessible but has to be accessed through accessor functions. This basically adds the implementation of the API and adaption of existing code with some minor changes. The next task of course is to actually use this design to cleanup of bad level calls and global access, in blenkernel, blenloader. http://wiki.blender.org/index.php/BlenderDev/Blender2.5/Context Error, Warning and Debug Info Reporting This adds the error reporting API as described here. It should help clean up error() calls in non-ui code, but eventually can become used for gathering messages for a console window, and throwing exceptions in python scripts when an error happens executing something. http://wiki.blender.org/index.php/BlenderDev/Blender2.5/Reports --- source/creator/creator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index 8cb436f4d6d..f96edf99029 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -53,6 +53,7 @@ #include "BKE_utildefines.h" #include "BKE_blender.h" +#include "BKE_context.h" #include "BKE_font.h" #include "BKE_global.h" #include "BKE_main.h" @@ -261,7 +262,7 @@ double PIL_check_seconds_timer(void); int main(int argc, char **argv) { SYS_SystemHandle syshandle; - bContext *C= MEM_callocN(sizeof(bContext), "creator.c context"); + bContext *C= CTX_create(); int a, i, stax, stay, sizx, sizy /*XXX, scr_init = 0*/; #if defined(WIN32) || defined (__linux__) -- cgit v1.2.3