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>2013-08-19 13:05:34 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-08-19 13:05:34 +0400
commitbeffaa293ee2b111f256b989bd038460bde1eea0 (patch)
tree9dbb83497da3cc5ed65d902666d094729c50f21e /source/blender/blenkernel/intern/DerivedMesh.c
parenta14febc70a0f8cb1ec8082600104a6629b0a20ee (diff)
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
Diffstat (limited to 'source/blender/blenkernel/intern/DerivedMesh.c')
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index 2ece90183bd..7e069c20c24 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -1440,6 +1440,8 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
/* XXX Same as above... For now, only weights preview in WPaint mode. */
const int do_mod_wmcol = do_init_wmcol;
+ VirtualModifierData virtualModifierData;
+
ModifierApplyFlag app_flags = useRenderParams ? MOD_APPLY_RENDER : 0;
ModifierApplyFlag deform_app_flags = app_flags;
if (useCache)
@@ -1451,7 +1453,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
has_multires = 0;
if (!skipVirtualArmature) {
- firstmd = modifiers_getVirtualModifierList(ob);
+ firstmd = modifiers_getVirtualModifierList(ob, &virtualModifierData);
}
else {
/* game engine exception */
@@ -1961,6 +1963,7 @@ static void editbmesh_calc_modifiers(Scene *scene, Object *ob, BMEditMesh *em, D
int do_init_wmcol = ((((Mesh *)ob->data)->drawflag & ME_DRAWEIGHT) && !do_final_wmcol);
int do_init_statvis = ((((Mesh *)ob->data)->drawflag & ME_DRAW_STATVIS) && !do_init_wmcol);
const int do_mod_wmcol = do_init_wmcol;
+ VirtualModifierData virtualModifierData;
modifiers_clearErrors(ob);
@@ -1969,7 +1972,7 @@ static void editbmesh_calc_modifiers(Scene *scene, Object *ob, BMEditMesh *em, D
}
dm = NULL;
- md = modifiers_getVirtualModifierList(ob);
+ md = modifiers_getVirtualModifierList(ob, &virtualModifierData);
/* copied from mesh_calc_modifiers */
if (do_mod_wmcol) {