[Bf-blender-cvs] [a3261aad130] master: Fix T54581: Clip editor doesn't synchronize frame on layout change

Sergey Sharybin noreply at git.blender.org
Thu Jan 24 10:38:23 CET 2019


Commit: a3261aad130eabdcdf4938144477e4d0dd574932
Author: Sergey Sharybin
Date:   Thu Jan 24 10:36:42 2019 +0100
Branches: master
https://developer.blender.org/rBa3261aad130eabdcdf4938144477e4d0dd574932

Fix T54581: Clip editor doesn't synchronize frame on layout change

===================================================================

M	source/blender/editors/space_clip/space_clip.c

===================================================================

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:



More information about the Bf-blender-cvs mailing list