diff options
author | Daniel Dunbar <daniel@zuster.org> | 2005-08-11 02:05:52 +0400 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2005-08-11 02:05:52 +0400 |
commit | 9030e5f686e81ab1137e0b845962298f01f6739c (patch) | |
tree | cf962f103b674b6aa4802bc0833225319adce578 /source/blender/blenkernel/BKE_modifier.h | |
parent | eb64e304b4f7882e6922cbf1fe3e33e07664135a (diff) |
- added eModifierTypeFlag_RequiresOriginalData for modifiers that
can only follow deform (for example, they store mesh vertex
indices)
- added ModifierType.foreachObjectLink for iterating over Object
links inside modifier data (used for file load, relinking, etc)
- switched various modifiers_ functions to take object argument
instead of ListBase
- added user editable name field to modifiers
- bug fix, duplicate and make single user didn't relink object
pointers in modifier data
- added modifiers to outliner, needs icon
- added armature, hook, and softbody modifiers (softbody doesn't
do anything atm). added conversion of old hooks to modifiers.
NOTE-THE-FIRST: User name field is not initialized on loading 2.38 files
so if you have saved stuff with a cvs blender you will see blank names.
NOTE-THE-SECOND: Since modifiers aren't evaluated yet for non-Mesh
objects, hooks for lattices and curves are broken. Don't updated if
you actually, say, *use* Blender.
NOTE-THE-THIRD: Old hooks used a quirky weighting system during
deformation which can't be extended to modifiers. On the upside,
I doubt anyone relied on the old quirky system and the new system
makes much more sense. (Although the way falloff works is still
quite stupid I think).
Diffstat (limited to 'source/blender/blenkernel/BKE_modifier.h')
-rw-r--r-- | source/blender/blenkernel/BKE_modifier.h | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h index 19fc11424ce..e2838622494 100644 --- a/source/blender/blenkernel/BKE_modifier.h +++ b/source/blender/blenkernel/BKE_modifier.h @@ -38,7 +38,6 @@ struct ModifierData; struct DagForest; struct DagNode; struct Object; -struct ListBase; typedef enum { /* Should not be used, only for None modifier type */ @@ -60,14 +59,19 @@ typedef enum { eModifierTypeFlag_AcceptsCVs = (1<<1), eModifierTypeFlag_SupportsMapping = (1<<2), eModifierTypeFlag_SupportsEditmode = (1<<3), - + /* For modifiers that support editmode this determines if the * modifier should be enabled by default in editmode. This should * only be used by modifiers that are relatively speedy and * also generally used in editmode, otherwise let the user enable - * it. + * it by hand. */ eModifierTypeFlag_EnableInEditmode = (1<<4), + + /* For modifiers that require original data and so cannot + * be placed after any non-deformative modifier. + */ + eModifierTypeFlag_RequiresOriginalData = (1<<5), } ModifierTypeFlag; typedef struct ModifierTypeInfo { @@ -126,6 +130,14 @@ typedef struct ModifierTypeInfo { */ int (*dependsOnTime)(struct ModifierData *md); + /* Should call the given _walk_ function on with a pointer to each Object pointer + * that the modifier data stores. This is used for linking on file load and for + * unlinking objects or forwarding object references. + * + * This function is optional. + */ + void (*foreachObjectLink)(struct ModifierData *md, struct Object *ob, void (*walk)(void *userData, Object *ob, Object **obpoin), void *userData); + /* Only for deform types, should apply the deformation * to the given vertex array. If the deformer requires information from * the object it can obtain it from the _derivedData_ argument if non-NULL, @@ -183,9 +195,10 @@ int modifier_supportsMapping(struct ModifierData *md); int modifier_couldBeCage (struct ModifierData *md); void modifier_setError (struct ModifierData *md, char *format, ...); -struct ModifierData* modifiers_findByType (struct ListBase *lb, ModifierType type); -void modifiers_clearErrors (struct ListBase *lb); -int modifiers_getCageIndex (struct ListBase *lb, int *lastPossibleCageIndex_r); +void modifiers_foreachObjectLink (struct Object *ob, void (*walk)(void *userData, struct Object *ob, struct Object **obpoin), void *userData); +struct ModifierData* modifiers_findByType (struct Object *ob, ModifierType type); +void modifiers_clearErrors (struct Object *ob); +int modifiers_getCageIndex (struct Object *ob, int *lastPossibleCageIndex_r); #endif |