[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20658] trunk/blender/source/blender/src/ editseq.c: Fix "duplicate strip" always increase the user count for ipo.

Pablo Vazquez - www.venomgfx.com.ar venomgfx at gmail.com
Fri Jun 5 22:18:39 CEST 2009


Thanks for fixing this one bdiego, it was annoying that every time you
Shift + D a strip in the sequencer, you get the same IPO even when
you've enabled on the User Preferences > Edit Method> the option to
say that Blender should make a new copy of the IPOs on every
duplicate, like for every other datablock (materials, object ipos,
etc).


* Pablo Vazquez
Freelance 3D Artist
info at venomgfx.com.ar
www.venomgfx.com.ar



On Fri, Jun 5, 2009 at 18:54, Diego Borghetti<bdiego at gmail.com> wrote:
> Revision: 20658
>          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20658
> Author:   bdiego
> Date:     2009-06-05 18:54:06 +0200 (Fri, 05 Jun 2009)
>
> Log Message:
> -----------
> Fix "duplicate strip" always increase the user count for ipo.
>
> As venomgfx point, the shift+d function never duplicate the ipo block
> if we have enable the option in UserDef -> Edit Methods -> Ipo.
>
> Now, if Ipo option is disable, we just increase the user count, otherwise
> we duplicate the ipo.
>
> Note: Alighorith, we need call ipo_idnew here ? (like single_ipo_users)
>
> Modified Paths:
> --------------
>    trunk/blender/source/blender/src/editseq.c
>
> Modified: trunk/blender/source/blender/src/editseq.c
> ===================================================================
> --- trunk/blender/source/blender/src/editseq.c  2009-06-05 16:53:21 UTC (rev 20657)
> +++ trunk/blender/source/blender/src/editseq.c  2009-06-05 16:54:06 UTC (rev 20658)
> @@ -68,6 +68,7 @@
>  #include "BKE_library.h"
>  #include "BKE_main.h"
>  #include "BKE_scene.h"
> +#include "BKE_ipo.h"
>
>  #include "BIF_space.h"
>  #include "BIF_interface.h"
> @@ -2243,12 +2244,30 @@
>  static Sequence *dupli_seq(Sequence *seq)
>  {
>        Sequence *seqn = MEM_dupallocN(seq);
> +       ID *id;
>
>        seq->tmp = seqn;
>
>        seqn->strip= MEM_dupallocN(seq->strip);
>
> -       if(seqn->ipo) seqn->ipo->id.us++;
> +       if (seqn->ipo) {
> +               if (U.dupflag & USER_DUP_IPO) {
> +                       id= (ID *)seqn->ipo;
> +                       seqn->ipo= copy_ipo(seqn->ipo);
> +                       /* we don't need to decrease the number
> +                        * of the ipo because we never increase it,
> +                        * for example, adduplicate need decrease
> +                        * the number but only because copy_object
> +                        * call id_us_plus for the ipo block and
> +                        * single_ipo_users only work if id->us > 1.
> +                        *
> +                        * need call ipo_idnew here, for drivers ??
> +                        * - Diego
> +                        */
> +               }
> +               else
> +                       seqn->ipo->id.us++;
> +       }
>
>        seqn->strip->tstripdata = 0;
>        seqn->strip->tstripdata_startstill = 0;
>
>
> _______________________________________________
> Bf-blender-cvs mailing list
> Bf-blender-cvs at blender.org
> http://lists.blender.org/mailman/listinfo/bf-blender-cvs
>


More information about the Bf-committers mailing list