Blender V4.3
blender::io::stl::STLExportTest Class Reference

Inherits BlendfileLoadingBaseTest.

Public Member Functions

bool load_file_and_depsgraph (const std::string &filepath)
 

Protected Member Functions

 STLExportTest ()
 
void SetUp () override
 
void TearDown () override
 
void compare_to_golden (const std::string &blendfile, const std::string &golden_stl)
 
- Protected Member Functions inherited from BlendfileLoadingBaseTest
bool blendfile_load (const char *filepath)
 
void blendfile_free ()
 
virtual void depsgraph_create (eEvaluationMode depsgraph_evaluation_mode)
 
virtual void depsgraph_free ()
 

Static Protected Member Functions

static std::string get_temp_filename (const std::string &filename)
 

Protected Attributes

STLExportParams _params
 
- Protected Attributes inherited from BlendfileLoadingBaseTest
struct BlendFileDatabfile = nullptr
 
struct Depsgraph * depsgraph = nullptr
 

Additional Inherited Members

- Static Public Member Functions inherited from BlendfileLoadingBaseTest
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 

Detailed Description

Definition at line 39 of file stl_exporter_tests.cc.

Constructor & Destructor Documentation

◆ STLExportTest()

blender::io::stl::STLExportTest::STLExportTest ( )
inlineprotected

Member Function Documentation

◆ compare_to_golden()

void blender::io::stl::STLExportTest::compare_to_golden ( const std::string & blendfile,
const std::string & golden_stl )
inlineprotected

Export the given blend file with the given parameters and test to see if it matches a golden file (ignoring any difference in Blender version number).

Parameters
blendfileinput, relative to "tests" directory.
golden_objexpected output, relative to "tests" directory.
paramsthe parameters to be used for export.

Definition at line 84 of file stl_exporter_tests.cc.

References _params, BLI_delete(), BLI_path_basename(), BlendfileLoadingBaseTest::depsgraph, blender::io::stl::export_frame(), STLExportParams::filepath, get_temp_filename(), load_file_and_depsgraph(), printf, blender::io::stl::read_temp_file_in_string(), blender::io::stl::save_failing_test_output, SEP_STR, and STRNCPY.

◆ get_temp_filename()

static std::string blender::io::stl::STLExportTest::get_temp_filename ( const std::string & filename)
inlinestaticprotected

Definition at line 72 of file stl_exporter_tests.cc.

References BKE_tempdir_base(), and SEP_STR.

Referenced by compare_to_golden().

◆ load_file_and_depsgraph()

bool blender::io::stl::STLExportTest::load_file_and_depsgraph ( const std::string & filepath)
inline

◆ SetUp()

void blender::io::stl::STLExportTest::SetUp ( )
inlineoverrideprotected

Definition at line 60 of file stl_exporter_tests.cc.

References BKE_tempdir_init().

◆ TearDown()

void blender::io::stl::STLExportTest::TearDown ( )
inlineoverrideprotectedvirtual

Member Data Documentation

◆ _params

STLExportParams blender::io::stl::STLExportTest::_params
protected

Definition at line 107 of file stl_exporter_tests.cc.

Referenced by compare_to_golden(), and STLExportTest().


The documentation for this class was generated from the following file: