forked from bartvdbraak/blender
re-arrange modifier and blenkernel to overcome some linking problems that stopped modifiers being able to build when using some blender-kernel defined stuff
This commit is contained in:
parent
2cec60e2eb
commit
b37ae4a375
@ -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 &&
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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 */
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user