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:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-03-24 13:10:16 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-03-24 13:10:16 +0400
commitf48828b64e480b6f16c21f660d3d6212648d56d7 (patch)
tree768569ca556f8ee661bd4d154ac3907ff737784c /source/blender/blenkernel/intern/scene.c
parentb69809c820ffde1627ca85915657e8c23f2cb7ca (diff)
Fix T39318: Blender 2.70 crash when I link an asset
Issue is a regression since threaded objetc update and caused by the fact that some objects might share the same proxy object. It's all fine but object_handle_update() will call update for a proxy object which screws up threaded update. The thing is, proxy object is marked as depending on a scene object and such a call makes it so the children objetc is being updated. This is really bad and depsgraph is to take all responsibility on updating the proxy objects. So for now used a simple solution (which is safe to backport to 'a') which is skipping proxy update if the scene update is threaded and based on the DAG traversal. There are some still areas which calls object update directly and for that cases proxy object is still being updated from object_handle_update().
Diffstat (limited to 'source/blender/blenkernel/intern/scene.c')
-rw-r--r--source/blender/blenkernel/intern/scene.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 110e91711f0..a00a8c49900 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -1270,7 +1270,7 @@ static void scene_update_all_bases(EvaluationContext *eval_ctx, Scene *scene, Sc
for (base = scene->base.first; base; base = base->next) {
Object *object = base->object;
- BKE_object_handle_update_ex(eval_ctx, scene_parent, object, scene->rigidbody_world);
+ BKE_object_handle_update_ex(eval_ctx, scene_parent, object, scene->rigidbody_world, true);
if (object->dup_group && (object->transflag & OB_DUPLIGROUP))
BKE_group_handle_recalc_and_update(eval_ctx, scene_parent, object, object->dup_group);
@@ -1304,9 +1304,11 @@ static void scene_update_object_func(TaskPool *pool, void *taskdata, int threadi
double start_time = 0.0;
bool add_to_stats = false;
- PRINT("Thread %d: update object %s\n", threadid, object->id.name);
-
if (G.debug & G_DEBUG_DEPSGRAPH) {
+ if (object->recalc & OB_RECALC_ALL) {
+ printf("Thread %d: update object %s\n", threadid, object->id.name);
+ }
+
start_time = PIL_check_seconds_timer();
if (object->recalc & OB_RECALC_ALL) {
@@ -1319,7 +1321,7 @@ static void scene_update_object_func(TaskPool *pool, void *taskdata, int threadi
* separately from main thread because of we've got no idea about
* dependencies inside the group.
*/
- BKE_object_handle_update_ex(eval_ctx, scene_parent, object, scene->rigidbody_world);
+ BKE_object_handle_update_ex(eval_ctx, scene_parent, object, scene->rigidbody_world, false);
/* Calculate statistics. */
if (add_to_stats) {