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:
authorElia Sarti <vekoon@gmail.com>2009-12-08 00:51:44 +0300
committerElia Sarti <vekoon@gmail.com>2009-12-08 00:51:44 +0300
commitb71749305a3b6db54f6676e87803703aa7acdebb (patch)
treea8def845a5bba8607837881c18a9014773e419be /source/blender/editors
parentce49719a0c9baf75576929f956e1224fcd46afc7 (diff)
Pythonazed DopeSheet and NLA editors headers UI.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_action/space_action.c21
-rw-r--r--source/blender/editors/space_nla/space_nla.c21
2 files changed, 4 insertions, 38 deletions
diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c
index d4f8fcfb449..0bf3e3f70cb 100644
--- a/source/blender/editors/space_action/space_action.c
+++ b/source/blender/editors/space_action/space_action.c
@@ -259,29 +259,12 @@ static void action_channel_area_draw(const bContext *C, ARegion *ar)
/* add handlers, stuff you only do once or on area/region changes */
static void action_header_area_init(wmWindowManager *wm, ARegion *ar)
{
- UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_HEADER, ar->winx, ar->winy);
+ ED_region_header_init(ar);
}
static void action_header_area_draw(const bContext *C, ARegion *ar)
{
- float col[3];
-
- /* clear */
- if(ED_screen_area_active(C))
- UI_GetThemeColor3fv(TH_HEADER, col);
- else
- UI_GetThemeColor3fv(TH_HEADERDESEL, col);
-
- glClearColor(col[0], col[1], col[2], 0.0);
- glClear(GL_COLOR_BUFFER_BIT);
-
- /* set view2d view matrix for scrolling (without scrollers) */
- UI_view2d_view_ortho(C, &ar->v2d);
-
- action_header_buttons(C, ar);
-
- /* restore view matrix? */
- UI_view2d_view_restore(C);
+ ED_region_header(C, ar);
}
static void action_channel_area_listener(ARegion *ar, wmNotifier *wmn)
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c
index a019e684239..572ad44f680 100644
--- a/source/blender/editors/space_nla/space_nla.c
+++ b/source/blender/editors/space_nla/space_nla.c
@@ -331,29 +331,12 @@ static void nla_main_area_draw(const bContext *C, ARegion *ar)
/* add handlers, stuff you only do once or on area/region changes */
static void nla_header_area_init(wmWindowManager *wm, ARegion *ar)
{
- UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_HEADER, ar->winx, ar->winy);
+ ED_region_header_init(ar);
}
static void nla_header_area_draw(const bContext *C, ARegion *ar)
{
- float col[3];
-
- /* clear */
- if(ED_screen_area_active(C))
- UI_GetThemeColor3fv(TH_HEADER, col);
- else
- UI_GetThemeColor3fv(TH_HEADERDESEL, col);
-
- glClearColor(col[0], col[1], col[2], 0.0);
- glClear(GL_COLOR_BUFFER_BIT);
-
- /* set view2d view matrix for scrolling (without scrollers) */
- UI_view2d_view_ortho(C, &ar->v2d);
-
- nla_header_buttons(C, ar);
-
- /* restore view matrix? */
- UI_view2d_view_restore(C);
+ ED_region_header(C, ar);
}
/* add handlers, stuff you only do once or on area/region changes */