Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Dummy Blender modifier
#include "BKE_modifier.h"
#include "DNA_mesh_types.h"
#include "DNA_modifier_types.h"
static Mesh *pizza_applyModifier(struct ModifierData *md,
const struct ModifierEvalContext *ctx,
struct Mesh *mesh)
{
printf("PIZZA is cooking on data @%p\n", md);
return mesh;
}
static void pizza_freeData(struct ModifierData *md)
{
printf("PIZZA is freed on data @%p\n", md);
}
ModifierTypeInfo modifierType_Pizza = {
/* name */ "Pizza",
/* structName */ "PizzaModifierData",
/* structSize */ sizeof(PizzaModifierData),
/* type */ eModifierTypeType_Constructive,
/* flags */ eModifierTypeFlag_AcceptsMesh,
/* copyData */ modifier_copyData_generic,
/* deformVerts */ NULL,
/* deformMatrices */ NULL,
/* deformVertsEM */ NULL,
/* deformMatricesEM */ NULL,
/* applyModifier */ pizza_applyModifier,
/* initData */ NULL,
/* requiredDataMask */ NULL,
/* freeData */ pizza_freeData,
/* isDisabled */ NULL,
/* updateDepsgraph */ NULL,
/* dependsOnTime */ NULL,
/* dependsOnNormals */ NULL,
/* foreachObjectLink */ NULL,
/* foreachIDLink */ NULL,
/* foreachTexLink */ NULL,
/* freeRuntimeData */ NULL,
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.