[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26145] trunk/blender/source/blender/ editors: Fix action editor now updating when changing the active object.

Brecht Van Lommel brecht at blender.org
Wed Jan 20 16:44:37 CET 2010


Revision: 26145
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26145
Author:   blendix
Date:     2010-01-20 16:44:37 +0100 (Wed, 20 Jan 2010)

Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/animation/anim_filter.c
    trunk/blender/source/blender/editors/space_action/space_action.c

Modified: trunk/blender/source/blender/editors/animation/anim_filter.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_filter.c	2010-01-20 15:23:50 UTC (rev 26144)
+++ trunk/blender/source/blender/editors/animation/anim_filter.c	2010-01-20 15:44:37 UTC (rev 26145)
@@ -159,7 +159,7 @@
 	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

Modified: trunk/blender/source/blender/editors/space_action/space_action.c
===================================================================
--- trunk/blender/source/blender/editors/space_action/space_action.c	2010-01-20 15:23:50 UTC (rev 26144)
+++ trunk/blender/source/blender/editors/space_action/space_action.c	2010-01-20 15:44:37 UTC (rev 26145)
@@ -398,6 +398,24 @@
 	}
 }
 
+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 @@
 	
 	art->init= action_header_area_init;
 	art->draw= action_header_area_draw;
+	art->listener= action_header_area_listener;
 	
 	BLI_addhead(&st->regiontypes, art);
 	





More information about the Bf-blender-cvs mailing list