Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_meshsequencecache.c
| Show First 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | static bool isDisabled(const struct Scene *UNUSED(scene), | ||||
| bool UNUSED(useRenderParams)) | bool UNUSED(useRenderParams)) | ||||
| { | { | ||||
| MeshSeqCacheModifierData *mcmd = (MeshSeqCacheModifierData *)md; | MeshSeqCacheModifierData *mcmd = (MeshSeqCacheModifierData *)md; | ||||
| /* leave it up to the modifier to check the file is valid on calculation */ | /* leave it up to the modifier to check the file is valid on calculation */ | ||||
| return (mcmd->cache_file == NULL) || (mcmd->object_path[0] == '\0'); | return (mcmd->cache_file == NULL) || (mcmd->object_path[0] == '\0'); | ||||
| } | } | ||||
| static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh) | static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh) | ||||
| { | { | ||||
| #ifdef WITH_ALEMBIC | #ifdef WITH_ALEMBIC | ||||
| MeshSeqCacheModifierData *mcmd = (MeshSeqCacheModifierData *)md; | MeshSeqCacheModifierData *mcmd = (MeshSeqCacheModifierData *)md; | ||||
| /* Only used to check whether we are operating on org data or not... */ | /* Only used to check whether we are operating on org data or not... */ | ||||
| Mesh *me = (ctx->object->type == OB_MESH) ? ctx->object->data : NULL; | Mesh *me = (ctx->object->type == OB_MESH) ? ctx->object->data : NULL; | ||||
| Mesh *org_mesh = mesh; | Mesh *org_mesh = mesh; | ||||
| ▲ Show 20 Lines • Show All 90 Lines • ▼ Show 20 Lines | ModifierTypeInfo modifierType_MeshSequenceCache = { | ||||
| /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_AcceptsCVs, | /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_AcceptsCVs, | ||||
| /* copyData */ copyData, | /* copyData */ copyData, | ||||
| /* deformVerts */ NULL, | /* deformVerts */ NULL, | ||||
| /* deformMatrices */ NULL, | /* deformMatrices */ NULL, | ||||
| /* deformVertsEM */ NULL, | /* deformVertsEM */ NULL, | ||||
| /* deformMatricesEM */ NULL, | /* deformMatricesEM */ NULL, | ||||
| /* applyModifier */ applyModifier, | /* modifyMesh */ modifyMesh, | ||||
| /* modifyHair */ NULL, | |||||
| /* modifyPointCloud */ NULL, | |||||
| /* modifyVolume */ NULL, | |||||
| /* initData */ initData, | /* initData */ initData, | ||||
| /* requiredDataMask */ NULL, | /* requiredDataMask */ NULL, | ||||
| /* freeData */ freeData, | /* freeData */ freeData, | ||||
| /* isDisabled */ isDisabled, | /* isDisabled */ isDisabled, | ||||
| /* updateDepsgraph */ updateDepsgraph, | /* updateDepsgraph */ updateDepsgraph, | ||||
| /* dependsOnTime */ dependsOnTime, | /* dependsOnTime */ dependsOnTime, | ||||
| /* dependsOnNormals */ NULL, | /* dependsOnNormals */ NULL, | ||||
| /* foreachObjectLink */ NULL, | /* foreachObjectLink */ NULL, | ||||
| /* foreachIDLink */ foreachIDLink, | /* foreachIDLink */ foreachIDLink, | ||||
| /* foreachTexLink */ NULL, | /* foreachTexLink */ NULL, | ||||
| /* freeRuntimeData */ NULL, | /* freeRuntimeData */ NULL, | ||||
| }; | }; | ||||