diff options
author | Aras Pranckevicius <aras@nesnausk.org> | 2022-08-11 15:51:36 +0300 |
---|---|---|
committer | Aras Pranckevicius <aras@nesnausk.org> | 2022-08-11 15:51:36 +0300 |
commit | 0a096f2be233b6faca468a1add615fb72e57909e (patch) | |
tree | ca5591dba8f268173620910694dfd2278a4d3621 /source/blender/io/wavefront_obj/tests/obj_importer_tests.cc | |
parent | ed55054e57a35278e90d7ecd512521289d450fd8 (diff) |
Fix T98781: OBJ exporter wrongly writing default material socket values when textures are present
Report T98781 and part of T97642: the MTLMaterial info only captures
image nodes and the default socket values. When the image information
is present, do not emit the socket defaults - the .MTL spec states
they are multiplied together, but the default value is not used
in blender when the socket is connected.
Also contains svn tests repository update to extend the test coverage,
and update test expectation outputs.
Diffstat (limited to 'source/blender/io/wavefront_obj/tests/obj_importer_tests.cc')
-rw-r--r-- | source/blender/io/wavefront_obj/tests/obj_importer_tests.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/io/wavefront_obj/tests/obj_importer_tests.cc b/source/blender/io/wavefront_obj/tests/obj_importer_tests.cc index 63c827d385f..f97546fe4f5 100644 --- a/source/blender/io/wavefront_obj/tests/obj_importer_tests.cc +++ b/source/blender/io/wavefront_obj/tests/obj_importer_tests.cc @@ -325,6 +325,16 @@ TEST_F(obj_importer_test, import_cubes_with_textures_rel) float3(1, -1, -1), float3(0, 1, 0), float2(0.9935f, 0.0020f)}, + {"OBCubeTexMul", + OB_MESH, + 8, + 12, + 6, + 24, + float3(4, -2, -1), + float3(4, -4, -1), + float3(0, 1, 0), + float2(0.9935f, 0.0020f)}, {"OBCubeTiledTex", OB_MESH, 8, @@ -346,7 +356,7 @@ TEST_F(obj_importer_test, import_cubes_with_textures_rel) float3(0, 1, 0), float2(0.9935f, 0.0020f)}, }; - import_and_check("cubes_with_textures_rel.obj", expect, std::size(expect), 3, 4); + import_and_check("cubes_with_textures_rel.obj", expect, std::size(expect), 4, 4); } TEST_F(obj_importer_test, import_faces_invalid_or_with_holes) |