Fix #31449: multiple ClipEditor bug behaviour
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 15 May 2012 12:25:26 +0000 (12:25 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 15 May 2012 12:25:26 +0000 (12:25 +0000)
Actually it wasn't a bug -- currently curve/dopesheet view are in separated
spaces, so to keep displaying data in sync it's needed to update all visible
clip editors when changing displaying clip datablock.

Changed logic here a bit, so current clip wouldn't be changes for clip editors
where view is set to CLIP, only dopesheet/graph views are getting updated.
Also do not update displaying clip datablock when changing it from curve/dopesheet.

source/blender/editors/space_clip/clip_editor.c

index ed9265deeb25bf333d9f19c00a394d1d92e08d03..a477a7435fd249caac134400825a55e11a84c52b 100644 (file)
@@ -142,7 +142,7 @@ void ED_space_clip_set(bContext *C, bScreen *screen, SpaceClip *sc, MovieClip *c
        if (sc->clip && sc->clip->id.us == 0)
                sc->clip->id.us = 1;
 
-       if (screen) {
+       if (screen && sc->view == SC_VIEW_CLIP) {
                ScrArea *area;
                SpaceLink *sl;
 
@@ -151,7 +151,7 @@ void ED_space_clip_set(bContext *C, bScreen *screen, SpaceClip *sc, MovieClip *c
                                if (sl->spacetype == SPACE_CLIP) {
                                        SpaceClip *cur_sc = (SpaceClip *) sl;
 
-                                       if (cur_sc != sc) {
+                                       if (cur_sc != sc && cur_sc->view != SC_VIEW_CLIP) {
                                                if (cur_sc->clip == old_clip || cur_sc->clip == NULL) {
                                                        cur_sc->clip = clip;
                                                }