put ExportObj behind an option

This commit is contained in:
Jonathan 2022-06-22 18:13:56 -04:00
parent cb3ef7b19f
commit 3f75bb4039
2 changed files with 4 additions and 3 deletions

View File

@ -459,6 +459,7 @@ public:
setting_bool litonly{this, "litonly", false, &output_group, "only write .lit file, don't modify BSP"};
setting_bool nolights{this, "nolights", false, &output_group, "ignore light entities (only sunlight/minlight)"};
setting_int32 facestyles{this, "facestyles", 4, &output_group, "max amount of styles per face; requires BSPX lump"};
setting_bool exportobj{this, "exportobj", false, &output_group, "export an .OBJ for inspection"};
inline void CheckNoDebugModeSet()
{

View File

@ -1092,9 +1092,9 @@ int light_main(int argc, const char **argv)
bsp.dlightdata.clear();
}
#if 0
ExportObj(source, bsp);
#endif
if (options.exportobj.value()) {
ExportObj(fs::path{source}.replace_extension(".obj"), &bsp);
}
WriteEntitiesToString(options, &bsp);
/* Convert data format back if necessary */