Merge branch 'blender-v3.1-release'
This commit is contained in:
commit
b315678fea
|
@ -358,7 +358,7 @@ void OBJMesh::store_normal_coords_and_indices(Vector<float3> &r_normal_coords)
|
|||
*lnors)[3] = (const float(*)[3])(CustomData_get_layer(&export_mesh_eval_->ldata, CD_NORMAL));
|
||||
for (int poly_index = 0; poly_index < export_mesh_eval_->totpoly; ++poly_index) {
|
||||
const MPoly &mpoly = export_mesh_eval_->mpoly[poly_index];
|
||||
bool need_per_loop_normals = is_ith_poly_smooth(poly_index);
|
||||
bool need_per_loop_normals = lnors != nullptr || (mpoly.flag & ME_SMOOTH);
|
||||
if (need_per_loop_normals) {
|
||||
for (int loop_of_poly = 0; loop_of_poly < mpoly.totloop; ++loop_of_poly) {
|
||||
float3 loop_normal;
|
||||
|
|
|
@ -402,6 +402,18 @@ TEST_F(obj_exporter_regression_test, cube_all_data_triangulated)
|
|||
_export.params);
|
||||
}
|
||||
|
||||
TEST_F(obj_exporter_regression_test, cube_normal_edit)
|
||||
{
|
||||
OBJExportParamsDefault _export;
|
||||
_export.params.forward_axis = OBJ_AXIS_Y_FORWARD;
|
||||
_export.params.up_axis = OBJ_AXIS_Z_UP;
|
||||
_export.params.export_materials = false;
|
||||
compare_obj_export_to_golden("io_tests/blend_geometry/cube_normal_edit.blend",
|
||||
"io_tests/obj/cube_normal_edit.obj",
|
||||
"",
|
||||
_export.params);
|
||||
}
|
||||
|
||||
TEST_F(obj_exporter_regression_test, suzanne_all_data)
|
||||
{
|
||||
OBJExportParamsDefault _export;
|
||||
|
|
Loading…
Reference in New Issue