From beffaa293ee2b111f256b989bd038460bde1eea0 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 19 Aug 2013 09:05:34 +0000 Subject: Made modifiers_getVirtualModifierList safe for threading Move static variables to context filling in by this fcuntion and owned by a callee function. This ensures no conflicts between threads happens because of static variables used in this function. Also moved modifier types and virtual modifiers data to a function called from creator. This is needed to be sure all the information is properly initialied to the time when threads starts to use this data. -- svn merge -r57899:57900 ^/branches/soc-2013-depsgraph_mt --- source/blender/blenkernel/intern/lattice.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/blenkernel/intern/lattice.c') diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c index a4892253c63..069c3ab8ea2 100644 --- a/source/blender/blenkernel/intern/lattice.c +++ b/source/blender/blenkernel/intern/lattice.c @@ -991,7 +991,8 @@ void BKE_lattice_vertexcos_apply(struct Object *ob, float (*vertexCos)[3]) void BKE_lattice_modifiers_calc(Scene *scene, Object *ob) { Lattice *lt = ob->data; - ModifierData *md = modifiers_getVirtualModifierList(ob); + VirtualModifierData virtualModifierData; + ModifierData *md = modifiers_getVirtualModifierList(ob, &virtualModifierData); float (*vertexCos)[3] = NULL; int numVerts, editmode = (lt->editlatt != NULL); -- cgit v1.2.3