Commit: fe3657a57509909dafeaa597cdc39c42987a184a
Author: Lukas Tönne
Date: Wed Dec 16 13:43:36 2015 +0100
Branches: object_nodes
https://developer.blender.org/rBfe3657a57509909dafeaa597cdc39c42987a184a
Use the bvm function cache for modifier nodes, to avoid recompiling all the
time.
===================================================================
M source/blender/blenkernel/intern/DerivedMesh.c
===================================================================
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c
b/source/blender/blenkernel/intern/DerivedMesh.c
index 9e52332..51bc8e2 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -1708,7 +1708,11 @@ static DerivedMesh *mesh_calc_modifier_nodes(Scene
*UNUSED(scene), Object *ob, b
Mesh *me = ob->data;
DerivedMesh *dm, *result;
- struct BVMFunction *fn = BVM_gen_modifier_function(ob, ntree, NULL);
+ struct BVMFunction *fn = BVM_function_cache_acquire(ntree);
+ if (!fn) {
+ fn = BVM_gen_modifier_function(ob, ntree, NULL);
+ BVM_function_cache_set(ntree, fn);
+ }
{
struct BVMEvalGlobals *globals = BVM_globals_create();
@@ -1721,7 +1725,7 @@ static DerivedMesh *mesh_calc_modifier_nodes(Scene
*UNUSED(scene), Object *ob, b
BVM_globals_free(globals);
}
- BVM_function_free(fn);
+ BVM_function_release(fn);
/* XXX this is stupid, but currently required because of
* the unreliability of dm->needsFree ...
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs