Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2008-12-22 13:09:56 +0300
committerTon Roosendaal <ton@blender.org>2008-12-22 13:09:56 +0300
commitbac4d10174da530427343e6238be16b8a8ee3ac8 (patch)
tree2b920dbf0ff67f4896619258cb0db032d6b2c851 /source/blender/editors/space_nla/space_nla.c
parentfa12c089b125a8705310122d0022bf82f4d93972 (diff)
2.5
Small area/space api fix: space->new() callbacks now require Context pointer. Too many cases you want to initialize stuff... Also: added dummy draw function for NLA channel region, was too ugly.
Diffstat (limited to 'source/blender/editors/space_nla/space_nla.c')
-rw-r--r--source/blender/editors/space_nla/space_nla.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c
index 58f7b92e872..1be1908b681 100644
--- a/source/blender/editors/space_nla/space_nla.c
+++ b/source/blender/editors/space_nla/space_nla.c
@@ -63,7 +63,7 @@
/* ******************** default callbacks for nla space ***************** */
-static SpaceLink *nla_new(void)
+static SpaceLink *nla_new(const bContext *C)
{
ARegion *ar;
SpaceNla *snla;
@@ -142,6 +142,28 @@ static SpaceLink *nla_duplicate(SpaceLink *sl)
return (SpaceLink *)snlan;
}
+static void nla_channel_area_draw(const bContext *C, ARegion *ar)
+{
+ /* draw entirely, view changes should be handled here */
+ // SpaceNla *snla= (SpaceNla*)CTX_wm_space_data(C);
+ // View2D *v2d= &ar->v2d;
+ float col[3];
+
+ /* clear and setup matrix */
+ UI_GetThemeColor3fv(TH_BACK, col);
+ glClearColor(col[0], col[1], col[2], 0.0);
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ // UI_view2d_view_ortho(C, v2d);
+
+ /* data... */
+
+
+ /* reset view matrix */
+ //UI_view2d_view_restore(C);
+
+ /* scrollers? */
+}
/* add handlers, stuff you only do once or on area/region changes */
@@ -265,7 +287,7 @@ void ED_spacetype_nla(void)
art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D;
//art->init= nla_channel_area_init;
- //art->draw= nla_channel_area_draw;
+ art->draw= nla_channel_area_draw;
BLI_addhead(&st->regiontypes, art);