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:
authorJoshua Leung <aligorith@gmail.com>2009-06-11 09:02:46 +0400
committerJoshua Leung <aligorith@gmail.com>2009-06-11 09:02:46 +0400
commit0bef8012bc71b1a1d3fae4f5ef82055045ef4752 (patch)
tree9e6b9be66a206d7812524b89f758768e51ee49e3 /source/blender/editors/space_nla/space_nla.c
parentf0f9034966be8692250686aee74048294960aad3 (diff)
NLA SoC: Channel ordering change
In response to user-feedback, I've changed the order in which channels appear. Now, the channel ordering is: - Object/AnimData block -- Active Action -- Last NLA Track .. .. -- First NLA Track It is important to note several things still: 1) Active action is applied AFTER the NLA Tracks have been evaluated, not before 2) In this new order, the tracks+active action are shown in the evaluation-stack order, i.e. first thing applied is at the bottom, last is at the top. As a result, I've switched the view-orientation back so that it works the same way as for DopeSheet/Graph editors (i.e. expands downwards not upwards). This may cause problems loading files saved with older builds of this branch. There are still some lingering problems due to this change which I'll fix in due course.
Diffstat (limited to 'source/blender/editors/space_nla/space_nla.c')
-rw-r--r--source/blender/editors/space_nla/space_nla.c45
1 files changed, 21 insertions, 24 deletions
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c
index 5490f40eb03..a7e9844726d 100644
--- a/source/blender/editors/space_nla/space_nla.c
+++ b/source/blender/editors/space_nla/space_nla.c
@@ -103,6 +103,7 @@ ARegion *nla_has_buttons_region(ScrArea *sa)
static SpaceLink *nla_new(const bContext *C)
{
+ Scene *scene= CTX_data_scene(C);
ARegion *ar;
SpaceNla *snla;
@@ -132,45 +133,41 @@ static SpaceLink *nla_new(const bContext *C)
ar->v2d.scroll = V2D_SCROLL_BOTTOM;
ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
+ /* ui buttons */
+ ar= MEM_callocN(sizeof(ARegion), "buttons area for nla");
+
+ BLI_addtail(&snla->regionbase, ar);
+ ar->regiontype= RGN_TYPE_UI;
+ ar->alignment= RGN_ALIGN_RIGHT;
+ ar->flag = RGN_FLAG_HIDDEN;
+
/* main area */
ar= MEM_callocN(sizeof(ARegion), "main area for nla");
BLI_addtail(&snla->regionbase, ar);
ar->regiontype= RGN_TYPE_WINDOW;
- ar->v2d.tot.xmin= 1.0f;
- ar->v2d.tot.ymin= 0.0f;
- ar->v2d.tot.xmax= 1000.0f;
- ar->v2d.tot.ymax= 500.0f;
+ ar->v2d.tot.xmin= (float)(SFRA-10);
+ ar->v2d.tot.ymin= -500.0f;
+ ar->v2d.tot.xmax= (float)(EFRA+10);
+ ar->v2d.tot.ymax= 0.0f;
- ar->v2d.cur.xmin= -5.0f;
- ar->v2d.cur.ymin= 0.0f;
- ar->v2d.cur.xmax= 65.0f;
- ar->v2d.cur.ymax= 250.0f;
+ ar->v2d.cur = ar->v2d.tot;
ar->v2d.min[0]= 0.0f;
- ar->v2d.min[1]= 0.0f;
+ ar->v2d.min[1]= 0.0f;
ar->v2d.max[0]= MAXFRAMEF;
- ar->v2d.max[1]= 1000.0f;
-
- ar->v2d.minzoom= 0.1f;
- ar->v2d.maxzoom= 50.0f;
-
+ ar->v2d.max[1]= 10000.0f;
+
+ ar->v2d.minzoom= 0.01f;
+ ar->v2d.maxzoom= 50;
ar->v2d.scroll = (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL);
ar->v2d.scroll |= (V2D_SCROLL_RIGHT);
ar->v2d.keepzoom= V2D_LOCKZOOM_Y;
- ar->v2d.align= V2D_ALIGN_NO_NEG_Y;
+ ar->v2d.align= V2D_ALIGN_NO_POS_Y;
ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
- /* ui buttons */
- ar= MEM_callocN(sizeof(ARegion), "buttons area for nla");
-
- BLI_addtail(&snla->regionbase, ar);
- ar->regiontype= RGN_TYPE_UI;
- ar->alignment= RGN_ALIGN_RIGHT;
- ar->flag = RGN_FLAG_HIDDEN;
-
return (SpaceLink *)snla;
}
@@ -213,7 +210,7 @@ static void nla_channel_area_init(wmWindowManager *wm, ARegion *ar)
{
ListBase *keymap;
- UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_STACK, ar->winx, ar->winy);
+ UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy);
/* own keymap */
// TODO: cannot use generic copy, need special NLA version