From 42980abf8d0d126b0f472601cc47a3929217e394 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Fri, 23 Oct 2020 22:27:46 +0200 Subject: 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 --- source/blender/blenkernel/BKE_mesh.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/blenkernel/BKE_mesh.h') diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index 0275f4dd587..789f78826e0 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -188,6 +188,9 @@ void BKE_mesh_material_index_clear(struct Mesh *me); void BKE_mesh_material_remap(struct Mesh *me, const unsigned int *remap, unsigned int remap_len); void BKE_mesh_smooth_flag_set(struct Mesh *me, const bool use_smooth); +/* Needed after converting a mesh with subsurf optimal display to mesh. */ +void BKE_mesh_edges_set_draw_render(struct Mesh *me); + const char *BKE_mesh_cmp(struct Mesh *me1, struct Mesh *me2, float thresh); struct BoundBox *BKE_mesh_boundbox_get(struct Object *ob); -- cgit v1.2.3