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:
-rw-r--r--source/blender/blenkernel/intern/modifier.c46
-rw-r--r--source/blender/modifiers/MOD_modifiertypes.h3
-rw-r--r--source/blender/modifiers/intern/MOD_util.c45
-rw-r--r--source/blender/modifiers/intern/MOD_util.h3
-rw-r--r--source/creator/CMakeLists.txt2
5 files changed, 54 insertions, 45 deletions
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index e483ae0e6a8..858e9d6c6d9 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -54,50 +54,8 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type)
static int types_init = 1;
if (types_init) {
- memset(types, 0, sizeof(types));
-
-#define INIT_TYPE(typeName) \
- (types[eModifierType_##typeName] = &modifierType_##typeName)
-
- INIT_TYPE(None);
- INIT_TYPE(Curve);
- INIT_TYPE(Lattice);
- INIT_TYPE(Subsurf);
- INIT_TYPE(Build);
- INIT_TYPE(Array);
- INIT_TYPE(Mirror);
- INIT_TYPE(EdgeSplit);
- INIT_TYPE(Bevel);
- INIT_TYPE(Displace);
- INIT_TYPE(UVProject);
- INIT_TYPE(Decimate);
- INIT_TYPE(Smooth);
- INIT_TYPE(Cast);
- INIT_TYPE(Wave);
- INIT_TYPE(Armature);
- INIT_TYPE(Hook);
- INIT_TYPE(Softbody);
- INIT_TYPE(Cloth);
- INIT_TYPE(Collision);
- INIT_TYPE(Boolean);
- INIT_TYPE(MeshDeform);
- INIT_TYPE(ParticleSystem);
- INIT_TYPE(ParticleInstance);
- INIT_TYPE(Explode);
- INIT_TYPE(Shrinkwrap);
- INIT_TYPE(Fluidsim);
- INIT_TYPE(Mask);
- INIT_TYPE(SimpleDeform);
- INIT_TYPE(Multires);
- INIT_TYPE(Surface);
- INIT_TYPE(Smoke);
- INIT_TYPE(ShapeKey);
- INIT_TYPE(Solidify);
- INIT_TYPE(Screw);
-
- types_init = 0;
-
-#undef INIT_TYPE
+ modifier_type_init(types, type); /* MOD_utils.c */
+ types_init= 0;
}
if(type >= 0 && type < NUM_MODIFIER_TYPES &&
diff --git a/source/blender/modifiers/MOD_modifiertypes.h b/source/blender/modifiers/MOD_modifiertypes.h
index 5ddb15e656f..bd10b4aa6fc 100644
--- a/source/blender/modifiers/MOD_modifiertypes.h
+++ b/source/blender/modifiers/MOD_modifiertypes.h
@@ -68,4 +68,7 @@ extern ModifierTypeInfo modifierType_ShapeKey;
extern ModifierTypeInfo modifierType_Solidify;
extern ModifierTypeInfo modifierType_Screw;
+/* MOD_util.c */
+void modifier_type_init(ModifierTypeInfo *types[], ModifierType type);
+
#endif //MOD_MODIFIERTYPES_H
diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c
index d4e202a73b9..7cae7f634c7 100644
--- a/source/blender/modifiers/intern/MOD_util.c
+++ b/source/blender/modifiers/intern/MOD_util.c
@@ -40,8 +40,10 @@
#include "BKE_mesh.h"
#include "BKE_displist.h"
#include "BKE_utildefines.h"
+#include "BKE_modifier.h"
#include "MOD_util.h"
+#include "MOD_modifiertypes.h"
#include "MEM_guardedalloc.h"
@@ -165,3 +167,46 @@ DerivedMesh *get_dm(struct Scene *scene, Object *ob, struct EditMesh *em, Derive
return dm;
}
+
+/* only called by BKE_modifier.h/modifier.c */
+void modifier_type_init(ModifierTypeInfo *types[], ModifierType type)
+{
+ memset(types, 0, sizeof(types));
+#define INIT_TYPE(typeName) (types[eModifierType_##typeName] = &modifierType_##typeName)
+ INIT_TYPE(None);
+ INIT_TYPE(Curve);
+ INIT_TYPE(Lattice);
+ INIT_TYPE(Subsurf);
+ INIT_TYPE(Build);
+ INIT_TYPE(Array);
+ INIT_TYPE(Mirror);
+ INIT_TYPE(EdgeSplit);
+ INIT_TYPE(Bevel);
+ INIT_TYPE(Displace);
+ INIT_TYPE(UVProject);
+ INIT_TYPE(Decimate);
+ INIT_TYPE(Smooth);
+ INIT_TYPE(Cast);
+ INIT_TYPE(Wave);
+ INIT_TYPE(Armature);
+ INIT_TYPE(Hook);
+ INIT_TYPE(Softbody);
+ INIT_TYPE(Cloth);
+ INIT_TYPE(Collision);
+ INIT_TYPE(Boolean);
+ INIT_TYPE(MeshDeform);
+ INIT_TYPE(ParticleSystem);
+ INIT_TYPE(ParticleInstance);
+ INIT_TYPE(Explode);
+ INIT_TYPE(Shrinkwrap);
+ INIT_TYPE(Fluidsim);
+ INIT_TYPE(Mask);
+ INIT_TYPE(SimpleDeform);
+ INIT_TYPE(Multires);
+ INIT_TYPE(Surface);
+ INIT_TYPE(Smoke);
+ INIT_TYPE(ShapeKey);
+ INIT_TYPE(Solidify);
+ INIT_TYPE(Screw);
+#undef INIT_TYPE
+}
diff --git a/source/blender/modifiers/intern/MOD_util.h b/source/blender/modifiers/intern/MOD_util.h
index 98cea11e9f6..9592a3ce123 100644
--- a/source/blender/modifiers/intern/MOD_util.h
+++ b/source/blender/modifiers/intern/MOD_util.h
@@ -42,4 +42,7 @@ void modifier_vgroup_cache(struct ModifierData *md, float (*vertexCos)[3]);
void validate_layer_name(const struct CustomData *data, int type, char *name, char *outname);
struct DerivedMesh *get_cddm(struct Scene *scene, struct Object *ob, struct EditMesh *em, struct DerivedMesh *dm, float (*vertexCos)[3]);
struct DerivedMesh *get_dm(struct Scene *scene, struct Object *ob, struct EditMesh *em, struct DerivedMesh *dm, float (*vertexCos)[3], int orco);
+
+void modifier_type_init(struct ModifierTypeInfo *types[], ModifierType type);
+
#endif /* MOD_UTIL_H */
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 42883ffd4dd..193217abc9d 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -369,8 +369,8 @@ ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
bf_python
bf_gen_python
bf_ikplugin
- bf_blenkernel
bf_modifiers
+ bf_blenkernel
bf_nodes
bf_gpu
bf_blenloader