Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/modifier.c
| Show First 20 Lines • Show All 939 Lines • ▼ Show 20 Lines | |||||
| /* initializes the path with either */ | /* initializes the path with either */ | ||||
| void modifier_path_init(char *path, int path_maxlen, const char *name) | void modifier_path_init(char *path, int path_maxlen, const char *name) | ||||
| { | { | ||||
| /* elubie: changed this to default to the same dir as the render output | /* elubie: changed this to default to the same dir as the render output | ||||
| * to prevent saving to C:\ on Windows */ | * to prevent saving to C:\ on Windows */ | ||||
| BLI_join_dirfile(path, path_maxlen, G.relbase_valid ? "//" : BKE_tempdir_session(), name); | BLI_join_dirfile(path, path_maxlen, G.relbase_valid ? "//" : BKE_tempdir_session(), name); | ||||
| } | } | ||||
| /* wrapper around ModifierTypeInfo.applyModifier that ensures valid normals */ | /* wrapper around ModifierTypeInfo.modifyMesh that ensures valid normals */ | ||||
| struct Mesh *modwrap_applyModifier(ModifierData *md, | struct Mesh *modwrap_modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, struct Mesh *me) | ||||
| const ModifierEvalContext *ctx, | |||||
| struct Mesh *me) | |||||
| { | { | ||||
| const ModifierTypeInfo *mti = modifierType_getInfo(md->type); | const ModifierTypeInfo *mti = modifierType_getInfo(md->type); | ||||
| BLI_assert(CustomData_has_layer(&me->pdata, CD_NORMAL) == false); | BLI_assert(CustomData_has_layer(&me->pdata, CD_NORMAL) == false); | ||||
| if (mti->dependsOnNormals && mti->dependsOnNormals(md)) { | if (mti->dependsOnNormals && mti->dependsOnNormals(md)) { | ||||
| BKE_mesh_calc_normals(me); | BKE_mesh_calc_normals(me); | ||||
| } | } | ||||
| return mti->applyModifier(md, ctx, me); | return mti->modifyMesh(md, ctx, me); | ||||
| } | } | ||||
| void modwrap_deformVerts(ModifierData *md, | void modwrap_deformVerts(ModifierData *md, | ||||
| const ModifierEvalContext *ctx, | const ModifierEvalContext *ctx, | ||||
| Mesh *me, | Mesh *me, | ||||
| float (*vertexCos)[3], | float (*vertexCos)[3], | ||||
| int numVerts) | int numVerts) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 75 Lines • Show Last 20 Lines | |||||