[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [18469] branches/blender2.5/blender/source /blender: 2.5

Joshua Leung aligorith at gmail.com
Mon Jan 12 23:54:31 CET 2009


Revision: 18469
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=18469
Author:   aligorith
Date:     2009-01-12 23:54:30 +0100 (Mon, 12 Jan 2009)

Log Message:
-----------
2.5 

* Tweaked a few incorrect comments in Constraints code
* Made Sequencer use View2D system correctly (only looked at the 'time-grid' thing so far).

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/blenkernel/BKE_constraint.h
    branches/blender2.5/blender/source/blender/blenkernel/intern/constraint.c
    branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c
    branches/blender2.5/blender/source/blender/editors/space_sequencer/sequencer_draw.c
    branches/blender2.5/blender/source/blender/editors/space_sequencer/space_sequencer.c

Modified: branches/blender2.5/blender/source/blender/blenkernel/BKE_constraint.h
===================================================================
--- branches/blender2.5/blender/source/blender/blenkernel/BKE_constraint.h	2009-01-12 19:14:33 UTC (rev 18468)
+++ branches/blender2.5/blender/source/blender/blenkernel/BKE_constraint.h	2009-01-12 22:54:30 UTC (rev 18469)
@@ -79,7 +79,7 @@
 	void (*relink_data)(struct bConstraint *con);
 		/* copy any special data that is allocated separately (optional) */
 	void (*copy_data)(struct bConstraint *con, struct bConstraint *src);
-		/* set settings for data that will be used for bConstraint.data (memory already allocated) */
+		/* set settings for data that will be used for bConstraint.data (memory already allocated using MEM_callocN) */
 	void (*new_data)(void *cdata);
 	
 	/* target handling function pointers */

Modified: branches/blender2.5/blender/source/blender/blenkernel/intern/constraint.c
===================================================================
--- branches/blender2.5/blender/source/blender/blenkernel/intern/constraint.c	2009-01-12 19:14:33 UTC (rev 18468)
+++ branches/blender2.5/blender/source/blender/blenkernel/intern/constraint.c	2009-01-12 22:54:30 UTC (rev 18469)
@@ -3389,7 +3389,7 @@
 	dst->first= dst->last= NULL;
 	BLI_duplicatelist(dst, src);
 	
-	for (con=dst->first, srccon=src->first; con; srccon=srccon->next, con=con->next) {
+	for (con=dst->first, srccon=src->first; con && srccon; srccon=srccon->next, con=con->next) {
 		bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
 		
 		/* make a new copy of the constraint's data */

Modified: branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c	2009-01-12 19:14:33 UTC (rev 18468)
+++ branches/blender2.5/blender/source/blender/blenloader/intern/readfile.c	2009-01-12 22:54:30 UTC (rev 18469)
@@ -5268,7 +5268,6 @@
 				ar->v2d.keepzoom |= V2D_LOCKZOOM_Y;
 				ar->v2d.tot.ymin= ar->v2d.cur.ymin= -10.0;
 				ar->v2d.min[1]= ar->v2d.max[1]= 20.0;
-				//ar->v2d.flag |= V2D_IS_INITIALISED;
 			}
 				break;
 			case SPACE_IPO:
@@ -5300,7 +5299,6 @@
 				ar->v2d.scroll |= (V2D_SCROLL_RIGHT);
 				ar->v2d.align = V2D_ALIGN_NO_POS_Y;
 				ar->v2d.flag |= V2D_VIEWSYNC_AREA_VERTICAL;
-				//ar->v2d.flag |= V2D_IS_INITIALISED;
 				break;
 			}
 			case SPACE_ACTION:
@@ -5326,7 +5324,6 @@
 				ar->v2d.keepzoom= V2D_LOCKZOOM_Y;
 				ar->v2d.align= V2D_ALIGN_NO_POS_Y;
 				ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
-				//ar->v2d.flag |= V2D_IS_INITIALISED;
 				break;
 			}
 			case SPACE_SEQ:
@@ -5336,6 +5333,7 @@
 				
 				ar->v2d.scroll |= (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL);
 				ar->v2d.scroll |= (V2D_SCROLL_LEFT|V2D_SCROLL_SCALE_VERTICAL);
+				ar->v2d.align= V2D_ALIGN_NO_NEG_Y;
 				ar->v2d.flag |= V2D_IS_INITIALISED;
 				break;
 			}

Modified: branches/blender2.5/blender/source/blender/editors/space_sequencer/sequencer_draw.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/space_sequencer/sequencer_draw.c	2009-01-12 19:14:33 UTC (rev 18468)
+++ branches/blender2.5/blender/source/blender/editors/space_sequencer/sequencer_draw.c	2009-01-12 22:54:30 UTC (rev 18469)
@@ -944,7 +944,8 @@
 }
 
 #if 0
-/* XXX */
+/* XXX - these should really be made to use View2D instead of so wacko private system - Aligorith */
+
 void seq_viewzoom(SpaceSeq *sseq, unsigned short event, int invert)
 {
 
@@ -1127,7 +1128,7 @@
 	UI_view2d_view_restore(C);
 
 	/* scrollers */
-	scrollers= UI_view2d_scrollers_calc(C, v2d, 10, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY);
+	scrollers= UI_view2d_scrollers_calc(C, v2d, V2D_UNIT_SECONDSSEQ, V2D_GRID_CLAMP, V2D_UNIT_VALUES, V2D_GRID_CLAMP);
 	UI_view2d_scrollers_draw(C, v2d, scrollers);
 	UI_view2d_scrollers_free(scrollers);
 }

Modified: branches/blender2.5/blender/source/blender/editors/space_sequencer/space_sequencer.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/space_sequencer/space_sequencer.c	2009-01-12 19:14:33 UTC (rev 18468)
+++ branches/blender2.5/blender/source/blender/editors/space_sequencer/space_sequencer.c	2009-01-12 22:54:30 UTC (rev 18469)
@@ -111,6 +111,7 @@
 	ar->v2d.scroll |= (V2D_SCROLL_LEFT|V2D_SCROLL_SCALE_VERTICAL);
 	ar->v2d.keepzoom= 0;
 	ar->v2d.keeptot= 0;
+	ar->v2d.align= V2D_ALIGN_NO_NEG_Y;
 	
 	return (SpaceLink *)sseq;
 }





More information about the Bf-blender-cvs mailing list