[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32509] trunk/blender/source/blender/ editors: Bugfix #24099: nla content moves out of sync - with fix

Joshua Leung aligorith at gmail.com
Sat Oct 16 07:07:34 CEST 2010


Revision: 32509
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32509
Author:   aligorith
Date:     2010-10-16 07:07:33 +0200 (Sat, 16 Oct 2010)

Log Message:
-----------
Bugfix #24099: nla content moves out of sync - with fix

Thanks Shane Ambler (sambler) for the patch!

<quote>
This kind of follows on from a report that I think was closed prematurely - #22775 - I can't find any reference to an
outstanding todo that relates to it.

When resizing the nla editor the channel names and the main area get out of sync.
When toggling back from fullscreen the content is hidden off the top of the area requiring scrolling to see it.

The dopesheet displays similar problems but after fixing the ui_view2d_sync call it appears to behave as if the v2d.keepofs
has been set for the most part.

Two areas seem to be related to this - the first is calls to UI_view2d_sync used for these two views use the wrong
flags.

The other is v2d.keepofs not being set. (dopesheet has less issue here but I think it is meant to be set the same as
nla)

</quote>

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_action/action_draw.c
    trunk/blender/source/blender/editors/space_action/space_action.c
    trunk/blender/source/blender/editors/space_nla/nla_draw.c
    trunk/blender/source/blender/editors/space_nla/space_nla.c

Modified: trunk/blender/source/blender/editors/space_action/action_draw.c
===================================================================
--- trunk/blender/source/blender/editors/space_action/action_draw.c	2010-10-16 04:14:26 UTC (rev 32508)
+++ trunk/blender/source/blender/editors/space_action/action_draw.c	2010-10-16 05:07:33 UTC (rev 32509)
@@ -90,8 +90,8 @@
 		 */
 		v2d->tot.ymin= (float)(-height);
 	}
-	/* need to do a view-sync here, so that the keys area doesn't jump around */
-	UI_view2d_sync(NULL, ac->sa, v2d, V2D_VIEWSYNC_AREA_VERTICAL);
+	/* need to do a view-sync here, so that the keys area doesn't jump around (it must copy this) */
+	UI_view2d_sync(NULL, ac->sa, v2d, V2D_LOCK_COPY);
 	
 	/* loop through channels, and set up drawing depending on their type  */	
 	{ 	/* first pass: just the standard GL-drawing for backdrop + text */

Modified: trunk/blender/source/blender/editors/space_action/space_action.c
===================================================================
--- trunk/blender/source/blender/editors/space_action/space_action.c	2010-10-16 04:14:26 UTC (rev 32508)
+++ trunk/blender/source/blender/editors/space_action/space_action.c	2010-10-16 05:07:33 UTC (rev 32509)
@@ -101,16 +101,17 @@
 	ar->v2d.cur = ar->v2d.tot;
 	
 	ar->v2d.min[0]= 0.0f;
-	 ar->v2d.min[1]= 0.0f;
+	ar->v2d.min[1]= 0.0f;
 	
 	ar->v2d.max[0]= MAXFRAMEF;
-	 ar->v2d.max[1]= FLT_MAX;
+	ar->v2d.max[1]= FLT_MAX;
  	
 	ar->v2d.minzoom= 0.01f;
 	ar->v2d.maxzoom= 50;
 	ar->v2d.scroll = (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL);
 	ar->v2d.scroll |= (V2D_SCROLL_RIGHT);
 	ar->v2d.keepzoom= V2D_LOCKZOOM_Y;
+	ar->v2d.keepofs= V2D_KEEPOFS_Y;
 	ar->v2d.align= V2D_ALIGN_NO_POS_Y;
 	ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
 	

Modified: trunk/blender/source/blender/editors/space_nla/nla_draw.c
===================================================================
--- trunk/blender/source/blender/editors/space_nla/nla_draw.c	2010-10-16 04:14:26 UTC (rev 32508)
+++ trunk/blender/source/blender/editors/space_nla/nla_draw.c	2010-10-16 05:07:33 UTC (rev 32509)
@@ -477,8 +477,6 @@
 	 * (NOTE: this is ok here, the configuration is pretty straightforward) 
 	 */
 	v2d->tot.ymin= (float)(-height);
-	/* need to do a view-sync here, so that the strips area doesn't jump around */
-	UI_view2d_sync(NULL, ac->sa, v2d, V2D_VIEWSYNC_AREA_VERTICAL);
 	
 	/* loop through channels, and set up drawing depending on their type  */	
 	y= (float)(-NLACHANNEL_HEIGHT);
@@ -837,6 +835,8 @@
 	 * (NOTE: this is ok here, the configuration is pretty straightforward) 
 	 */
 	v2d->tot.ymin= (float)(-height);
+	/* need to do a view-sync here, so that the keys area doesn't jump around (it must copy this) */
+	UI_view2d_sync(NULL, ac->sa, v2d, V2D_LOCK_COPY);
 	
 	/* draw channels */
 	{	/* first pass: backdrops + oldstyle drawing */

Modified: trunk/blender/source/blender/editors/space_nla/space_nla.c
===================================================================
--- trunk/blender/source/blender/editors/space_nla/space_nla.c	2010-10-16 04:14:26 UTC (rev 32508)
+++ trunk/blender/source/blender/editors/space_nla/space_nla.c	2010-10-16 05:07:33 UTC (rev 32509)
@@ -148,16 +148,17 @@
 	ar->v2d.cur = ar->v2d.tot;
 	
 	ar->v2d.min[0]= 0.0f;
-	 ar->v2d.min[1]= 0.0f;
+	ar->v2d.min[1]= 0.0f;
 	
 	ar->v2d.max[0]= MAXFRAMEF;
-	 ar->v2d.max[1]= 10000.0f;
+	ar->v2d.max[1]= 10000.0f;
  	
 	ar->v2d.minzoom= 0.01f;
 	ar->v2d.maxzoom= 50;
 	ar->v2d.scroll = (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL);
 	ar->v2d.scroll |= (V2D_SCROLL_RIGHT);
 	ar->v2d.keepzoom= V2D_LOCKZOOM_Y;
+	ar->v2d.keepofs= V2D_KEEPOFS_Y;
 	ar->v2d.align= V2D_ALIGN_NO_POS_Y;
 	ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
 	





More information about the Bf-blender-cvs mailing list