Skip to content

Commit

Permalink
Merge pull request assimp#3580 from mmp/tdb/pbrt3_exporter
Browse files Browse the repository at this point in the history
pbrt-v4 exporter
  • Loading branch information
kimkulling authored Jan 21, 2021
2 parents fabea8c + 0b9cbb5 commit 5e21b9f
Show file tree
Hide file tree
Showing 5 changed files with 8,851 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,10 @@ if (NOT ASSIMP_NO_EXPORT)
AssetLib/3MF/D3MFExporter.h
AssetLib/3MF/D3MFExporter.cpp)

ADD_ASSIMP_EXPORTER( PBRT
Pbrt/PbrtExporter.h
Pbrt/PbrtExporter.cpp)

ADD_ASSIMP_EXPORTER( ASSJSON
AssetLib/Assjson/cencode.c
AssetLib/Assjson/cencode.h
Expand Down
7 changes: 7 additions & 0 deletions code/Common/Exporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ void ExportSceneM3DA(const char*, IOSystem*, const aiScene*, const ExportPropert
#ifndef ASSIMP_BUILD_NO_ASSJSON_EXPORTER
void ExportAssimp2Json(const char* , IOSystem*, const aiScene* , const Assimp::ExportProperties*);
#endif
#ifndef ASSIMP_BUILD_NO_PBRT_EXPORTER
void ExportScenePbrt(const char*, IOSystem*, const aiScene*, const ExportProperties*);
#endif

static void setupExporterArray(std::vector<Exporter::ExportFormatEntry> &exporters) {
(void)exporters;
Expand Down Expand Up @@ -221,6 +224,10 @@ static void setupExporterArray(std::vector<Exporter::ExportFormatEntry> &exporte
exporters.push_back(Exporter::ExportFormatEntry("3mf", "The 3MF-File-Format", "3mf", &ExportScene3MF, 0));
#endif

#ifndef ASSIMP_BUILD_NO_PBRT_EXPORTER
exporters.push_back(Exporter::ExportFormatEntry("pbrt", "pbrt-v4 scene description file", "pbrt", &ExportScenePbrt, aiProcess_Triangulate | aiProcess_SortByPType));
#endif

#ifndef ASSIMP_BUILD_NO_ASSJSON_EXPORTER
exporters.push_back(Exporter::ExportFormatEntry("assjson", "Assimp JSON Document", "json", &ExportAssimp2Json, 0));
#endif
Expand Down
Loading

0 comments on commit 5e21b9f

Please sign in to comment.