00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef MAYACOPY_H
00016 #define MAYACOPY_H
00017
00018 #include "pandatoolbase.h"
00019 #include "cvsCopy.h"
00020 #include "mayaApi.h"
00021 #include "mayaShaders.h"
00022 #include "dSearchPath.h"
00023 #include "pointerTo.h"
00024
00025 #include "pset.h"
00026
00027 class MayaShader;
00028 class MayaShaderColorDef;
00029 class MDagPath;
00030
00031
00032
00033
00034
00035
00036 class MayaCopy : public CVSCopy {
00037 public:
00038 MayaCopy();
00039
00040 void run();
00041
00042 protected:
00043 virtual bool copy_file(const Filename &source, const Filename &dest,
00044 CVSSourceDirectory *dir, void *extra_data,
00045 bool new_file);
00046
00047 virtual string filter_filename(const string &source);
00048
00049 private:
00050 enum FileType {
00051 FT_maya,
00052 FT_texture
00053 };
00054
00055 class ExtraData {
00056 public:
00057 FileType _type;
00058 MayaShader *_shader;
00059 };
00060
00061 bool copy_maya_file(const Filename &source, const Filename &dest,
00062 CVSSourceDirectory *dir);
00063 bool extract_texture(MayaShaderColorDef &color_def, CVSSourceDirectory *dir);
00064 bool copy_texture(const Filename &source, const Filename &dest,
00065 CVSSourceDirectory *dir);
00066
00067 bool collect_shaders();
00068 bool collect_shader_for_node(const MDagPath &dag_path);
00069
00070 bool _keep_ver;
00071 bool _omit_tex;
00072 bool _omit_ref;
00073 int _curr_idx;
00074 bool _maya_ascii;
00075
00076
00077
00078
00079 vector_string _exec_string;
00080
00081 PT(MayaApi) _maya;
00082 MayaShaders _shaders;
00083 };
00084
00085 #endif