diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-01-20 18:44:37 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-01-20 18:44:37 +0300 |
commit | 0c3e5dec93759f3d557e6c1746e80c2cf5b74f06 (patch) | |
tree | dd3755b70c3f213a172232726526fc74b0985e77 | |
parent | 939c3ba9cbd0557b93de443e06b7e970984b288a (diff) |
Fix action editor now updating when changing the active object. I can't work
out of this was an intentional change or not, but working with two objects
became quite tedious because action would have to be changed manually each
time. Also fixed missing redraw of header.
-rw-r--r-- | source/blender/editors/animation/anim_filter.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_action/space_action.c | 19 |
2 files changed, 20 insertions, 1 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 44199832156..e6d9bcf2d64 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -159,7 +159,7 @@ static short actedit_get_context (bAnimContext *ac, SpaceAction *saction) switch (saction->mode) { case SACTCONT_ACTION: /* 'Action Editor' */ /* if not pinned, sync with active object */ - if (/*saction->pin == 0*/0) { + if (/*saction->pin == 0*/1) { if (ac->obact && ac->obact->adt) saction->action = ac->obact->adt->action; else diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c index 57a39b3225e..66e6e770ca4 100644 --- a/source/blender/editors/space_action/space_action.c +++ b/source/blender/editors/space_action/space_action.c @@ -398,6 +398,24 @@ static void action_listener(ScrArea *sa, wmNotifier *wmn) } } +static void action_header_area_listener(ARegion *ar, wmNotifier *wmn) +{ + /* context changes */ + switch(wmn->category) { + case NC_SCENE: + switch(wmn->data) { + case ND_OB_ACTIVE: + ED_region_tag_redraw(ar); + break; + } + break; + case NC_ID: + if(wmn->action == NA_RENAME) + ED_region_tag_redraw(ar); + break; + } +} + static void action_refresh(const bContext *C, ScrArea *sa) { SpaceAction *saction= CTX_wm_space_action(C); @@ -450,6 +468,7 @@ void ED_spacetype_action(void) art->init= action_header_area_init; art->draw= action_header_area_draw; + art->listener= action_header_area_listener; BLI_addhead(&st->regiontypes, art); |