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:
-rw-r--r--source/blender/blenkernel/BKE_object.h3
-rw-r--r--source/blender/blenkernel/intern/object.c11
-rw-r--r--source/blender/blenkernel/intern/scene.c10
3 files changed, 15 insertions, 9 deletions
diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h
index 72c4c21d587..2ad6c54fb67 100644
--- a/source/blender/blenkernel/BKE_object.h
+++ b/source/blender/blenkernel/BKE_object.h
@@ -167,7 +167,8 @@ void BKE_object_tfm_protected_restore(struct Object *ob,
void BKE_object_handle_update(struct EvaluationContext *eval_ctx, struct Scene *scene, struct Object *ob);
void BKE_object_handle_update_ex(struct EvaluationContext *eval_ctx,
struct Scene *scene, struct Object *ob,
- struct RigidBodyWorld *rbw);
+ struct RigidBodyWorld *rbw,
+ const bool do_proxy_update);
void BKE_object_sculpt_modifiers_changed(struct Object *ob);
int BKE_object_obdata_texspace_get(struct Object *ob, short **r_texflag, float **r_loc, float **r_size, float **r_rot);
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index fb4fde91d8b..88bd7d74743 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -2843,7 +2843,8 @@ bool BKE_object_parent_loop_check(const Object *par, const Object *ob)
/* Ideally we shouldn't have to pass the rigid body world, but need bigger restructuring to avoid id */
void BKE_object_handle_update_ex(EvaluationContext *eval_ctx,
Scene *scene, Object *ob,
- RigidBodyWorld *rbw)
+ RigidBodyWorld *rbw,
+ const bool do_proxy_update)
{
if (ob->recalc & OB_RECALC_ALL) {
/* speed optimization for animation lookups */
@@ -3036,8 +3037,10 @@ void BKE_object_handle_update_ex(EvaluationContext *eval_ctx,
/* the no-group proxy case, we call update */
if (ob->proxy_group == NULL) {
- // printf("call update, lib ob %s proxy %s\n", ob->proxy->id.name, ob->id.name);
- BKE_object_handle_update(eval_ctx, scene, ob->proxy);
+ if (do_proxy_update) {
+ // printf("call update, lib ob %s proxy %s\n", ob->proxy->id.name, ob->id.name);
+ BKE_object_handle_update(eval_ctx, scene, ob->proxy);
+ }
}
}
}
@@ -3048,7 +3051,7 @@ void BKE_object_handle_update_ex(EvaluationContext *eval_ctx,
*/
void BKE_object_handle_update(EvaluationContext *eval_ctx, Scene *scene, Object *ob)
{
- BKE_object_handle_update_ex(eval_ctx, scene, ob, NULL);
+ BKE_object_handle_update_ex(eval_ctx, scene, ob, NULL, true);
}
void BKE_object_sculpt_modifiers_changed(Object *ob)
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) {