* Tweaked a few incorrect comments in Constraints code
* Made Sequencer use View2D system correctly (only looked at the 'time-grid' thing so far).
This commit is contained in:
Joshua Leung 2009-01-12 22:54:30 +00:00
parent ab39a3f2b7
commit ae25863d6c
5 changed files with 7 additions and 7 deletions

View File

@ -79,7 +79,7 @@ typedef struct bConstraintTypeInfo {
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 */

View File

@ -3389,7 +3389,7 @@ void copy_constraints (ListBase *dst, ListBase *src)
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 */

View File

@ -5268,7 +5268,6 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb)
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 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb)
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 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb)
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 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb)
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;
}

View File

@ -944,7 +944,8 @@ void seq_home(Scene *scene, ARegion *ar, SpaceSeq *sseq)
}
#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 @@ void drawseqspace(const bContext *C, ARegion *ar)
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);
}

View File

@ -111,6 +111,7 @@ static SpaceLink *sequencer_new(const bContext *C)
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;
}