[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44384] trunk/blender/source/blender: Fix #30323: Graph view in the Movie Clip Editor does not stay open

Sergey Sharybin sergey.vfx at gmail.com
Thu Feb 23 19:51:26 CET 2012


Revision: 44384
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44384
Author:   nazgul
Date:     2012-02-23 18:51:24 +0000 (Thu, 23 Feb 2012)
Log Message:
-----------
Fix #30323: Graph view in the Movie Clip Editor does not stay open

In fact, Graph View wasn't been supposed to be opened in Clip show editor mode.
Made curves view unavailable from Clip view mode and store it's alignment in
a runtime flag in SpaceClip structure.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_clip/space_clip.c
    trunk/blender/source/blender/makesdna/DNA_space_types.h

Modified: trunk/blender/source/blender/editors/space_clip/space_clip.c
===================================================================
--- trunk/blender/source/blender/editors/space_clip/space_clip.c	2012-02-23 17:22:37 UTC (rev 44383)
+++ trunk/blender/source/blender/editors/space_clip/space_clip.c	2012-02-23 18:51:24 UTC (rev 44384)
@@ -244,7 +244,6 @@
 					/* no break! */
 
 				case ND_FRAME_RANGE:
-					ED_area_tag_refresh(sa);
 					ED_area_tag_redraw(sa);
 					break;
 			}
@@ -611,6 +610,16 @@
 				ar_main->alignment= RGN_ALIGN_NONE;
 				view_changed= 1;
 			}
+			if (ar_preview && ar_preview->alignment != RGN_ALIGN_NONE) {
+				/* store graph region align */
+				if (ar_preview->alignment == RGN_ALIGN_TOP)
+					sc->runtime_flag &= ~SC_GRAPH_BOTTOM;
+				else
+					sc->runtime_flag |= SC_GRAPH_BOTTOM;
+
+				ar_preview->alignment= RGN_ALIGN_NONE;
+				view_changed= 1;
+			}
 			break;
 		case SC_VIEW_GRAPH:
 			if (ar_preview && (ar_preview->flag & RGN_FLAG_HIDDEN)) {
@@ -624,7 +633,11 @@
 				view_changed= 1;
 			}
 			if (ar_preview && !ELEM(ar_preview->alignment, RGN_ALIGN_TOP,  RGN_ALIGN_BOTTOM)) {
-				ar_preview->alignment= RGN_ALIGN_TOP;
+				if (sc->runtime_flag & SC_GRAPH_BOTTOM)
+					ar_preview->alignment= RGN_ALIGN_BOTTOM;
+				else
+					ar_preview->alignment= RGN_ALIGN_TOP;
+
 				view_changed= 1;
 			}
 			break;

Modified: trunk/blender/source/blender/makesdna/DNA_space_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_space_types.h	2012-02-23 17:22:37 UTC (rev 44383)
+++ trunk/blender/source/blender/makesdna/DNA_space_types.h	2012-02-23 18:51:24 UTC (rev 44384)
@@ -520,7 +520,9 @@
 												   defined when drawing and used for mouse position calculation */
 
 	/* movie postprocessing */
-	int postproc_flag, pad2;
+	int postproc_flag;
+
+	int runtime_flag;			/* different runtime flags */
 } SpaceClip;
 
 /* view3d  Now in DNA_view3d_types.h */
@@ -912,6 +914,9 @@
 #define SC_VIEW_CLIP		0
 #define SC_VIEW_GRAPH		1
 
+/* SpaceClip->runtime_flag */
+#define SC_GRAPH_BOTTOM		(1<<0)
+
 /* space types, moved from DNA_screen_types.h */
 /* Do NOT change order, append on end. types are hardcoded needed */
 enum {




More information about the Bf-blender-cvs mailing list