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:
authorDaniel Dunbar <daniel@zuster.org>2005-07-22 00:30:33 +0400
committerDaniel Dunbar <daniel@zuster.org>2005-07-22 00:30:33 +0400
commit33709bf6e29bf2feb4a8753ad79a4244248ad3ea (patch)
tree7749548dbbc69ecf8a61066885b1abce4f2f4bdf /source/blender/blenkernel/BKE_modifier.h
parent9449f0b24fac41b45eeca49f5b84328c1cae03b4 (diff)
- shuffled editmesh derived function name/function
- added ModifierTypeInfo.freeData function - added modifier_{new,free] utility function - added ccgSubSurf_getUseAgeCounts to query info - removed subsurf modifier faking (ME_SUBSURF flag is no longer valid). subsurf modifier gets converted on file load although there is obscure linked mesh situation where this can go wrong, will fix shortly. this also means that some places in the code that test/copy subsurf settings are broken for the time being. - shuffled modifier calculation to be simpler. note that all modifiers are currently disabled in editmode (including subsurf). don't worry, will return shortly. - bug fix, build modifier didn't randomize meshes with only verts - cleaned up subsurf_ccg and adapted for future editmode modifier work - added editmesh.derived{Cage,Final}, not used yet - added SubsurfModifierData.{mCache,emCache}, will be used to cache subsurf instead of caching in derivedmesh itself - removed old subsurf buttons - added do_modifiers_buttons to handle modifier events - removed count_object counting of modifier (subsurfed) objects... this would be nice to add back at some point but requires care. probably requires rewrite of counting system. New feature: Incremental Subsurf in Object Mode The previous release introduce incremental subsurf calculation during editmode but it was not turned on during object mode. In general it does not make sense to have it always enabled during object mode because it requires caching a fair amount of information about the mesh which is a waste of memory unless the mesh is often recalculated. However, for mesh's that have subsurfed armatures for example, or that have other modifiers so that the mesh is essentially changing on every frame, it makes a lot of sense to keep the subsurf'd object around and that is what the new incremental subsurf modifier toggle is for. The intent is that the user will enable this option for (a) a mesh that is currently under active editing or (b) a mesh that is heavily updated in the scene, such as a character. I will try to write more about this feature for release, because it has advantages and disadvantages that are not immediately obvious (the first user reaction will be to turn it on for ever object, which is probably not correct).
Diffstat (limited to 'source/blender/blenkernel/BKE_modifier.h')
-rw-r--r--source/blender/blenkernel/BKE_modifier.h34
1 files changed, 29 insertions, 5 deletions
diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h
index b0736a1ab72..a09ee20b385 100644
--- a/source/blender/blenkernel/BKE_modifier.h
+++ b/source/blender/blenkernel/BKE_modifier.h
@@ -61,15 +61,33 @@ typedef enum {
} ModifierTypeFlag;
typedef struct ModifierTypeInfo {
- char name[32], structName[32];
+ /* The user visible name for this modifier */
+ char name[32];
+
+ /* The DNA struct name for the modifier data type, used to
+ * write the DNA data out.
+ */
+ char structName[32];
+
+ /* The size of the modifier data type, used by allocation. */
+ int structSize;
+
ModifierTypeType type;
ModifierTypeFlag flags;
- /* Create new instance data for this modifier type.
+ /* Initialize new instance data for this modifier type, this function
+ * should set modifier variables to their default values.
*
- * This function must be present.
+ * This function is optional.
*/
- struct ModifierData *(*allocData)(void);
+ void (*initData)(struct ModifierData *md);
+
+ /* Free internal modifier data variables, this function should
+ * not free the _md_ variable itself.
+ *
+ * This function is optional.
+ */
+ void (*freeData)(struct ModifierData *md);
/* Return a boolean value indicating if this modifier is able to be calculated
* based on the modifier data. This is *not* regarding the md->flag, that is
@@ -120,7 +138,13 @@ typedef struct ModifierTypeInfo {
ModifierTypeInfo *modifierType_get_info(ModifierType type);
-int modifier_dependsOnTime(struct ModifierData *md);
+ /* Modifier utility calls, do call through type pointer and return
+ * default values if pointer is optional.
+ */
+struct ModifierData* modifier_new (int type);
+void modifier_free (struct ModifierData *md);
+
+int modifier_dependsOnTime (struct ModifierData *md);
#endif