[Bf-blender-cvs] [a40efb7] gooseberry: Some disabled code to enable automatic cache updates on every duplilist creation call.
Lukas Tönne
noreply at git.blender.org
Mon Mar 23 13:03:27 CET 2015
Commit: a40efb781058e4e3e00a40ab059e846f936fec86
Author: Lukas Tönne
Date: Thu Mar 12 18:03:41 2015 +0100
Branches: gooseberry
https://developer.blender.org/rBa40efb781058e4e3e00a40ab059e846f936fec86
Some disabled code to enable automatic cache updates on every duplilist
creation call.
This is executed *a lot* (even for simple things such as viewport
panning), so the code is probably not suitable in this form. At least
it could do a frame comparison to avoid unnecessary updates.
===================================================================
M source/blender/blenkernel/intern/object_dupli.c
===================================================================
diff --git a/source/blender/blenkernel/intern/object_dupli.c b/source/blender/blenkernel/intern/object_dupli.c
index d5030da..636c554 100644
--- a/source/blender/blenkernel/intern/object_dupli.c
+++ b/source/blender/blenkernel/intern/object_dupli.c
@@ -1186,6 +1186,18 @@ static const DupliGenerator *get_dupli_generator(const DupliContext *ctx)
/* Returns a list of DupliObject */
ListBase *object_duplilist_ex(EvaluationContext *eval_ctx, Scene *scene, Object *ob, bool update)
{
+ /* XXX Warning: this could potentially lead to a lot of unnecessary cache reading!
+ * In the future proper depsgraph integration of dupli cache updates would be desirable.
+ */
+#if 0
+ if (update) {
+ if (G.debug & G_DEBUG)
+ printf("Update dupli cache for object '%s'\n", ob->id.name+2);
+
+ BKE_object_dupli_cache_update(scene, ob, eval_ctx);
+ }
+#endif
+
if (ob->dup_cache) {
/* XXX current use of duplilist expects a one-time list copy */
ListBase *duplilist = MEM_callocN(sizeof(ListBase), "duplilist");
More information about the Bf-blender-cvs
mailing list