Add skip obj unlinker arg

This commit is contained in:
Jan 2022-04-22 23:21:23 +02:00
parent 2823a46b92
commit bba96b248d
3 changed files with 14 additions and 2 deletions

View File

@ -45,7 +45,7 @@ class Unlinker::Impl
_NODISCARD bool ShouldLoadObj() const _NODISCARD bool ShouldLoadObj() const
{ {
return m_args.m_task != UnlinkerArgs::ProcessingTask::LIST; return m_args.m_task != UnlinkerArgs::ProcessingTask::LIST && !m_args.m_skip_obj;
} }
/** /**

View File

@ -73,6 +73,12 @@ const CommandLineOption* const OPTION_MODEL_FORMAT =
.WithParameter("modelFormatValue") .WithParameter("modelFormatValue")
.Build(); .Build();
const CommandLineOption* const OPTION_SKIP_OBJ =
CommandLineOption::Builder::Create()
.WithLongName("skip-obj")
.WithDescription("Skips loading raw obj data.")
.Build();
const CommandLineOption* const OPTION_GDT = const CommandLineOption* const OPTION_GDT =
CommandLineOption::Builder::Create() CommandLineOption::Builder::Create()
.WithLongName("gdt") .WithLongName("gdt")
@ -112,6 +118,7 @@ const CommandLineOption* const COMMAND_LINE_OPTIONS[]
OPTION_SEARCH_PATH, OPTION_SEARCH_PATH,
OPTION_IMAGE_FORMAT, OPTION_IMAGE_FORMAT,
OPTION_MODEL_FORMAT, OPTION_MODEL_FORMAT,
OPTION_SKIP_OBJ,
OPTION_GDT, OPTION_GDT,
OPTION_EXCLUDE_ASSETS, OPTION_EXCLUDE_ASSETS,
OPTION_INCLUDE_ASSETS, OPTION_INCLUDE_ASSETS,
@ -124,6 +131,7 @@ UnlinkerArgs::UnlinkerArgs()
m_task(ProcessingTask::DUMP), m_task(ProcessingTask::DUMP),
m_minimal_zone_def(false), m_minimal_zone_def(false),
m_asset_type_handling(AssetTypeHandling::EXCLUDE), m_asset_type_handling(AssetTypeHandling::EXCLUDE),
m_skip_obj(false),
m_use_gdt(false), m_use_gdt(false),
m_verbose(false) m_verbose(false)
{ {
@ -298,6 +306,9 @@ bool UnlinkerArgs::ParseArgs(const int argc, const char** argv)
} }
} }
// --skip-obj
m_skip_obj = m_argument_parser.IsOptionSpecified(OPTION_SKIP_OBJ);
// --gdt // --gdt
m_use_gdt = m_argument_parser.IsOptionSpecified(OPTION_GDT); m_use_gdt = m_argument_parser.IsOptionSpecified(OPTION_GDT);

View File

@ -54,6 +54,7 @@ public:
std::unordered_map<std::string, size_t> m_specified_asset_type_map; std::unordered_map<std::string, size_t> m_specified_asset_type_map;
AssetTypeHandling m_asset_type_handling; AssetTypeHandling m_asset_type_handling;
bool m_skip_obj;
bool m_use_gdt; bool m_use_gdt;
bool m_verbose; bool m_verbose;