Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <jbakker>2020-03-26 16:36:39 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2020-03-26 17:34:53 +0300
commit7ed3ebbc6e1f95203c050e683a140b7ac1e7b705 (patch)
treec784d8cc1e1e0954c6193e930228ba32fea29615 /source/blender/modifiers
parent2e8fb95e7c69274944ecb44b2b51f8b4307f88ae (diff)
Fix T67888: Incorrect Wireframe After Applying SubSurf/MultiRes
Show control edges stores the control edges in the mesh which is picked up by the draw manager. When applyng a subsurf (or multires) we don't want that data present in the base mesh. Any rebuilding of the mesh would overwrite the data anyway. This patch introduces a new flag for applying modifiers that can be checked to ignore storing display specific data in the base mesh. Reviewed By: Brecht van Lommel Differential Revision: https://developer.blender.org/D7163
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_multires.c10
-rw-r--r--source/blender/modifiers/intern/MOD_subsurf.c3
2 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/modifiers/intern/MOD_multires.c b/source/blender/modifiers/intern/MOD_multires.c
index 1f9052d12c9..ad8e0a9f259 100644
--- a/source/blender/modifiers/intern/MOD_multires.c
+++ b/source/blender/modifiers/intern/MOD_multires.c
@@ -119,11 +119,17 @@ static Mesh *multires_as_mesh(MultiresModifierData *mmd,
Mesh *result = mesh;
const bool use_render_params = (ctx->flag & MOD_APPLY_RENDER);
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);
Object *object = ctx->object;
SubdivToMeshSettings mesh_settings;
- BKE_multires_subdiv_mesh_settings_init(
- &mesh_settings, scene, object, mmd, use_render_params, ignore_simplify);
+ BKE_multires_subdiv_mesh_settings_init(&mesh_settings,
+ scene,
+ object,
+ mmd,
+ use_render_params,
+ ignore_simplify,
+ ignore_control_edges);
if (mesh_settings.resolution < 3) {
return result;
}
diff --git a/source/blender/modifiers/intern/MOD_subsurf.c b/source/blender/modifiers/intern/MOD_subsurf.c
index 6fd28561fdb..b3bc5a66e8c 100644
--- a/source/blender/modifiers/intern/MOD_subsurf.c
+++ b/source/blender/modifiers/intern/MOD_subsurf.c
@@ -148,7 +148,8 @@ static void subdiv_mesh_settings_init(SubdivToMeshSettings *settings,
{
const int level = subdiv_levels_for_modifier_get(smd, ctx);
settings->resolution = (1 << level) + 1;
- settings->use_optimal_display = (smd->flags & eSubsurfModifierFlag_ControlEdges);
+ settings->use_optimal_display = (smd->flags & eSubsurfModifierFlag_ControlEdges) &&
+ !(ctx->flag & MOD_APPLY_TO_BASE_MESH);
}
static Mesh *subdiv_as_mesh(SubsurfModifierData *smd,