diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-01-24 12:36:42 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-01-24 12:36:42 +0300 |
commit | a3261aad130eabdcdf4938144477e4d0dd574932 (patch) | |
tree | b5cf78ad41aff712083b1234af4c17d59b43e69a | |
parent | be32168eb4909445c6250089db01fa3fa50c5589 (diff) |
Fix T54581: Clip editor doesn't synchronize frame on layout change
-rw-r--r-- | source/blender/editors/space_clip/space_clip.c | 11 |
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: |