Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

pandatool/src/mayaprogs/mayaCopy.h

Go to the documentation of this file.
00001 // Filename: mayaCopy.h
00002 // Created by:  drose (10May02)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #ifndef MAYACOPY_H
00020 #define MAYACOPY_H
00021 
00022 #include "pandatoolbase.h"
00023 #include "cvsCopy.h"
00024 #include "mayaApi.h"
00025 #include "mayaShaders.h"
00026 #include "dSearchPath.h"
00027 #include "pointerTo.h"
00028 
00029 #include "pset.h"
00030 
00031 class MayaShader;
00032 class MayaShaderColorDef;
00033 class MDagPath;
00034 
00035 ////////////////////////////////////////////////////////////////////
00036 //       Class : MayaCopy
00037 // Description : A program to copy Maya .mb files into the cvs
00038 //               tree.
00039 ////////////////////////////////////////////////////////////////////
00040 class MayaCopy : public CVSCopy {
00041 public:
00042   MayaCopy();
00043 
00044   void run();
00045 
00046 protected:
00047   virtual bool copy_file(const Filename &source, const Filename &dest,
00048                          CVSSourceDirectory *dir, void *extra_data,
00049                          bool new_file);
00050 
00051   virtual string filter_filename(const string &source);
00052 
00053 private:
00054   enum FileType {
00055     FT_maya,
00056     FT_texture
00057   };
00058 
00059   class ExtraData {
00060   public:
00061     FileType _type;
00062     MayaShader *_shader;
00063   };
00064 
00065   bool copy_maya_file(const Filename &source, const Filename &dest,
00066                      CVSSourceDirectory *dir);
00067   bool extract_texture(MayaShaderColorDef &color_def, CVSSourceDirectory *dir);
00068   bool copy_texture(const Filename &source, const Filename &dest,
00069                     CVSSourceDirectory *dir);
00070 
00071   bool collect_shaders();
00072   bool collect_shader_for_node(const MDagPath &dag_path);
00073 
00074   bool _keep_ver;
00075 
00076   PT(MayaApi) _maya;
00077   MayaShaders _shaders;
00078 };
00079 
00080 #endif

Generated on Fri May 2 03:21:26 2003 for Panda-Tool by doxygen1.3