diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-09-06 15:28:14 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-10-10 18:43:44 +0300 |
commit | e65784a0519e25e9ca560ab63758287cea45f123 (patch) | |
tree | 2452488152b951d029f68b34f20803254066b27b /source/blender/blenkernel | |
parent | 468474a653c976615306254dfcc33a85a0b872a1 (diff) |
Python API: add loop triangles access, remove tessfaces.
Loop triangles are tessellated triangles create from polygons, for renderers
or exporters that need to match Blender's polygon tesselation exactly. These
are a read-only runtime cache.
Tessfaces are a legacy data structure from before Blender supported n-gons,
and were already mostly removed from the C code.
Details on porting code to loop triangles is in the release notes.
Differential Revision: https://developer.blender.org/D3539
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_mesh.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh_convert.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index 9f86c16bae8..c7232015059 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -179,7 +179,7 @@ void BKE_mesh_split_faces(struct Mesh *mesh, bool free_loop_normals); struct Mesh *BKE_mesh_new_from_object( struct Depsgraph *depsgraph, struct Main *bmain, struct Scene *sce, struct Object *ob, - const bool apply_modifiers, const bool calc_tessface, const bool calc_undeformed); + const bool apply_modifiers, const bool calc_loop_triangles, const bool calc_undeformed); struct Mesh *BKE_mesh_create_derived_for_modifier( struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct ModifierData *md, int build_shapekey_layers); diff --git a/source/blender/blenkernel/intern/mesh_convert.c b/source/blender/blenkernel/intern/mesh_convert.c index 7cc7095361c..bb52ed79b53 100644 --- a/source/blender/blenkernel/intern/mesh_convert.c +++ b/source/blender/blenkernel/intern/mesh_convert.c @@ -840,7 +840,7 @@ void BKE_mesh_to_curve(Main *bmain, Depsgraph *depsgraph, Scene *scene, Object * /* settings: 1 - preview, 2 - render */ Mesh *BKE_mesh_new_from_object( Depsgraph *depsgraph, Main *bmain, Scene *sce, Object *ob, - const bool apply_modifiers, const bool calc_tessface, const bool calc_undeformed) + const bool apply_modifiers, const bool calc_loop_triangles, const bool calc_undeformed) { Mesh *tmpmesh; Curve *tmpcu = NULL, *copycu; @@ -1069,9 +1069,9 @@ Mesh *BKE_mesh_new_from_object( break; } /* end copy materials */ - if (calc_tessface) { + if (calc_loop_triangles) { /* cycles and exporters rely on this still */ - BKE_mesh_tessface_ensure(tmpmesh); + BKE_mesh_runtime_looptri_ensure(tmpmesh); } return tmpmesh; |