Browse Source

added an option to not copy textures to speed up mayacopy on animation files

Asad M. Zaman 19 years ago
parent
commit
a960a7da1a
2 changed files with 10 additions and 0 deletions
  1. 9 0
      pandatool/src/mayaprogs/mayaCopy.cxx
  2. 1 0
      pandatool/src/mayaprogs/mayaCopy.h

+ 9 - 0
pandatool/src/mayaprogs/mayaCopy.cxx

@@ -68,6 +68,12 @@ MayaCopy() {
      "source filename before it is copied into the tree.",
      &CVSCopy::dispatch_vector_string, NULL, &_replace_prefix);
 
+  add_option
+    ("omittex", "", 0,
+     "Character animation files do not need to copy the texures. This option omits the "
+     "textures of the models to be re-mayacopied",
+     &CVSCopy::dispatch_none, &_omit_tex);
+
   add_path_replace_options();
 }
 
@@ -115,6 +121,9 @@ copy_file(const Filename &source, const Filename &dest,
     return copy_maya_file(source, dest, dir);
 
   case FT_texture:
+    if (_omit_tex) {
+      return true;
+    }
     return copy_texture(source, dest, dir);
   }
 

+ 1 - 0
pandatool/src/mayaprogs/mayaCopy.h

@@ -72,6 +72,7 @@ private:
   bool collect_shader_for_node(const MDagPath &dag_path);
 
   bool _keep_ver;
+  bool _omit_tex;
   int _curr_idx;
   vector_string _replace_prefix;