From 5d60fbd964154bb9cb985467049a9ed7e59811be Mon Sep 17 00:00:00 2001 From: Wolfgang Thaller Date: Sat, 8 Nov 2014 00:53:58 +0100 Subject: [PATCH] Rez: add --copy option for reading resources from an existing file --- Rez/Rez.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Rez/Rez.cc b/Rez/Rez.cc index 3f7059b5be..b11a9ac783 100644 --- a/Rez/Rez.cc +++ b/Rez/Rez.cc @@ -32,6 +32,7 @@ int main(int argc, const char *argv[]) ("creator,c", po::value()->default_value("RSED"), "output file finder creator code") ("define,D", po::value>(), "predefine preprocessor symbol") ("include,I", po::value>(), "add include file path") + ("copy", po::value>(), "copy resources from other resource file") ("debug,d", "debug logging") ; po::options_description hidden, alldesc; @@ -81,6 +82,14 @@ int main(int argc, const char *argv[]) world.getResources().addResources(rsrcFile.resources); } + if(options.count("copy")) + for(std::string copyFile : options["define"].as>()) + { + ResourceFile copyRsrc(copyFile); + + copyRsrc.read(); + world.getResources().addResources(copyRsrc.resources); + } for(std::string fn : options["input"].as>()) {