00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
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
00037
00038
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