[Bf-blender-cvs] [4a39911] gooseberry: Left a comment in DerivedMesh.c explaining why the caching system has to use the cumbersome cachedm pointer instead of virtual modifiers.
Lukas Tönne
noreply at git.blender.org
Mon Mar 23 13:02:36 CET 2015
Commit: 4a399119f36afbafa05ad65fb31ff9205e1ee1c6
Author: Lukas Tönne
Date: Wed Mar 4 18:29:15 2015 +0100
Branches: gooseberry
https://developer.blender.org/rB4a399119f36afbafa05ad65fb31ff9205e1ee1c6
Left a comment in DerivedMesh.c explaining why the caching system has
to use the cumbersome cachedm pointer instead of virtual modifiers.
===================================================================
M source/blender/blenkernel/intern/DerivedMesh.c
===================================================================
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index de2cfc8..b1053b4 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -1593,6 +1593,11 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
modifiers_clearErrors(ob);
+ /* XXX it would be nicer to treat caching as a virtual modifier (when no actual cache modifier is used).
+ * However, the virtual modifiers work by setting their own 'next' pointers without touching actual
+ * modifier DNA. This is possible only for prepending at the beginning, but not for appending
+ * at the end of the modifier stack.
+ */
if (BKE_cache_read_derived_mesh(G.main, scene, scene->r.cfra, cache_eval_mode, ob, &cachedm)) {
CacheModifierData *cmd = (CacheModifierData *)mesh_find_cache_modifier(scene, ob, required_mode);
if (cmd) {
More information about the Bf-blender-cvs
mailing list