Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2009-02-09 18:50:09 +0300
committerTon Roosendaal <ton@blender.org>2009-02-09 18:50:09 +0300
commitf33309b0285079c14a8f9fc913157129ff6cbc81 (patch)
treea9a1e7dd869b8c09a8e8c1411bf995ddeb5703c3 /source/blender/blenkernel/intern/scene.c
parentc58d336a33b4105530af326dccef077ba0274fa6 (diff)
2.5
- Added depsgraph tag for object-change in AnimData, so the new animsys doesn't have to all objects anymore. (Still WIP, depsgraph has to do this much better) - Bugfix in notifiers; only 1 notifier was handled for frame updates Result: 2 windows, displaying 2 scenes, now can be edited independently, and play independent. Not when they share data, of course. :)
Diffstat (limited to 'source/blender/blenkernel/intern/scene.c')
-rw-r--r--source/blender/blenkernel/intern/scene.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 9cdd67428ac..7b3ac9e4ec2 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -565,16 +565,44 @@ int scene_check_setscene(Scene *sce)
return 1;
}
+/* This (evil) function is needed to cope with two legacy Blender rendering features
+* mblur (motion blur that renders 'subframes' and blurs them together), and fields
+* rendering. Thus, the use of ugly globals from object.c
+*/
+// BAD... EVIL... JUJU...!!!!
+// XXX moved here temporarily
+float frame_to_float (Scene *scene, int cfra) /* see also bsystem_time in object.c */
+{
+ extern float bluroffs; /* bad stuff borrowed from object.c */
+ extern float fieldoffs;
+ float ctime;
+
+ ctime= (float)cfra;
+ ctime+= bluroffs+fieldoffs;
+ ctime*= scene->r.framelen;
+
+ return ctime;
+}
+
static void scene_update(Scene *sce, unsigned int lay)
{
Base *base;
Object *ob;
+ float ctime = frame_to_float(sce, sce->r.cfra);
if(sce->theDag==NULL)
DAG_scene_sort(sce);
DAG_scene_update_flags(sce, lay); // only stuff that moves or needs display still
+ /* All 'standard' (i.e. without any dependencies) animation is handled here,
+ * with an 'local' to 'macro' order of evaluation. This should ensure that
+ * settings stored nestled within a hierarchy (i.e. settings in a Texture block
+ * can be overridden by settings from Scene, which owns the Texture through a hierarchy
+ * such as Scene->World->MTex/Texture) can still get correctly overridden.
+ */
+ BKE_animsys_evaluate_all_animation(G.main, ctime);
+
for(base= sce->base.first; base; base= base->next) {
ob= base->object;
@@ -588,43 +616,15 @@ static void scene_update(Scene *sce, unsigned int lay)
}
}
-/* This (evil) function is needed to cope with two legacy Blender rendering features
- * mblur (motion blur that renders 'subframes' and blurs them together), and fields
- * rendering. Thus, the use of ugly globals from object.c
- */
-// BAD... EVIL... JUJU...!!!!
-// XXX moved here temporarily
-float frame_to_float (Scene *scene, int cfra) /* see also bsystem_time in object.c */
-{
- extern float bluroffs; /* bad stuff borrowed from object.c */
- extern float fieldoffs;
- float ctime;
-
- ctime= (float)cfra;
- ctime+= bluroffs+fieldoffs;
- ctime*= scene->r.framelen;
-
- return ctime;
-}
/* applies changes right away, does all sets too */
void scene_update_for_newframe(Scene *sce, unsigned int lay)
{
Scene *scene= sce;
- float ctime = frame_to_float(sce, sce->r.cfra);
/* clear animation overrides */
// XXX TODO...
- /* All 'standard' (i.e. without any dependencies) animation is handled here,
- * with an 'local' to 'macro' order of evaluation. This should ensure that
- * settings stored nestled within a hierarchy (i.e. settings in a Texture block
- * can be overridden by settings from Scene, which owns the Texture through a hierarchy
- * such as Scene->World->MTex/Texture) can still get correctly overridden.
- */
- BKE_animsys_evaluate_all_animation(G.main, ctime);
-
-
#ifndef DISABLE_PYTHON
if (G.f & G_DOSCRIPTLINKS) BPY_do_all_scripts(SCRIPT_FRAMECHANGED, 0);
#endif