summaryrefslogtreecommitdiffstats
path: root/o3d/converter
diff options
context:
space:
mode:
Diffstat (limited to 'o3d/converter')
-rw-r--r--o3d/converter/cross/converter.cc8
-rw-r--r--o3d/converter/cross/converter.h6
-rw-r--r--o3d/converter/cross/converter_main.cc8
3 files changed, 17 insertions, 5 deletions
diff --git a/o3d/converter/cross/converter.cc b/o3d/converter/cross/converter.cc
index ac1b16e..d2a9bda 100644
--- a/o3d/converter/cross/converter.cc
+++ b/o3d/converter/cross/converter.cc
@@ -226,11 +226,11 @@ bool Convert(const FilePath& in_filename,
FileOutputStreamProcessor stream_processor(out_file);
TarGzGenerator archive_generator(&stream_processor);
- archive_generator.AddFile(ArchiveRequest::O3D_MARKER,
- ArchiveRequest::O3D_MARKER_CONTENT_LENGTH);
+ archive_generator.AddFile(ArchiveRequest::kO3DMarker,
+ ArchiveRequest::kO3DMarkerContentLength);
archive_generator.AddFileBytes(
- reinterpret_cast<const uint8*>(ArchiveRequest::O3D_MARKER_CONTENT),
- ArchiveRequest::O3D_MARKER_CONTENT_LENGTH);
+ reinterpret_cast<const uint8*>(ArchiveRequest::kO3DMarkerContent),
+ ArchiveRequest::kO3DMarkerContentLength);
// Serialize the created O3D scene graph to JSON.
StringWriter out_writer(StringWriter::LF);
diff --git a/o3d/converter/cross/converter.h b/o3d/converter/cross/converter.h
index d613564..48f652c 100644
--- a/o3d/converter/cross/converter.h
+++ b/o3d/converter/cross/converter.h
@@ -83,6 +83,12 @@ struct Options {
// Tells the converter not to change materials to constant if they are used by
// a mesh that has no normals.
bool keep_materials;
+
+ // Use binary formats for buffers, skin, curve.
+ bool binary;
+
+ // Don't make a gzipped tar file. Just make json.
+ bool json_only;
};
// Converts the given file for use in O3D. This is done by
diff --git a/o3d/converter/cross/converter_main.cc b/o3d/converter/cross/converter_main.cc
index e332db4..f7c60c5 100644
--- a/o3d/converter/cross/converter_main.cc
+++ b/o3d/converter/cross/converter_main.cc
@@ -100,13 +100,19 @@ int CrossMain(int argc, char**argv) {
<< " tri-linear filtering.\n"
<< "--keep-materials\n"
<< " Stops the converter from changing materials to <constant> if\n"
- << " they are used by a mesh that has no normals.\n";
+ << " they are used by a mesh that has no normals.\n"
+ << "--no-binary\n"
+ << " Use JSON for buffers, skins, curves instead of binary\n"
+ << "--json-only\n"
+ << " Don't make a gzipped tar file, just JSON.\n";
return EXIT_FAILURE;
}
o3d::converter::Options options;
options.condition = !command_line->HasSwitch(L"no-condition");
options.pretty_print = command_line->HasSwitch(L"pretty-print");
+ options.binary = !command_line->HasSwitch(L"no-binary");
+ options.json_only = !command_line->HasSwitch(L"json-only");
if (command_line->HasSwitch(L"base-path")) {
options.base_path = o3d::WideToFilePath(
command_line->GetSwitchValue(L"base-path"));