diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-12-18 05:56:48 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-12-18 05:56:48 +0300 |
commit | ecc4e55b6666bdb20ed8e2e8e9a7fc2fbeff3731 (patch) | |
tree | 35b5a56c8b43fdf6d61a01302b2e458f6245bfe8 /source/blender/editors/space_time/space_time.c | |
parent | 241dbe6e85a916cc55b5e749596aaf0ef3dffd90 (diff) |
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
Diffstat (limited to 'source/blender/editors/space_time/space_time.c')
-rw-r--r-- | source/blender/editors/space_time/space_time.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c index 3c4152366ee..e89a64faf94 100644 --- a/source/blender/editors/space_time/space_time.c +++ b/source/blender/editors/space_time/space_time.c @@ -38,6 +38,7 @@ #include "BLI_blenlib.h" +#include "BKE_context.h" #include "BKE_global.h" #include "BKE_screen.h" @@ -64,7 +65,7 @@ /* draws a current frame indicator for the TimeLine */ static void time_draw_cfra_time(const bContext *C, SpaceTime *stime, ARegion *ar) { - Scene *scene= C->scene; + Scene *scene= CTX_data_scene(C); float vec[2]; vec[0]= scene->r.cfra*scene->r.framelen; @@ -120,7 +121,7 @@ static void time_main_area_init(wmWindowManager *wm, ARegion *ar) static void time_main_area_draw(const bContext *C, ARegion *ar) { /* draw entirely, view changes should be handled here */ - SpaceTime *stime= C->area->spacedata.first; + SpaceTime *stime= (SpaceTime*)CTX_wm_space_data(C); View2D *v2d= &ar->v2d; View2DGrid *grid; View2DScrollers *scrollers; |