diff options
-rw-r--r-- | source/blender/blenkernel/BKE_subdiv.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/subdiv.c | 21 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_multires.c | 2 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_subsurf.c | 2 |
4 files changed, 0 insertions, 27 deletions
diff --git a/source/blender/blenkernel/BKE_subdiv.h b/source/blender/blenkernel/BKE_subdiv.h index 92da909b2ae..3d47c8d3bc5 100644 --- a/source/blender/blenkernel/BKE_subdiv.h +++ b/source/blender/blenkernel/BKE_subdiv.h @@ -220,8 +220,6 @@ void BKE_subdiv_stats_print(const SubdivStats *stats); /* ================================ SETTINGS ================================ */ -void BKE_subdiv_settings_validate_for_mesh(SubdivSettings *settings, const struct Mesh *mesh); - bool BKE_subdiv_settings_equal(const SubdivSettings *settings_a, const SubdivSettings *settings_b); /* ============================== CONSTRUCTION ============================== */ diff --git a/source/blender/blenkernel/intern/subdiv.c b/source/blender/blenkernel/intern/subdiv.c index f1cde39f657..e6b51c586c3 100644 --- a/source/blender/blenkernel/intern/subdiv.c +++ b/source/blender/blenkernel/intern/subdiv.c @@ -87,27 +87,6 @@ eSubdivVtxBoundaryInterpolation BKE_subdiv_vtx_boundary_interpolation_from_subsu /* ================================ SETTINGS ================================ */ -static bool check_mesh_has_non_quad(const Mesh *mesh) -{ - for (int poly_index = 0; poly_index < mesh->totpoly; poly_index++) { - const MPoly *poly = &mesh->mpoly[poly_index]; - if (poly->totloop != 4) { - return true; - } - } - return false; -} - -void BKE_subdiv_settings_validate_for_mesh(SubdivSettings *settings, const Mesh *mesh) -{ - if (settings->level != 1) { - return; - } - if (check_mesh_has_non_quad(mesh)) { - settings->level = 2; - } -} - bool BKE_subdiv_settings_equal(const SubdivSettings *settings_a, const SubdivSettings *settings_b) { return (settings_a->is_simple == settings_b->is_simple && diff --git a/source/blender/modifiers/intern/MOD_multires.c b/source/blender/modifiers/intern/MOD_multires.c index f1c07b47c26..e1b89019d3a 100644 --- a/source/blender/modifiers/intern/MOD_multires.c +++ b/source/blender/modifiers/intern/MOD_multires.c @@ -225,7 +225,6 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * if (subdiv_settings.level == 0) { return result; } - BKE_subdiv_settings_validate_for_mesh(&subdiv_settings, mesh); MultiresRuntimeData *runtime_data = multires_ensure_runtime(mmd); Subdiv *subdiv = subdiv_descriptor_ensure(mmd, &subdiv_settings, mesh); if (subdiv == NULL) { @@ -322,7 +321,6 @@ static void deformMatrices(ModifierData *md, return; } - BKE_subdiv_settings_validate_for_mesh(&subdiv_settings, mesh); MultiresRuntimeData *runtime_data = multires_ensure_runtime(mmd); Subdiv *subdiv = subdiv_descriptor_ensure(mmd, &subdiv_settings, mesh); if (subdiv == NULL) { diff --git a/source/blender/modifiers/intern/MOD_subsurf.c b/source/blender/modifiers/intern/MOD_subsurf.c index f730ccf5e29..7efb9d77eb5 100644 --- a/source/blender/modifiers/intern/MOD_subsurf.c +++ b/source/blender/modifiers/intern/MOD_subsurf.c @@ -263,7 +263,6 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * if (subdiv_settings.level == 0) { return result; } - BKE_subdiv_settings_validate_for_mesh(&subdiv_settings, mesh); SubsurfRuntimeData *runtime_data = subsurf_ensure_runtime(smd); Subdiv *subdiv = subdiv_descriptor_ensure(smd, &subdiv_settings, mesh); if (subdiv == NULL) { @@ -323,7 +322,6 @@ static void deformMatrices(ModifierData *md, if (subdiv_settings.level == 0) { return; } - BKE_subdiv_settings_validate_for_mesh(&subdiv_settings, mesh); SubsurfRuntimeData *runtime_data = subsurf_ensure_runtime(smd); Subdiv *subdiv = subdiv_descriptor_ensure(smd, &subdiv_settings, mesh); if (subdiv == NULL) { |