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>2017-11-24 12:18:16 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-11-24 12:19:48 +0300
commit87c821ff26be9f3049993088042dc74b0c141003 (patch)
tree403b3d4af266fc826c6507f631d68970206325db /source/blender/blenkernel/intern/object_update.c
parent93f6a9d65220f9c43dc6dde7886880d77015eb8c (diff)
Depsgraph: Flush flags from base to object as an evaluation step
Previously it was done during depsgraph iteration, which is not good at all, since after evaluation nobody should really modify how object was evaluated.
Diffstat (limited to 'source/blender/blenkernel/intern/object_update.c')
-rw-r--r--source/blender/blenkernel/intern/object_update.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/object_update.c b/source/blender/blenkernel/intern/object_update.c
index 8da3e8136b3..85f207509c2 100644
--- a/source/blender/blenkernel/intern/object_update.c
+++ b/source/blender/blenkernel/intern/object_update.c
@@ -383,13 +383,16 @@ void BKE_object_eval_uber_data(const EvaluationContext *eval_ctx,
ob->recalc &= ~(OB_RECALC_DATA | OB_RECALC_TIME);
}
-void BKE_object_eval_cloth(const EvaluationContext *UNUSED(eval_ctx), Scene *scene, Object *object)
+void BKE_object_eval_cloth(const EvaluationContext *UNUSED(eval_ctx),
+ Scene *scene,
+ Object *object)
{
DEBUG_PRINT("%s on %s (%p)\n", __func__, object->id.name, object);
BKE_ptcache_object_reset(scene, object, PTCACHE_RESET_DEPSGRAPH);
}
-void BKE_object_eval_update_shading(const EvaluationContext *UNUSED(eval_ctx), Object *object)
+void BKE_object_eval_update_shading(const EvaluationContext *UNUSED(eval_ctx),
+ Object *object)
{
DEBUG_PRINT("%s on %s (%p)\n", __func__, object->id.name, object);
if (object->type == OB_MESH) {
@@ -418,3 +421,15 @@ void BKE_object_data_select_update(const EvaluationContext *UNUSED(eval_ctx),
break;
}
}
+
+void BKE_object_eval_flush_base_flags(const EvaluationContext *UNUSED(eval_ctx),
+ Object *object, Base *base)
+{
+ /* Make sure we have the base collection settings is already populated.
+ * This will fail when BKE_layer_eval_layer_collection_pre hasn't run yet
+ * Which usually means a missing call to DEG_id_tag_update(). */
+ BLI_assert(!BLI_listbase_is_empty(&base->collection_properties->data.group));
+ /* Copy flags and settings from base. */
+ object->base_flag = base->flag;
+ object->base_collection_properties = base->collection_properties;
+}