46 std::string stl_path = blender::tests::flags_test_asset_dir() +
59 constexpr bool print_result_scene =
false;
60 if (print_result_scene) {
67 printf(
"%i, %i, %i, %i, float3(%g, %g, %g), float3(%g, %g, %g)",
84 size_t object_index = 0;
88 if (object_index == 1) {
91 EXPECT_V3_NEAR(object->loc,
float3(0, 0, 0), 0.0001f);
92 EXPECT_V3_NEAR(object->rot,
float3(
M_PI_2, 0, 0), 0.0001f);
93 EXPECT_V3_NEAR(object->scale,
float3(1, 1, 1), 0.0001f);
100 EXPECT_V3_NEAR(positions.first(), expect.
vert_first, 0.0001f);
101 EXPECT_V3_NEAR(positions.last(), expect.
vert_last, 0.0001f);
113 import_and_check(
"all_quads.stl", expect);
119 import_and_check(
"cubes_positioned.stl", expect);
125 import_and_check(
"non_uniform_scale.stl", expect);
General operations, lookup, etc. for blender objects.
Mesh * BKE_object_get_evaluated_mesh(const Object *object_eval)
EXPECT_EQ(BLI_expr_pylike_eval(expr, nullptr, 0, &result), EXPR_PYLIKE_INVALID)
#define STRNCPY(dst, src)
external readfile function prototypes.
#define DEG_OBJECT_ITER_BEGIN(settings_, instance_)
#define DEG_OBJECT_ITER_END
@ DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY
@ DEG_ITER_OBJECT_FLAG_VISIBLE
@ DEG_ITER_OBJECT_FLAG_DUPLI
@ DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET
virtual void depsgraph_create(eEvaluationMode depsgraph_evaluation_mode)
bool blendfile_load(const char *filepath)
struct Depsgraph * depsgraph
struct BlendFileData * bfile
void import_and_check(const char *path, const Expectation &expect)
void importer_main(const bContext *C, const STLImportParams &import_params)
TEST_F(STLExportTest, all_tris)
VecBase< float, 3 > float3
ViewLayer * cur_view_layer