Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/multires_reshape.c
| Show First 20 Lines • Show All 105 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| MultiresModifierData highest_mmd = *mmd; | MultiresModifierData highest_mmd = *mmd; | ||||
| highest_mmd.sculptlvl = highest_mmd.totlvl; | highest_mmd.sculptlvl = highest_mmd.totlvl; | ||||
| highest_mmd.lvl = highest_mmd.totlvl; | highest_mmd.lvl = highest_mmd.totlvl; | ||||
| highest_mmd.renderlvl = highest_mmd.totlvl; | highest_mmd.renderlvl = highest_mmd.totlvl; | ||||
| /* Create mesh for the multires, ignoring any further modifiers (leading | /* Create mesh for the multires, ignoring any further modifiers (leading | ||||
| * deformation modifiers will be applied though). */ | * deformation modifiers will be applied though). */ | ||||
| Mesh *multires_mesh = BKE_multires_create_mesh(depsgraph, object, &highest_mmd); | Mesh *multires_mesh = BKE_multires_create_mesh_from_deform(depsgraph, object, &highest_mmd); | ||||
| int num_deformed_verts; | int num_deformed_verts; | ||||
| float(*deformed_verts)[3] = BKE_mesh_vert_coords_alloc(multires_mesh, &num_deformed_verts); | float(*deformed_verts)[3] = BKE_mesh_vert_coords_alloc(multires_mesh, &num_deformed_verts); | ||||
| /* Apply deformation modifier on the multires, */ | /* Apply deformation modifier on the multires, */ | ||||
| const ModifierEvalContext modifier_ctx = { | const ModifierEvalContext modifier_ctx = { | ||||
| .depsgraph = depsgraph, | .depsgraph = depsgraph, | ||||
| .object = object, | .object = object, | ||||
| .flag = MOD_APPLY_USECACHE | MOD_APPLY_IGNORE_SIMPLIFY, | .flag = MOD_APPLY_USECACHE | MOD_APPLY_IGNORE_SIMPLIFY, | ||||
| ▲ Show 20 Lines • Show All 177 Lines • Show Last 20 Lines | |||||