Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/io/wavefront_obj/tests/obj_mtl_parser_tests.cc')
-rw-r--r--source/blender/io/wavefront_obj/tests/obj_mtl_parser_tests.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/source/blender/io/wavefront_obj/tests/obj_mtl_parser_tests.cc b/source/blender/io/wavefront_obj/tests/obj_mtl_parser_tests.cc
index 068cdc0bf3a..08050ac34c9 100644
--- a/source/blender/io/wavefront_obj/tests/obj_mtl_parser_tests.cc
+++ b/source/blender/io/wavefront_obj/tests/obj_mtl_parser_tests.cc
@@ -158,7 +158,7 @@ TEST_F(obj_mtl_parser_test, all_objects)
TEST_F(obj_mtl_parser_test, materials)
{
- MTLMaterial mat[5];
+ MTLMaterial mat[6];
mat[0].name = "no_textures_red";
mat[0].Ka = {0.3f, 0.3f, 0.3f};
mat[0].Kd = {0.8f, 0.3f, 0.1f};
@@ -236,6 +236,20 @@ TEST_F(obj_mtl_parser_test, materials)
bump.scale = {3, 4, 5};
}
+ mat[5].name = "Parser_ScaleOffset_Test";
+ {
+ tex_map_XX &kd = mat[5].tex_map_of_type(eMTLSyntaxElement::map_Kd);
+ kd.translation = {2.5f, 0.0f, 0.0f};
+ kd.image_path = "OffsetOneValue.png";
+ tex_map_XX &ks = mat[5].tex_map_of_type(eMTLSyntaxElement::map_Ks);
+ ks.scale = {1.5f, 2.5f, 1.0f};
+ ks.translation = {3.5f, 4.5f, 0.0f};
+ ks.image_path = "ScaleOffsetBothTwovalues.png";
+ tex_map_XX &ns = mat[5].tex_map_of_type(eMTLSyntaxElement::map_Ns);
+ ns.scale = {0.5f, 1.0f, 1.0f};
+ ns.image_path = "1.Value.png";
+ }
+
check("materials.mtl", mat, ARRAY_SIZE(mat));
}