Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_modifier.h
| Show First 20 Lines • Show All 94 Lines • ▼ Show 20 Lines | typedef enum { | ||||
| /* For physics modifiers, max one per type */ | /* For physics modifiers, max one per type */ | ||||
| eModifierTypeFlag_Single = (1 << 7), | eModifierTypeFlag_Single = (1 << 7), | ||||
| /* Some modifier can't be added manually by user */ | /* Some modifier can't be added manually by user */ | ||||
| eModifierTypeFlag_NoUserAdd = (1 << 8), | eModifierTypeFlag_NoUserAdd = (1 << 8), | ||||
| /* For modifiers that use CD_PREVIEW_MCOL for preview. */ | /* For modifiers that use CD_PREVIEW_MCOL for preview. */ | ||||
| eModifierTypeFlag_UsesPreview = (1 << 9), | eModifierTypeFlag_UsesPreview = (1 << 9), | ||||
| eModifierTypeFlag_AcceptsLattice = (1 << 10), | eModifierTypeFlag_AcceptsVertexCosOnly = (1 << 10), | ||||
| } ModifierTypeFlag; | } ModifierTypeFlag; | ||||
| /* IMPORTANT! Keep ObjectWalkFunc and IDWalkFunc signatures compatible. */ | /* IMPORTANT! Keep ObjectWalkFunc and IDWalkFunc signatures compatible. */ | ||||
| typedef void (*ObjectWalkFunc)(void *userData, | typedef void (*ObjectWalkFunc)(void *userData, | ||||
| struct Object *ob, | struct Object *ob, | ||||
| struct Object **obpoin, | struct Object **obpoin, | ||||
| int cb_flag); | int cb_flag); | ||||
| typedef void (*IDWalkFunc)(void *userData, struct Object *ob, struct ID **idpoin, int cb_flag); | typedef void (*IDWalkFunc)(void *userData, struct Object *ob, struct ID **idpoin, int cb_flag); | ||||
| ▲ Show 20 Lines • Show All 94 Lines • ▼ Show 20 Lines | void (*deformMatricesEM)(struct ModifierData *md, | ||||
| struct BMEditMesh *editData, | struct BMEditMesh *editData, | ||||
| struct Mesh *mesh, | struct Mesh *mesh, | ||||
| float (*vertexCos)[3], | float (*vertexCos)[3], | ||||
| float (*defMats)[3][3], | float (*defMats)[3][3], | ||||
| int numVerts); | int numVerts); | ||||
| /********************* Non-deform modifier functions *********************/ | /********************* Non-deform modifier functions *********************/ | ||||
| /* For non-deform types: apply the modifier and return a mesh object. | /* For non-deform types: apply the modifier and return a mesh datablock. | ||||
| * | * | ||||
| * The mesh argument should always be non-NULL; the modifier | * The mesh argument should always be non-NULL; the modifier should use the | ||||
| * should read the object data from the mesh object instead of the | * passed in mesh datablock rather than object->data, as it contains the mesh | ||||
| * actual object data. | * with modifier applied up to this point. | ||||
| * | * | ||||
| * The modifier may reuse the mesh argument (i.e. return it in | * The modifier may modify and return the mesh argument, but must not free it | ||||
| * modified form), but must not release it. | * and must ensure any referenced data layers are converted to non-referenced | ||||
| * before modification. | |||||
| */ | */ | ||||
| struct Mesh *(*applyModifier)(struct ModifierData *md, | struct Mesh *(*modifyMesh)(struct ModifierData *md, | ||||
| const struct ModifierEvalContext *ctx, | const struct ModifierEvalContext *ctx, | ||||
| struct Mesh *mesh); | struct Mesh *mesh); | ||||
| struct Hair *(*modifyHair)(struct ModifierData *md, | |||||
| const struct ModifierEvalContext *ctx, | |||||
| struct Hair *hair); | |||||
| struct PointCloud *(*modifyPointCloud)(struct ModifierData *md, | |||||
| const struct ModifierEvalContext *ctx, | |||||
| struct PointCloud *pointcloud); | |||||
| struct Volume *(*modifyVolume)(struct ModifierData *md, | |||||
| const struct ModifierEvalContext *ctx, | |||||
| struct Volume *volume); | |||||
| /********************* Optional functions *********************/ | /********************* Optional functions *********************/ | ||||
| /* Initialize new instance data for this modifier type, this function | /* Initialize new instance data for this modifier type, this function | ||||
| * should set modifier variables to their default values. | * should set modifier variables to their default values. | ||||
| * | * | ||||
| * This function is optional. | * This function is optional. | ||||
| */ | */ | ||||
| ▲ Show 20 Lines • Show All 211 Lines • ▼ Show 20 Lines | |||||
| * If the modifier data is already original, return it as-is. */ | * If the modifier data is already original, return it as-is. */ | ||||
| struct ModifierData *modifier_get_original(struct ModifierData *md); | struct ModifierData *modifier_get_original(struct ModifierData *md); | ||||
| struct ModifierData *modifier_get_evaluated(struct Depsgraph *depsgraph, | struct ModifierData *modifier_get_evaluated(struct Depsgraph *depsgraph, | ||||
| struct Object *object, | struct Object *object, | ||||
| struct ModifierData *md); | struct ModifierData *md); | ||||
| /* wrappers for modifier callbacks that ensure valid normals */ | /* wrappers for modifier callbacks that ensure valid normals */ | ||||
| struct Mesh *modwrap_applyModifier(ModifierData *md, | struct Mesh *modwrap_modifyMesh(ModifierData *md, | ||||
| const struct ModifierEvalContext *ctx, | const struct ModifierEvalContext *ctx, | ||||
| struct Mesh *me); | struct Mesh *me); | ||||
| void modwrap_deformVerts(ModifierData *md, | void modwrap_deformVerts(ModifierData *md, | ||||
| const struct ModifierEvalContext *ctx, | const struct ModifierEvalContext *ctx, | ||||
| struct Mesh *me, | struct Mesh *me, | ||||
| float (*vertexCos)[3], | float (*vertexCos)[3], | ||||
| int numVerts); | int numVerts); | ||||
| void modwrap_deformVertsEM(ModifierData *md, | void modwrap_deformVertsEM(ModifierData *md, | ||||
| Show All 14 Lines | |||||