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:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-01-24 12:36:42 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-01-24 12:36:42 +0300
commita3261aad130eabdcdf4938144477e4d0dd574932 (patch)
treeb5cf78ad41aff712083b1234af4c17d59b43e69a
parentbe32168eb4909445c6250089db01fa3fa50c5589 (diff)
Fix T54581: Clip editor doesn't synchronize frame on layout change
-rw-r--r--source/blender/editors/space_clip/space_clip.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c
index 31a6ff5bc4b..f90499ef6bc 100644
--- a/source/blender/editors/space_clip/space_clip.c
+++ b/source/blender/editors/space_clip/space_clip.c
@@ -227,6 +227,12 @@ static void clip_scopes_check_gpencil_change(ScrArea *sa)
}
}
+static void clip_area_sync_frame_from_scene(ScrArea *sa, Scene *scene)
+{
+ SpaceClip *space_clip = (SpaceClip *)sa->spacedata.first;
+ BKE_movieclip_user_set_frame(&space_clip->user, scene->r.cfra);
+}
+
/* ******************** default callbacks for clip space ***************** */
static SpaceLink *clip_new(const ScrArea *sa, const Scene *scene)
@@ -324,7 +330,7 @@ static SpaceLink *clip_duplicate(SpaceLink *sl)
return (SpaceLink *)scn;
}
-static void clip_listener(wmWindow *UNUSED(win), ScrArea *sa, wmNotifier *wmn, Scene *UNUSED(scene))
+static void clip_listener(wmWindow *UNUSED(win), ScrArea *sa, wmNotifier *wmn, Scene *scene)
{
/* context changes */
switch (wmn->category) {
@@ -389,6 +395,9 @@ static void clip_listener(wmWindow *UNUSED(win), ScrArea *sa, wmNotifier *wmn, S
case ND_ANIMPLAY:
ED_area_tag_redraw(sa);
break;
+ case ND_LAYOUTSET:
+ clip_area_sync_frame_from_scene(sa, scene);
+ break;
}
break;
case NC_SPACE: