[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38059] branches/soc-2011-pepper/source/ blender/blenkernel/intern/depsgraph.c: Experimental depsgraph tweak:

Daniel Salazar - 3Developer.com zanqdo at gmail.com
Sun Jul 3 17:15:20 CEST 2011


Hi Josh, the idea (that I have discussed with cam too) is add some
more useful functions and variables to the driver_namespace. So
instead of an ugly  bpy.context.scene.frame_current we could just type
frame or cframe or something, and this can be future proof since we
can just change the definition of "frame" whenever is needed

cheers!

Daniel Salazar
3Developer.com



On Sun, Jul 3, 2011 at 5:56 AM, Joshua Leung <aligorith at gmail.com> wrote:
> Revision: 38059
>          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38059
> Author:   aligorith
> Date:     2011-07-03 11:56:24 +0000 (Sun, 03 Jul 2011)
> Log Message:
> -----------
> Experimental depsgraph tweak:
> Objects with drivers are now treated as needing updates when the
> current frame changes. This assumption has been documented in the
> code, and should at least mean that users who try to use drivers for
> creating simple time-based expressions that this should work.
>
> Note:
> - It is still recommended to create a "cfra" driver variable instead
> of actually inlining bpy.context.scene.frame_current into the
> expressions. Not only does the latter look rather nasty to type/have
> in the expression, but it is also less future-proof for when I get
> around to actually working on a beefed-up depsgraph (nothing official
> on that front yet...)
>
> Modified Paths:
> --------------
>    branches/soc-2011-pepper/source/blender/blenkernel/intern/depsgraph.c
>
> Modified: branches/soc-2011-pepper/source/blender/blenkernel/intern/depsgraph.c
> ===================================================================
> --- branches/soc-2011-pepper/source/blender/blenkernel/intern/depsgraph.c       2011-07-03 11:35:30 UTC (rev 38058)
> +++ branches/soc-2011-pepper/source/blender/blenkernel/intern/depsgraph.c       2011-07-03 11:56:24 UTC (rev 38059)
> @@ -2061,6 +2061,12 @@
>                        return 1;
>        }
>
> +       /* experimental check: if we have drivers, more likely than not, on a frame change
> +        * they'll need updating because their owner changed
> +        */
> +       if (adt->drivers.first)
> +               return 1;
> +
>        return 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