Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_multires.c
| Show First 20 Lines • Show All 113 Lines • ▼ Show 20 Lines | |||||
| static Mesh *multires_as_mesh(MultiresModifierData *mmd, | static Mesh *multires_as_mesh(MultiresModifierData *mmd, | ||||
| const ModifierEvalContext *ctx, | const ModifierEvalContext *ctx, | ||||
| Mesh *mesh, | Mesh *mesh, | ||||
| Subdiv *subdiv) | Subdiv *subdiv) | ||||
| { | { | ||||
| Mesh *result = mesh; | Mesh *result = mesh; | ||||
| const bool use_render_params = (ctx->flag & MOD_APPLY_RENDER); | const bool use_render_params = (ctx->flag & MOD_APPLY_RENDER); | ||||
| const bool ignore_simplify = (ctx->flag & MOD_APPLY_IGNORE_SIMPLIFY); | const bool ignore_simplify = (ctx->flag & MOD_APPLY_IGNORE_SIMPLIFY); | ||||
| const bool ignore_control_edges = (ctx->flag & MOD_APPLY_TO_BASE_MESH); | |||||
| const Scene *scene = DEG_get_evaluated_scene(ctx->depsgraph); | const Scene *scene = DEG_get_evaluated_scene(ctx->depsgraph); | ||||
| Object *object = ctx->object; | Object *object = ctx->object; | ||||
| SubdivToMeshSettings mesh_settings; | SubdivToMeshSettings mesh_settings; | ||||
| BKE_multires_subdiv_mesh_settings_init( | BKE_multires_subdiv_mesh_settings_init(&mesh_settings, | ||||
| &mesh_settings, scene, object, mmd, use_render_params, ignore_simplify); | scene, | ||||
| object, | |||||
| mmd, | |||||
| use_render_params, | |||||
| ignore_simplify, | |||||
| ignore_control_edges); | |||||
| if (mesh_settings.resolution < 3) { | if (mesh_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_mesh(subdiv, &mesh_settings, mesh); | result = BKE_subdiv_to_mesh(subdiv, &mesh_settings, mesh); | ||||
| return result; | return result; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 160 Lines • Show Last 20 Lines | |||||