Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_multires.c
| Show First 20 Lines • Show All 166 Lines • ▼ Show 20 Lines | static Mesh *multires_as_ccg(MultiresModifierData *mmd, | ||||
| if (ccg_settings.resolution < 3) { | if (ccg_settings.resolution < 3) { | ||||
| return result; | return result; | ||||
| } | } | ||||
| BKE_subdiv_displacement_attach_from_multires(subdiv, mesh, mmd); | BKE_subdiv_displacement_attach_from_multires(subdiv, mesh, mmd); | ||||
| result = BKE_subdiv_to_ccg_mesh(subdiv, &ccg_settings, mesh); | result = BKE_subdiv_to_ccg_mesh(subdiv, &ccg_settings, mesh); | ||||
| return result; | return result; | ||||
| } | } | ||||
| static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh) | static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh) | ||||
| { | { | ||||
| Mesh *result = mesh; | Mesh *result = mesh; | ||||
| #if !defined(WITH_OPENSUBDIV) | #if !defined(WITH_OPENSUBDIV) | ||||
| modifier_setError(md, "Disabled, built without OpenSubdiv"); | modifier_setError(md, "Disabled, built without OpenSubdiv"); | ||||
| return result; | return result; | ||||
| #endif | #endif | ||||
| MultiresModifierData *mmd = (MultiresModifierData *)md; | MultiresModifierData *mmd = (MultiresModifierData *)md; | ||||
| SubdivSettings subdiv_settings; | SubdivSettings subdiv_settings; | ||||
| ▲ Show 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsMapping | | ||||
| eModifierTypeFlag_RequiresOriginalData, | eModifierTypeFlag_RequiresOriginalData, | ||||
| /* copyData */ copyData, | /* copyData */ copyData, | ||||
| /* deformVerts */ NULL, | /* deformVerts */ NULL, | ||||
| /* deformMatrices */ deformMatrices, | /* deformMatrices */ deformMatrices, | ||||
| /* 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 */ NULL, | /* isDisabled */ NULL, | ||||
| /* updateDepsgraph */ NULL, | /* updateDepsgraph */ NULL, | ||||
| /* dependsOnTime */ NULL, | /* dependsOnTime */ NULL, | ||||
| /* dependsOnNormals */ NULL, | /* dependsOnNormals */ NULL, | ||||
| /* foreachObjectLink */ NULL, | /* foreachObjectLink */ NULL, | ||||
| /* foreachIDLink */ NULL, | /* foreachIDLink */ NULL, | ||||
| /* foreachTexLink */ NULL, | /* foreachTexLink */ NULL, | ||||
| /* freeRuntimeData */ freeRuntimeData, | /* freeRuntimeData */ freeRuntimeData, | ||||
| }; | }; | ||||