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/BKE_modifier.h
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/BKE_modifier.h')
-rw-r--r--source/blender/blenkernel/BKE_modifier.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h
index 0727e11f397..8f0d612d473 100644
--- a/source/blender/blenkernel/BKE_modifier.h
+++ b/source/blender/blenkernel/BKE_modifier.h
@@ -304,6 +304,9 @@ typedef struct ModifierTypeInfo {
TexWalkFunc walk, void *userData);
} ModifierTypeInfo;
+/* Initialize modifier's global data (type info and some common global storages). */
+void BKE_modifier_init(void);
+
ModifierTypeInfo *modifierType_getInfo(ModifierType type);
/* Modifier utility calls, do call through type pointer and return
@@ -377,7 +380,15 @@ struct CDMaskLink *modifiers_calcDataMasks(struct Scene *scene,
struct ModifierData *modifiers_getLastPreview(struct Scene *scene,
struct ModifierData *md,
int required_mode);
-struct ModifierData *modifiers_getVirtualModifierList(struct Object *ob);
+
+typedef struct VirtualModifierData {
+ ArmatureModifierData amd;
+ CurveModifierData cmd;
+ LatticeModifierData lmd;
+ ShapeKeyModifierData smd;
+} VirtualModifierData;
+
+struct ModifierData *modifiers_getVirtualModifierList(struct Object *ob, struct VirtualModifierData *data);
/* ensure modifier correctness when changing ob->data */
void test_object_modifiers(struct Object *ob);