Browse Source

revert silly checkin

David Rose 21 years ago
parent
commit
a6e733aa97
1 changed files with 6 additions and 8 deletions
  1. 6 8
      pandatool/src/mayaprogs/mayaCopy.cxx

+ 6 - 8
pandatool/src/mayaprogs/mayaCopy.cxx

@@ -71,6 +71,12 @@ MayaCopy() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void MayaCopy::
 void MayaCopy::
 run() {
 run() {
+  _maya = MayaApi::open_api(_program_name);
+  if (!_maya->is_valid()) {
+    nout << "Unable to initialize Maya.\n";
+    exit(1);
+  }
+
   SourceFiles::iterator fi;
   SourceFiles::iterator fi;
   for (fi = _source_files.begin(); fi != _source_files.end(); ++fi) {
   for (fi = _source_files.begin(); fi != _source_files.end(); ++fi) {
     ExtraData ed;
     ExtraData ed;
@@ -149,14 +155,6 @@ filter_filename(const string &source) {
 bool MayaCopy::
 bool MayaCopy::
 copy_maya_file(const Filename &source, const Filename &dest,
 copy_maya_file(const Filename &source, const Filename &dest,
                CVSSourceDirectory *dir) {
                CVSSourceDirectory *dir) {
-  if (_maya.is_null()) {
-    _maya = MayaApi::open_api(_program_name);
-    if (!_maya->is_valid()) {
-      nout << "Unable to initialize Maya.\n";
-      exit(1);
-    }
-  }
-
   if (!_maya->read(source)) {
   if (!_maya->read(source)) {
     maya_cat.error()
     maya_cat.error()
       << "Unable to read " << source << "\n";
       << "Unable to read " << source << "\n";