[Bf-committers] sequence.c

Shaul Kedem shaul.kedem at gmail.com
Fri Sep 16 16:56:59 CEST 2005


Thnx,
 Now lets say that nr goes from 30 down to 20..
 se will be: 30, 59, 87 (30+29+28), because se += nr.
 What I am trying to understand is the logic behind such pointer addition.. 
why '+=' ?
 Shaul

 On 9/16/05, Kent Mein <mein at cs.umn.edu> wrote: 
> 
> In reply to Shaul Kedem (shaul.kedem at gmail.com):
> 
> Well looking at the code it looks like
> nr = the part of the strip we want data for. (Call it frame)
> se+= nr; Jumps to the part we want.
> se->nr = nr; I'm guessing is to give it its "Frame" #
> I'm guessing some other code uses it.
> 
> Kent
> 
> 
> > Hi all,
> > In the following code :
> >
> > StripElem *give_stripelem(Sequence *seq, int cfra)
> > {
> > Strip *strip;
> > StripElem *se;
> > int nr;
> >
> > strip= seq->strip;
> > se= strip->stripdata;
> >
> > *if*(se==0) *return* 0;
> > *if*(seq->startdisp >cfra || seq->enddisp <= cfra) *return* 0;
> >
> > *if*(cfra <= seq->start) nr= 0;
> > *else* *if*(cfra >= seq->start+seq->len-1) nr= seq->len-1;
> > *else* nr= cfra-seq->start;
> >
> >
> > se+= nr;
> > se->nr= nr;
> >
> > *return* se;
> > }
> >
> > Please advise; why is there an se+= nr and se->nr = nr at the end of
> > this function?
> >
> > Thnx,
> > Shaul
> 
> > _______________________________________________
> > Bf-committers mailing list
> > Bf-committers at projects.blender.org
> > http://projects.blender.org/mailman/listinfo/bf-committers
> 
> 
> --
> mein at cs.umn.edu
> http://www.cs.umn.edu/~mein
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.blender.org/pipermail/bf-committers/attachments/20050916/743b2f5f/attachment-0001.htm


More information about the Bf-committers mailing list