Fix #24167: Timeline keyframes don't update when selecting objects from outliner
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 7 Oct 2010 16:41:42 +0000 (16:41 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 7 Oct 2010 16:41:42 +0000 (16:41 +0000)
Based on patch from Alexander Kuznetsov. Own changes:
- Keyframes in timelime depends on active object, so timelime better be
  listeing to ND_OB_ACTIVE notifier rather than ND_OB_SELECT
- When scene is changing in this operator NC_WINDOW notifier would be send
  and the whole interface would be redrawed, so no need in ND_OB_ACTIVE in
  this case

source/blender/editors/space_outliner/outliner.c
source/blender/editors/space_time/space_time.c

index c9aac8502c455f72a6c1be759956083fb93f7fa1..20b5ad7a34f58383ac8c6538bdf7d8f8bb1136c2 100644 (file)
@@ -1931,15 +1931,14 @@ static void tree_element_set_active_object(bContext *C, Scene *scene, SpaceOops
                        scene_deselect_all(scene);
                        ED_base_object_select(base, BA_SELECT);
                }
-               if(C)
+               if(C) {
                        ED_base_object_activate(C, base); /* adds notifier */
+                       WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
+               }
        }
        
        if(ob!=scene->obedit) 
                ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR|EM_DO_UNDO);
-       
-       WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene);
-
 }
 
 static int tree_element_active_material(bContext *C, Scene *scene, SpaceOops *soops, TreeElement *te, int set)
index ca7dc29ad853358056732304dc0b3ffbbe6fccd9..0d3b051412239cd6578c6fa754e001680e0952f1 100644 (file)
@@ -519,6 +519,7 @@ static void time_main_area_listener(ARegion *ar, wmNotifier *wmn)
                case NC_SCENE:
                        switch (wmn->data) {
                                case ND_OB_SELECT:
+                               case ND_OB_ACTIVE:
                                case ND_FRAME:
                                case ND_FRAME_RANGE:
                                case ND_KEYINGSET: