Blender Git Loki

Git Commits -> Revision eeceb82

Revision eeceb82 by Campbell Barton (soc-2021-curves)
June 21, 2021, 14:31 (GMT)
BMesh: support face-normal calculation in normal & looptri functions

Support calculating face normals when tessellating. When this is done
before updating vertex normals it gives ~20% performance improvement.

Now vertex normal calculation only needs to perform a single pass on the
mesh vertices when called after tessellation.

Extended versions of normal & looptri update functions have been added:

- BM_mesh_calc_tessellation_ex
- BM_mesh_normals_update_ex

Most callers don't need to be aware of this detail by using:

- BKE_editmesh_looptri_and_normals_calc
- BKE_editmesh_looptri_and_normals_calc_with_partial

- EDBM_update also takes advantage of this,
where calling EDBM_update with calc_looptri & calc_normals
enabled uses the faster normal updating logic.

Commit Details:

Full Hash: eeceb822856de3884861a35634acf5faad14f070
Parent Commit: b7a928f
Committed By: Dilith Jayakody
Lines Changed: +286, -63

14 Modified Paths:

/source/blender/blenkernel/BKE_editmesh.h (+10, -0) (Diff)
/source/blender/blenkernel/intern/editmesh.c (+54, -6) (Diff)
/source/blender/bmesh/intern/bmesh_mesh_normals.c (+32, -9) (Diff)
/source/blender/bmesh/intern/bmesh_mesh_normals.h (+12, -0) (Diff)
/source/blender/bmesh/intern/bmesh_mesh_tessellate.c (+133, -28) (Diff)
/source/blender/bmesh/intern/bmesh_mesh_tessellate.h (+16, -0) (Diff)
/source/blender/editors/include/ED_mesh.h (+3, -0) (Diff)
/source/blender/editors/mesh/editmesh_utils.c (+19, -5) (Diff)
/source/blender/editors/object/object_edit.c (+1, -3) (Diff)
/source/blender/editors/object/object_hook.c (+1, -2) (Diff)
/source/blender/editors/object/object_relations.c (+1, -2) (Diff)
/source/blender/editors/transform/transform_convert_mesh.c (+2, -4) (Diff)
/source/blender/editors/transform/transform_convert_mesh_skin.c (+1, -2) (Diff)
/source/blender/makesrna/intern/rna_object.c (+1, -2) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021