[Bf-blender-cvs] [2c206fe] soc-2013-depsgraph_mt: Fixes for stupid mistakes from a while ago
Sergey Sharybin
noreply at git.blender.org
Thu Nov 21 13:41:09 CET 2013
Commit: 2c206febd567775ba9ea21491b526e3b7f641d80
Author: Sergey Sharybin
Date: Thu Nov 21 01:50:57 2013 +0600
http://developer.blender.org/rB2c206febd567775ba9ea21491b526e3b7f641d80
Fixes for stupid mistakes from a while ago
- Render engine's evaluation context didn't set for_render to truth.
- Use G.evaluation_context for motion path instead of local one.
===================================================================
M source/blender/blenkernel/intern/anim.c
M source/blender/render/intern/source/pipeline.c
===================================================================
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c
index 7ae2bc1..7908432 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -327,13 +327,10 @@ static void motionpaths_calc_optimise_depsgraph(Scene *scene, ListBase *targets)
static void motionpaths_calc_update_scene(Scene *scene)
{
#if 1 // 'production' optimizations always on
- EvaluationContext evaluation_context;
- evaluation_context.for_render = false;
-
/* rigid body simulation needs complete update to work correctly for now */
/* RB_TODO investigate if we could avoid updating everything */
if (BKE_scene_check_rigidbody_active(scene)) {
- BKE_scene_update_for_newframe(&evaluation_context, G.main, scene, scene->lay);
+ BKE_scene_update_for_newframe(G.main->evaluation_context, G.main, scene, scene->lay);
}
else { /* otherwise we can optimize by restricting updates */
Base *base, *last = NULL;
@@ -355,7 +352,7 @@ static void motionpaths_calc_update_scene(Scene *scene)
* is animated but not attached to/updatable from objects */
for (base = scene->base.first; base; base = base->next) {
/* update this object */
- BKE_object_handle_update(&evaluation_context, scene, base->object);
+ BKE_object_handle_update(G.main->evaluation_context, scene, base->object);
/* if this is the last one we need to update, let's stop to save some time */
if (base == last)
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index f1b5c34..9056bec 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -375,6 +375,7 @@ Render *RE_NewRender(const char *name)
BLI_strncpy(re->name, name, RE_MAXNAME);
BLI_rw_mutex_init(&re->resultmutex);
re->evaluation_context = MEM_callocN(sizeof(EvaluationContext), "re->evaluation_context");
+ re->evaluation_context->for_render = true;
}
RE_InitRenderCB(re);
More information about the Bf-blender-cvs
mailing list