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:
authorPhilipp Oeser <info@graphics-engineer.com>2020-10-23 23:27:46 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2020-11-06 19:25:52 +0300
commit42980abf8d0d126b0f472601cc47a3929217e394 (patch)
treef61aa46c1a3869d0f2870c0798996bc1f882c3a5 /source/blender/editors/object/object_add.c
parent1019df81ffbcb0f696b260fc8cfb6a6bb1104a62 (diff)
Fix T81997: Subsurf Optimal Display sticks after object conversion
When using Optimal Display, some edges are not flagged `ME_EDGEDRAW` | `ME_EDGERENDER`. When the modifier is applied through the UI in the modifier stack this is not an issue because the `modifyMesh` callback is run with `MOD_APPLY_TO_BASE_MESH` (this will effectively turn of Optimal Display). When converting to mesh though, this will just get an evaluated mesh (where the edge flags are still the same as with the subdivision modifier). Now ensure every edge is flagged to draw after conversion. Maniphest Tasks: T81997 Differential Revision: https://developer.blender.org/D9331
Diffstat (limited to 'source/blender/editors/object/object_add.c')
-rw-r--r--source/blender/editors/object/object_add.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 36e780f7472..d70e02cf3da 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -2686,6 +2686,8 @@ static int object_convert_exec(bContext *C, wmOperator *op)
Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob);
Mesh *me_eval = mesh_get_eval_final(depsgraph, scene_eval, ob_eval, &CD_MASK_MESH);
me_eval = BKE_mesh_copy_for_eval(me_eval, false);
+ /* Full (edge-angle based) draw calculation should ideally be performed. */
+ BKE_mesh_edges_set_draw_render(me_eval);
BKE_mesh_nomain_to_mesh(me_eval, newob->data, newob, &CD_MASK_MESH, true);
BKE_object_free_modifiers(newob, 0); /* after derivedmesh calls! */
}