Commit: 4ee3d7e3ac359dd04f80af88a46c5f3b14f49708 Author: Bastien Montagne Date: Thu Feb 22 15:22:44 2018 +0100 Branches: blender2.8 https://developer.blender.org/rB4ee3d7e3ac359dd04f80af88a46c5f3b14f49708
Merge branch 'master' into blender2.8 Conflicts: source/blender/bmesh/intern/bmesh_mesh.c =================================================================== =================================================================== diff --cc source/blender/blenkernel/BKE_mesh.h index ce5d4e3ea64,31d889863b2..9ff842e36f1 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@@ -193,7 -188,21 +193,14 @@@ void BKE_mesh_calc_normals_looptri const struct MLoop *mloop, const struct MLoopTri *looptri, int looptri_num, float (*r_tri_nors)[3]); -void BKE_mesh_loop_tangents_ex( - const struct MVert *mverts, const int numVerts, const struct MLoop *mloops, - float (*r_looptangent)[4], float (*loopnors)[3], const struct MLoopUV *loopuv, - const int numLoops, const struct MPoly *mpolys, const int numPolys, - struct ReportList *reports); -void BKE_mesh_loop_tangents( - struct Mesh *mesh, const char *uvmap, float (*r_looptangents)[4], struct ReportList *reports); + void BKE_edges_sharp_from_angle_set( + const struct MVert *mverts, const int numVerts, + struct MEdge *medges, const int numEdges, + struct MLoop *mloops, const int numLoops, + struct MPoly *mpolys, const float (*polynors)[3], const int numPolys, + const float split_angle); + /** * References a contiguous loop-fan with normal offset vars. */ diff --cc source/blender/bmesh/intern/bmesh_mesh.c index 8533083af22,8d6e7ae5b29..d178b48ab60 --- a/source/blender/bmesh/intern/bmesh_mesh.c +++ b/source/blender/bmesh/intern/bmesh_mesh.c @@@ -1019,8 -1025,21 +1025,22 @@@ void BM_loops_calc_normal_vcos } } + /** Define sharp edges as needed to mimic 'autosmooth' from angle threshold. + * + * Used when defining an empty custom loop normals data layer, to keep same shading as with autosmooth! + */ + void BM_edges_sharp_from_angle_set(BMesh *bm, const float split_angle) + { + if (split_angle >= (float)M_PI) { + /* Nothing to do! */ + return; + } + + bm_mesh_edges_sharp_tag(bm, NULL, NULL, NULL, split_angle, true); + } + -static void UNUSED_FUNCTION(bm_mdisps_space_set)(Object *ob, BMesh *bm, int from, int to) +static void UNUSED_FUNCTION(bm_mdisps_space_set)( + Object *ob, BMesh *bm, int from, int to, eObjectMode object_mode) { /* switch multires data out of tangent space */ if (CustomData_has_layer(&bm->ldata, CD_MDISPS)) { _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs