// BaseGeoExport.h: interface for the BaseGeoExport class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_BASEGEOEXPORT_H__EEBAD982_7025_11D3_8B36_00902712C9AE__INCLUDED_)
#define AFX_BASEGEOEXPORT_H__EEBAD982_7025_11D3_8B36_00902712C9AE__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <Stuff\Stuff.hpp>
#include <MAXProxies\MAXProxies.hpp>
#include <MLR\MLR.hpp>
#include <ElementProxies\ElementProxies.hpp>
#include <ElementRenderer\ElementRenderer.hpp>
#include <gosFX\gosFX.hpp>


#include "AnimationSuite.h"

/////////////////////////////////////////////////////////////////////////////
// 
// structure to save way we are exporting to be used in the case of command
// line exporting.  defaults are all false.
//
typedef struct {
	bool overwriteTextures; 
	bool outputAmatureFile;
	unsigned exportType;
} ExportInfo;

enum {
	EXPORT_SHAPE		= 0,
	EXPORT_CHARACTER	= 1,
	EXPORT_BATCH		= 2,
};

#define  EXPORTINFO_CLASS_ID Class_ID(0x17724552, 0x2ee077db)
#define	 EXPORTINFO_SUPER_CLASS_ID    UTILITY_CLASS_ID

class BaseGeoExporter  
{
public:
    BaseGeoExporter(const char *str): 
	  m_strHintFile(str),
	  m_isBRB(false)
	{    
        //VERIFY(m_strHintFile.GetLength()>0);
    }
    BaseGeoExporter::~BaseGeoExporter() {}

	bool	SaveExportInfo(INode *node);
	bool	CheckForErrors(MAXProxies::MAXScene *scene, Interface *i, bool bProgressEnd=true); 
	int		ExportMaxScene(MAXProxies::MAXScene *scene, Interface *i, const TCHAR *name);
	void    StartExport(Interface *ip, CString& str, bool bSuppressPrompts);
	void	EndExport(Interface *ip);
	void	UpdateProgress(Interface *ip, int progress, CString& str);
	bool	LoadPlugCfg(Interface *i);

private:
	INode	*FindChunk(INode *node);
	bool	InternalSaveExportInfo(INode *node);

protected:
	ExportInfo m_exportInfo;		// the saved export information stored in the max file
	ExportInfo m_oldExportInfo;	// the saved export information stored in the max file
	//CString m_directoryPath;
	CString m_maxDataPath;
	CString m_erfPath;
	CString m_texturePath;
	bool m_exportDataFiles;
	int	 m_progress;
	bool m_suppress;
	bool m_isBRB;
	CString m_strHintFile;

    friend BatchExp;
};

#endif // !defined(AFX_BASEGEOEXPORT_H__EEBAD982_7025_11D3_8B36_00902712C9AE__INCLUDED_)
