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:
authorHoward Trickey <howard.trickey@gmail.com>2022-01-21 22:37:33 +0300
committerHoward Trickey <howard.trickey@gmail.com>2022-01-21 22:37:33 +0300
commit54d69a2fd1be60aaba62f92cd0db5b5ba71495aa (patch)
treed940f06273fc97878290d1bd6516d3f4b18c542b /source/blender/io/wavefront_obj/tests
parent9d274a609ca507fbd16f8daff95129281d4a24d8 (diff)
Fix new OBJ exporter to handle instancing.
The new OBJ exporter did not handle object instances. The fix is to use a dependency graph iterator, asking for instances. Unfortunately that iterator makes a temporary copy of instance objects that does not persist past the iteration, but we need to save all the objects and meshes to write later, so the Object has to be copied now. This changed some unit tests. Even though the tests don't have instancing, the iterator also picks up some Text objects as Mesh ones (which is a good thing), resulting in two more objects in the all_objects.obj file output.
Diffstat (limited to 'source/blender/io/wavefront_obj/tests')
-rw-r--r--source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc b/source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc
index 92d478c20a1..5dac913c902 100644
--- a/source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc
+++ b/source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc
@@ -60,7 +60,7 @@ TEST_F(obj_exporter_test, filter_objects_curves_as_mesh)
return;
}
auto [objmeshes, objcurves]{filter_supported_objects(depsgraph, _export.params)};
- EXPECT_EQ(objmeshes.size(), 17);
+ EXPECT_EQ(objmeshes.size(), 19);
EXPECT_EQ(objcurves.size(), 0);
}
@@ -73,7 +73,7 @@ TEST_F(obj_exporter_test, filter_objects_curves_as_nurbs)
}
_export.params.export_curves_as_nurbs = true;
auto [objmeshes, objcurves]{filter_supported_objects(depsgraph, _export.params)};
- EXPECT_EQ(objmeshes.size(), 16);
+ EXPECT_EQ(objmeshes.size(), 18);
EXPECT_EQ(objcurves.size(), 2);
}