diff --git a/Rez/Rez.cc b/Rez/Rez.cc index 09dbb4f6ed..2b123bd3ec 100644 --- a/Rez/Rez.cc +++ b/Rez/Rez.cc @@ -51,6 +51,7 @@ int main(int argc, const char *argv[]) ("copy", po::value>(), "copy resources from other resource file") ("cc", po::value>(), "also write output to another file") ("debug,d", "debug logging") + ("data", po::value(), "copy data fork from another file") ; po::options_description hidden, alldesc; hidden.add_options() @@ -98,6 +99,16 @@ int main(int argc, const char *argv[]) world.getResources().addResources(rsrcFile.resources); } + + if(options.count("data")) + { + std::string fn = options["data"].as(); + ResourceFile dataFile(fn); + if(!dataFile.read()) + world.problem(Diagnostic(Diagnostic::error, "Could not read dataresource file " + fn, yy::location())); + rsrcFile.data = dataFile.data; + } + if(options.count("copy")) for(std::string fn : options["copy"].as>()) CopyBinaryResources(world, fn);