Initial full mirror of c:\VWE (source + assets + toolchain + outputs) via Git LFS

Complete disaster-recovery snapshot: engine/game source, game data assets,
VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive.
Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false,
no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
This commit is contained in:
Cyd
2026-06-24 21:28:16 -05:00
commit 2b8ca921cb
66341 changed files with 7923174 additions and 0 deletions
@@ -0,0 +1,66 @@
// About.cpp : implementation file
//
#include "stdafx.h"
#ifdef STRICT // Already defined by stdafx,
#undef STRICT // so we avoid warning linking msg
#endif
#ifdef _MBCS // The same as above
#undef _MBCS
#endif
#if !defined(STUFF_STUFF_HPP)
#include "Stuff\Stuff.hpp"
#endif
#if !defined(MW4ANIMATIONSYSTEM_HPP)
#include <MW4\MW4AnimationSystem.hpp>
#endif
#undef Min
#undef Max
#include "Max.h"
#include "AnimationSuite.h"
#include "About.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAbout dialog
CAbout::CAbout(CWnd* pParent /*=NULL*/)
: CDialog(CAbout::IDD, pParent)
{
//{{AFX_DATA_INIT(CAbout)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CAbout::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAbout)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CAbout, CDialog)
//{{AFX_MSG_MAP(CAbout)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CAbout message handlers
@@ -0,0 +1,46 @@
#if !defined(AFX_ABOUT_H__D8E04BE2_B88E_11D1_98AD_0040051EDCE7__INCLUDED_)
#define AFX_ABOUT_H__D8E04BE2_B88E_11D1_98AD_0040051EDCE7__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// About.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CAbout dialog
class CAbout : public CDialog
{
// Construction
public:
CAbout(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CAbout)
enum { IDD = IDD_ABOUT };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAbout)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CAbout)
// NOTE: the ClassWizard will add member functions here
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_ABOUT_H__D8E04BE2_B88E_11D1_98AD_0040051EDCE7__INCLUDED_)
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,244 @@
// PlugTest.h : main header file for the PLUGTEST DLL
//
#if !defined(AFX_ANIMEXPORT_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_)
#define AFX_ANIMEXPORT_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
class AnimExp;
#include "AnimationSuite.h"
#define MAX_TICKS_PER_SECOND 4800.0f
#define OUTPUT_TEXT
#define TIME_TO_FRAME(time, frame) \
if (GetTicksPerFrame() != 0 || time != 0) \
{ \
frame = (int)((float)time / (float)GetTicksPerFrame()); \
} \
else \
{ \
frame = 0; \
}
/////////////////////////////////////////////////////////////////////////////
class MyKeyReduceStatus:
public KeyReduceStatus
{
public:
MyKeyReduceStatus()
{
}
void Init(int total)
{
}
int Progress(int p){return KEYREDUCE_CONTINUE;};
};
/////////////////////////////////////////////////////////////////////////////
class TriggerTempStorage
{
public:
Stuff::Scalar time;
int triggers;
TriggerTempStorage()
{
time = 0.0f;
triggers = 0;
}
};
#define PB_TRIGGER_0 2
#define PB_TRIGGER_1 3
#define PB_TRIGGER_2 4
#define PB_TRIGGER_3 5
#define PB_TRIGGER_4 6
#define PB_TRIGGER_5 7
#define PB_TRIGGER_6 8
#define PB_TRIGGER_7 9
#define PB_TRIGGER_8 10
#define PB_TRIGGER_9 11
#define PB_TRIGGER_10 12
#define PB_TRIGGER_11 13
#define PB_TRIGGER_12 14
#define PB_TRIGGER_13 15
#define PB_TRIGGER_14 16
#define PB_TRIGGER_15 17
/////////////////////////////////////////////////////////////////////////////
class AnimExp : public SceneExport
{
public:
AnimExp() {}
~AnimExp() {}
int ExtCount() { return 1; }
const TCHAR * Ext(int n) {
switch(n) {
case 0:
// This cause a static string buffer overwrite
// return GetString(IDS_EXTENSION1);
return _T("mw4anim");
}
return _T("");
}
const TCHAR * LongDesc() { return GetString(IDS_LONGDESC); }
const TCHAR * ShortDesc() { return _T("MW4 Animation"); }
const TCHAR * AuthorName() { return _T("Jerry Edsall"); }
const TCHAR * CopyrightMessage() { return GetString(IDS_COPYRIGHT); }
const TCHAR * OtherMessage1() { return _T(""); }
const TCHAR * OtherMessage2() { return _T(""); }
unsigned int Version() { return 100; }
void AnimExp::ShowAbout(HWND hWnd) {
CAbout dlg;
dlg.DoModal();
}
int DoExport(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppress_prompts=FALSE);
int DoExportWrap(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppress_prompts=FALSE);
private:
enum {
LinearKeyframeType = 0,
TCBKeyframeType,
BezierKeyframeType
};
void CountJoint(
INode* node,
int& joint_count,
int& counter,
JointEditDialog *dialog
);
void CalcNameSize(
INode* node,
size_t& name_array_size,
int& counter,
JointEditDialog *dialog
);
void CalcChannelCount(
INode* node,
int& channel_count,
int& counter,
JointEditDialog *dialog
);
int CalcControlChannels(int counter, INode* node);
void MakeTriggerChannelStream(
TriggerTempStorage* trigger_stream,
int frame_count,
BYTE **key_data,
size_t *size_of_data,
BYTE **key_time_data,
size_t *size_of_time_data,
MW4Animation::AnimData &anim_data,
int current_channel,
int current_joint
);
void MakeJointStream(
Interface *ip,
INode* node,
BYTE **key_data,
size_t *size_of_data,
BYTE **key_time_data,
size_t *size_of_time_data,
int& counter,
MW4Animation::AnimData &anim_data,
int& channels_used,
int& current_joint,
JointEditDialog *dialog,
BOOL suppress_prompts=FALSE
);
void MakeChannelStream(
Control* c,
BYTE **key_data,
size_t *size_of_data,
BYTE **key_time_data,
size_t *size_of_time_data,
MW4Animation::AnimData &anim_data,
int current_channel,
int current_joint
);
void MakeChannelVelocityStream(
Control* c,
BYTE **key_data,
size_t *size_of_data,
BYTE **key_time_data,
size_t *size_of_time_data,
MW4Animation::AnimData &anim_data,
int current_channel,
int current_joint
);
void SolveVelocities(
Control* c,
Stuff::MemoryStream &stream,
Stuff::MemoryStream &time_stream,
MW4Animation::AnimData &anim_data,
int current_channel
);
void MakeChannelAngularVelocityStream(
Control* c,
BYTE **key_data,
size_t *size_of_data,
BYTE **key_time_data,
size_t *size_of_time_data,
MW4Animation::AnimData &anim_data,
int current_channel,
int current_joint
);
void SolveAngularVelocities(
Control* c,
Stuff::MemoryStream &stream,
Stuff::MemoryStream &time_stream,
MW4Animation::AnimData &anim_data,
int current_channel
);
void ConvertKey(Stuff::MemoryStream &stream, Stuff::MemoryStream &time_stream, Control *c, int key_number);
BYTE GetKeyType(Control* c);
size_t GetSizeOfKey(int key_type);
int GetFrameCount(Control* c);
void Optimize(MW4Animation::AnimData &anim_data);
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_ANIMEXPORT_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_)
@@ -0,0 +1,695 @@
#include "stdafx.h"
#ifdef STRICT // Already defined by stdafx,
#undef STRICT // so we avoid warning linking msg
#endif
#ifdef _MBCS // The same as above
#undef _MBCS
#endif
#include <GameOS\GameOS.hpp>
#if !defined(DLLPLATFORM_DLLPLATFORM_HPP)
#include "DLLPlatform\DLLPlatform.hpp"
#endif
#if !defined(STUFF_STUFF_HPP)
#include "Stuff\Stuff.hpp"
#endif
#if !defined(MW4ANIMATIONSYSTEM_HPP)
#include <MW4\MW4AnimationSystem.hpp>
#endif
#undef Min
#undef Max
#pragma pack(push,8)
#include "Max.h" // Include MAX's main header file
#pragma pack(pop)
#include <Stuff\StuffHeaders.hpp>
#include "MaxProxies\MaxProxyHeaders.hpp"
#include <adept\collisionvolume.hpp>
#include "AnimationSuite.h"
#include "About.h"
#include "JointEditDialog.h"
#include "ArmatureExport.h"
#include "siteobject.h"
#include "cvobject.h"
#include "AnimationExport.h"
#include "ErfExport.h"
#include "MLRExport.h"
#include "EBFExport.h"
#include "BatchExport.h"
#include "CvExport.h"
#include "lightexport.h"
#include "erfimport.h"
#include "missionimp.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#define DLLEXPORT __declspec(dllexport) // Facilite Function's Exportation Declaration
CAnimExpApp theApp; // Global Object representing the application
AnimExpClassDesc animExpDesc;
JointPreferenceClassDesc jointPreferenceDesc;
OptimizeKeyframeClassDesc optimizeKeyframeDesc;
ReplicateClassDesc replicateExpDesc;
SiteObjectClassDesc siteObjectClassDesc;
LegMirrorClassDesc legmirrorDesc;
HillAdjustClassDesc hillAdjustDesc;
ErfExpClassDesc erfExpDesc;
MLRExpClassDesc MLRExpDesc;
EBFExpClassDesc EBFExpDesc;
BatchExpClassDesc batchExpDesc;
ArmatureExpClassDesc armatureExpDesc;
FallToolClassDesc fallToolDesc;
SkeletonVerifyClassDesc skeletonVerifyDesc;
CvObjectClassDesc cvObjectClassDesc;
CvExpClassDesc cvExpDesc;
CvToolClassDesc cvToolDesc;
LightExpClassDesc lightExpDesc;
ErfImpClassDesc erfImpDesc;
MissionImpClassDesc missionImpDesc;
//HINSTANCE hInstance;
/////////////////////////////////////////////////////////////////////////////
// Prototypes
static BOOL CALLBACK QuickFileProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
/////////////////////////////////////////////////////////////////////////////
// CAnimExpApp
BEGIN_MESSAGE_MAP(CAnimExpApp, CWinApp)
//{{AFX_MSG_MAP(CAnimExpApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CAnimExpApp construction
void TurnOnExceptions()
{
gos_MathExceptions( 1, 1 );
}
void TurnOffExceptions()
{
gos_MathExceptions( 0, 0 );
}
CAnimExpApp::CAnimExpApp()
{
}
HGOSHEAP AnimSuiteHeap;
/////////////////////////////////////////////////////////////////////////////
// DLL's InitInstance, called when the DLL is being linked to a client
BOOL CAnimExpApp::InitInstance()
{
TurnOnExceptions();
//_clear87();
AFX_MANAGE_STATE(AfxGetStaticModuleState());
//Get the DLL's HINSTANCE
hInstance = AfxGetResourceHandle();
//Init 3DS Max Custom Controls
InitCustomControls(hInstance);
//Init Win32 Controls
InitCommonControls();
InitGameOS( hInstance, NULL, "\0" );
Stuff::ArmorLevel = 4;
Stuff::InitializeClasses();
Proxies::InitializeClasses();
MAXProxies::InitializeClasses();
MidLevelRenderer::InitializeClasses();
gosFX::InitializeClasses();
ElementRenderer::InitializeClasses();
ElementProxies::InitializeClasses();
// Initialize_MAXStuff();
TurnOffExceptions();
AnimSuiteHeap = gos_CreateMemoryHeap("AnimSuiteHeap");
Check_Pointer(AnimSuiteHeap);
gos_PushCurrentHeap(AnimSuiteHeap);
return TRUE; //CWinApp::InitInstance();
}
/////////////////////////////////////////////////////////////////////////////
// DLL's ExitInstance, called when the DLL is being unlinked from a client
int CAnimExpApp::ExitInstance()
{
gos_PopCurrentHeap();
TurnOnExceptions();
//_clear87();
ElementRenderer::TerminateClasses();
gosFX::TerminateClasses();
MidLevelRenderer::TerminateClasses();
ElementProxies::TerminateClasses();
MAXProxies::TerminateClasses();
Proxies::TerminateClasses();
Stuff::TerminateClasses();
TurnOffExceptions();
ExitGameOS();
return CWinApp::ExitInstance();
}
/////////////////////////////////////////////////////////////////////////////
// 3DS Max Identification Callbacks
DLLEXPORT const TCHAR* LibDescription ()
{
return GetString(IDS_LIBDESCRIPTION);
}
/////////////////////////////////////////////////////////////////////////////
// Return the Number of Classes present in the DLLs
DLLEXPORT int LibNumberClasses ()
{
// Return the number of plugins in the DLL
return 20;
}
/////////////////////////////////////////////////////////////////////////////
// Return the i'th Class Description Object
DLLEXPORT ClassDesc* LibClassDesc(int i)
{
switch(i) {
case 0:
return &animExpDesc;
case 1:
return &jointPreferenceDesc;
case 2:
return &optimizeKeyframeDesc;
case 3:
return &replicateExpDesc;
case 4:
return &siteObjectClassDesc;
case 5:
return &legmirrorDesc;
case 6:
return &hillAdjustDesc;
case 7:
return &erfExpDesc;
case 8:
return &batchExpDesc;
case 9:
return &armatureExpDesc;
case 10:
return &fallToolDesc;
case 11:
return &skeletonVerifyDesc;
case 12:
return &cvObjectClassDesc;
case 13:
return &cvExpDesc;
case 14:
return &cvToolDesc;
case 15:
return &MLRExpDesc;
case 16:
return &EBFExpDesc;
case 17:
return &lightExpDesc;
case 18:
return &erfImpDesc;
case 19:
return &missionImpDesc;
default:
return 0;
break;
}
}
/////////////////////////////////////////////////////////////////////////////
void *SiteObjectClassDesc::Create(BOOL loading)
{
return new SiteObject();
}
/////////////////////////////////////////////////////////////////////////////
void *AnimExpClassDesc::Create(BOOL loading)
{
return new AnimExp();
}
/////////////////////////////////////////////////////////////////////////////
void *ErfExpClassDesc::Create(BOOL loading)
{
return new ErfExp();
}
/////////////////////////////////////////////////////////////////////////////
void *MLRExpClassDesc::Create(BOOL loading)
{
return new MLRExp();
}
/////////////////////////////////////////////////////////////////////////////
void *EBFExpClassDesc::Create(BOOL loading)
{
return new EBFExp();
}
/////////////////////////////////////////////////////////////////////////////
void *ArmatureExpClassDesc::Create(BOOL loading)
{
return new ArmatureExp();
}
/////////////////////////////////////////////////////////////////////////////
void *BatchExpClassDesc::Create(BOOL loading)
{
return new BatchExp();
}
/////////////////////////////////////////////////////////////////////////////
void *CvObjectClassDesc::Create(BOOL loading)
{
return new CvObject();
}
void *CvExpClassDesc::Create(BOOL loading)
{
return new CvExp();
}
void *LightExpClassDesc::Create(BOOL loading)
{
return new LightExp();
}
void *ErfImpClassDesc::Create(BOOL loading)
{
return new ErfImp();
}
void *MissionImpClassDesc::Create(BOOL loading)
{
return new MissionImp();
}
/////////////////////////////////////////////////////////////////////////////
TCHAR *GetString(int id)
{
static TCHAR buf[256];
if (hInstance)
return LoadString(hInstance, id, buf, sizeof(buf)) ? buf : NULL;
return NULL;
}
/////////////////////////////////////////////////////////////////////////////
// MAX API Version
DLLEXPORT ULONG LibVersion ()
{
return (VERSION_3DSMAX);
}
//===========================================================================//
DWORD WINAPI fn(LPVOID arg) {
return(0);
}
//===========================================================================//
void __stdcall GetGameOSEnvironment(char* CommandLine)
{
//
//----------------------------------------------------------
// This is where to set GOS environment settings.
//----------------------------------------------------------
//
Environment.applicationName = "AnimationSuite";
Environment.screenWidth = 640;
Environment.screenHeight = 480;
Environment.bitDepth = 16;
}
HWND EnableQuickFile(Interface *ip,HWND hWnd)
{
//Display the plugin's Rollup Dialog
AFX_MANAGE_STATE(AfxGetStaticModuleState());
HINSTANCE loc_hInstance = AfxGetResourceHandle ();
HWND hRet = ip->AddRollupPage(loc_hInstance, MAKEINTRESOURCE(IDD_QUICKFILE_PANEL),
QuickFileProc, _T("Quick File"),(LPARAM)hWnd);
char szKey[100] = "SOFTWARE\\Autodesk\\3D Studio MAX\\Plugins\\QuickFile";
HKEY hKey;
if (ERROR_SUCCESS == RegOpenKey(HKEY_LOCAL_MACHINE,szKey,&hKey))
{
DWORD wType = REG_SZ;
char szValue[100];
BYTE *pData = (BYTE *)szValue;
DWORD size = 100;
RegQueryValueEx(hKey,"Enabled",0,&wType,(BYTE *)szValue,&size);
// Disable the drop down
if ('0' == szValue[0])
{
IRollupWindow *pRoll = ip->GetCommandPanelRollup();
pRoll->SetPanelOpen(pRoll->GetNumPanels()-1,false);
}
size = 100;
RegQueryValueEx(hKey,"NumFiles",0,&wType,(BYTE *)szValue,&size);
int maxfiles;
sscanf(szValue,"%d",&maxfiles);
for (int x=0;x<maxfiles;x++)
{
char szKey[100];
size = 100;
sprintf(szKey,"%d",x);
RegQueryValueEx(hKey,szKey,0,&wType,(BYTE *)szValue,&size);
char fname[20];
_splitpath((LPCTSTR)szValue,NULL,NULL,fname,NULL);
if (LB_ERR == SendDlgItemMessage(hRet,IDC_QUICKFILE_LISTBOX,LB_FINDSTRINGEXACT,0,(LPARAM)fname))
{
char *psz = strdup((LPCTSTR)szValue);
int index = SendDlgItemMessage(hRet,IDC_QUICKFILE_LISTBOX,LB_ADDSTRING,0,(LPARAM)fname);
SendDlgItemMessage(hRet,IDC_QUICKFILE_LISTBOX,LB_SETITEMDATA,index,(LPARAM)psz);
}
}
}
else
{
IRollupWindow *pRoll = ip->GetCommandPanelRollup();
pRoll->SetPanelOpen(pRoll->GetNumPanels()-1,false);
}
return hRet;
}
void DisableQuickFile(Interface * ip,HWND hWnd)
{
char szKey[100] = "SOFTWARE\\Autodesk\\3D Studio MAX\\Plugins\\QuickFile";
HKEY hKey;
RegCreateKey(HKEY_LOCAL_MACHINE,szKey,&hKey);
IRollupWindow *pRoll = ip->GetCommandPanelRollup();
char *strOpen = pRoll->IsPanelOpen(pRoll->GetNumPanels()-1)?"1":"0";
RegSetValueEx(hKey,"Enabled",0,REG_SZ,(BYTE *)strOpen,strlen(strOpen));
char szValue[MAX_PATH];
int count = SendDlgItemMessage(hWnd,IDC_QUICKFILE_LISTBOX,LB_GETCOUNT,0,0);
sprintf(szValue,"%d",count);
RegSetValueEx(hKey,"NumFiles",0,REG_SZ,(BYTE *)szValue,strlen(szValue));
for (int x = 0;x<count;x++)
{
//SendDlgItemMessage(hWnd,IDC_QUICKFILE_LISTBOX,LB_GETTEXT,x,(LPARAM)buf);
LPARAM lpPath = SendDlgItemMessage(hWnd,IDC_QUICKFILE_LISTBOX,LB_GETITEMDATA,x,0);
char *pPath = (char *)lpPath;
char szKey[100];
sprintf(szKey,"%d",x);
RegSetValueEx(hKey,szKey,0,REG_SZ,(BYTE *)pPath,strlen(pPath));
}
ip->DeleteRollupPage(hWnd);
}
static BOOL CALLBACK QuickFileProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
//static HWND hotherWnd = NULL;
AFX_MANAGE_STATE(AfxGetStaticModuleState());
switch (msg)
{
case WM_INITDIALOG:
{
//hotherWnd = (HWND)lParam;
SetWindowLong(GetDlgItem(hWnd,IDC_QUICKFILE_APPLY),GWL_USERDATA,lParam);
break;
}
case WM_DESTROY:
{
//hotherWnd = NULL;
break;
}
case WM_COMMAND:
{
switch (LOWORD(wParam)) //Handle Panel's controls
{
case IDC_QUICKFILE_LISTBOX:
{
switch (HIWORD(wParam))
{
case LBN_SELCHANGE:
{
HWND hListBox = (HWND)lParam;
HWND hTarget = (HWND)GetWindowLong(GetDlgItem(hWnd,IDC_QUICKFILE_APPLY),GWL_USERDATA);
SendMessage(hTarget,msg,wParam,lParam);
break;
}
}
break;
}
case IDC_QUICKFILE_ADD:
{
HWND hTarget = (HWND)GetWindowLong(GetDlgItem(hWnd,IDC_QUICKFILE_APPLY),GWL_USERDATA);
CFileDialog fd(TRUE,NULL,NULL,OFN_ALLOWMULTISELECT,"Max Files (*.max)|*.max||",CWnd::FromHandle(hTarget));
char *filebuf = new char[MAX_PATH*200];
filebuf[0] = 0;
fd.m_ofn.lpstrFile = filebuf;
fd.m_ofn.nMaxFile = MAX_PATH*200;
if (fd.DoModal()==IDOK)
{
POSITION pos = fd.GetStartPosition();
while (pos)
{
CString path = fd.GetNextPathName(pos);
char fname[20];
_splitpath((LPCTSTR)path,NULL,NULL,fname,NULL);
if (LB_ERR == SendDlgItemMessage(hWnd,IDC_QUICKFILE_LISTBOX,LB_FINDSTRINGEXACT,0,(LPARAM)fname))
{
char *psz = strdup((LPCTSTR)path);
int index = SendDlgItemMessage(hWnd,IDC_QUICKFILE_LISTBOX,LB_ADDSTRING,0,(LPARAM)fname);
SendDlgItemMessage(hWnd,IDC_QUICKFILE_LISTBOX,LB_SETITEMDATA,index,(LPARAM)psz);
}
}
}
break;
}
case IDC_QUICKFILE_REMOVE:
{
int count = SendDlgItemMessage(hWnd,IDC_QUICKFILE_LISTBOX,LB_GETSELCOUNT,0,0);
int *items = new int[count];
int icount = SendDlgItemMessage(hWnd,IDC_QUICKFILE_LISTBOX,LB_GETSELITEMS,count,(LPARAM)items);
// Start from highest index and count down because indices may change from deletion
for (;icount;icount--)
{
char *psz = (char *)SendDlgItemMessage(hWnd,IDC_QUICKFILE_LISTBOX,LB_GETITEMDATA,icount-1,0);
if (psz)
free(psz);
SendDlgItemMessage(hWnd,IDC_QUICKFILE_LISTBOX,LB_DELETESTRING,items[icount],0);
}
delete items;
break;
}
case IDC_QUICKFILE_APPLY:
{
HWND hTarget = (HWND)GetWindowLong(GetDlgItem(hWnd,IDC_QUICKFILE_APPLY),GWL_USERDATA);
SendMessage(hTarget,WM_QUICKFILE_BEGIN,0,0);
int count = SendDlgItemMessage(hWnd,IDC_QUICKFILE_LISTBOX,LB_GETCOUNT,0,0);
char buf[100];
for (;count;count--)
{
SendDlgItemMessage(hWnd,IDC_QUICKFILE_LISTBOX,LB_GETTEXT,count-1,(LPARAM)buf);
LPARAM lpPath = SendDlgItemMessage(hWnd,IDC_QUICKFILE_LISTBOX,LB_GETITEMDATA,count-1,0);
SendMessage(hTarget,WM_QUICKFILE_APPLYFILE,(WPARAM)buf,lpPath);
}
SendMessage(hTarget,WM_QUICKFILE_END,0,0);
break;
}
}
break;
}
default:
{
return FALSE;
}
}
return TRUE;
}
#define NUM_STAT_UPDATES 20
static float ErrorAmount(Point3 v1, Point3 v2)
{
return LengthSquared(v1-v2);
}
static float ErrorAmount(float v1, float v2)
{
float res = v1-v2;
return res*res;
}
static float ErrorAmount(Quat v1, Quat v2)
{
AngAxis res(v2/v1);
return res.angle * res.angle;
}
static float ErrorAmount(ScaleValue v1, ScaleValue v2)
{
return LengthSquared(v1.s-v2.s);
}
template <class T> int ReduceKeys_MW4(
Control *cont,Interval range,float thresh,TimeValue step,
KeyReduceStatus *status, T xx)
{
Interval valid;
Tab<TimeValue> times;
int i,j,offset = cont->GetKeyTimes(times,range,0);
TimeValue t;
int statUp, res;
//if (times.Count() <3) return KEYREDUCE_CONTINUE;
if (!times.Count()) return KEYREDUCE_CONTINUE;
// Init the status callback if we got one.
if (status) status->Init(times.Count()-1);
// The number of keys to process inbetween each update
statUp = times.Count()/NUM_STAT_UPDATES;
if (statUp==0) statUp = 1;
// Square the threshold.
thresh = thresh*thresh;
// Build a table of the origanal values
Tab<T> vals;
vals.SetCount((range.End()-range.Start())/step + 1);
for (t=range.Start(),i=0; t<range.End(); t+=step,i++) {
cont->GetValue(t,&vals[i],valid);
}
// Start at the last key and see if each key can be deleted.
for (i = times.Count()-1; i>=0; i--) {
//theHold.Begin();
Control *old_cont = (Control *)cont->Clone();
// Delete the key..
cont->DeleteKeyByIndex(i+offset);
// Check to see if the path is still within threshold.
BOOL ok = TRUE;
for (t=range.Start(),j=0; t<range.End(); t+=step,j++) {
T val;
cont->GetValue(t,&val,valid);
if (ErrorAmount(val,vals[j]) > thresh) {
ok = FALSE;
break;
}
}
// If it was ok to delete this key, great! otherwise put it back
if (ok) {
//theHold.Accept(0);
} else {
//theHold.Cancel();
cont->Copy(old_cont);
}
delete old_cont;
// Maybe update the status
if (status && !(i%statUp)) {
switch (res = status->Progress(times.Count()-1-i)) {
case KEYREDUCE_ABORT:
case KEYREDUCE_STOP:
return res;
}
}
}
return TRUE;
}
int ApplyKeyReduction_MW4(
Control *cont,Interval range,float thresh,TimeValue step,
KeyReduceStatus *status)
{
if (!cont->NumKeys()) return TRUE;
int res = KEYREDUCE_CONTINUE;
switch (cont->SuperClassID()) {
case CTRL_FLOAT_CLASS_ID:
res = ReduceKeys_MW4(cont,range,thresh,step,status,float(0));
break;
case CTRL_POSITION_CLASS_ID:
case CTRL_POINT3_CLASS_ID:
res = ReduceKeys_MW4(cont,range,thresh,step,status,Point3(0,0,0));
break;
case CTRL_ROTATION_CLASS_ID:
res = ReduceKeys_MW4(cont,range,thresh,step,status,Quat(0.0f,0.0f,0.0f,1.0f));
break;
case CTRL_SCALE_CLASS_ID:
res = ReduceKeys_MW4(cont,range,thresh,step,status,ScaleValue(Point3(1,1,1)));
break;
}
return res;
}
@@ -0,0 +1,8 @@
LIBRARY AnimationSuite
EXPORTS
LibDescription @1
LibNumberClasses @2
LibClassDesc @3
LibVersion @4
SECTIONS
.data READ WRITE
@@ -0,0 +1,504 @@
# Microsoft Developer Studio Project File - Name="AnimationSuite" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=AnimationSuite - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "AnimationSuite.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "AnimationSuite.mak" CFG="AnimationSuite - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "AnimationSuite - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "AnimationSuite - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "AnimationSuite - Win32 Armor" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "AnimationSuite - Win32 Profile" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "AnimationSuite - Win32 Release"
# PROP BASE Use_MFC 6
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 6
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /G6 /Zp4 /MD /W3 /GR /Zi /Ox /Ot /Oa /Og /Oi /Gy /I "..\..\..\Libraries\3dsmax2\Include" /I "..\..\..\Libraries" /I "..\..\..\Code\Mw4" /I "..\..\..\Code" /I "..\..\..\..\CoreTech\Libraries" /I "..\..\..\Libraries\stlport" /D "_USRDLL" /D "_WINDLL" /D "_AFXDLL" /D "NDEBUG" /D "RELEASE" /D "WIN32" /D "_WINDOWS" /D "USE_PROTOTYPES" /D "STRICT" /Yu"stdafx.h" /FD /GF /c
# SUBTRACT CPP /Gf
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x40c /d "NDEBUG" /d "_AFXDLL"
# ADD RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /dll /machine:I386
# ADD LINK32 Core.lib Geom.lib Gfx.Lib Mesh.lib Util.lib winmm.lib expr.lib bmm.lib /nologo /subsystem:windows /dll /machine:I386 /out:"..\..\..\Binaries\3DSPlug-ins\Release\AnimationSuite.dle" /libpath:"..\..\..\Libraries\3dsMax2\Rellib"
# SUBTRACT LINK32 /incremental:yes /nodefaultlib
!ELSEIF "$(CFG)" == "AnimationSuite - Win32 Debug"
# PROP BASE Use_MFC 5
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 6
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /G6 /MT /W3 /GX /O2 /Ob2 /I "..\..\Stuff" /I "..\..\ToolStuff" /I "..\..\..\Libs\3dsMax2\Include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_WINDLL" /D "MULTI_PLAYER" /D "USE_PROTOTYPES" /D "STRICT" /D TEST_CLASS=50 /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /G6 /Zp4 /MDd /W3 /GR /Zi /Od /I "..\..\..\Libraries\3dsmax2\include" /I "..\..\..\Libraries\stlport" /I "..\..\..\Libraries" /I "..\..\..\Code\Mw4" /I "..\..\..\Code" /I "..\..\..\..\CoreTech\Libraries" /D "_AFX_NO_DB_SUPPORT" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "MULTI_PLAYER" /D "USE_PROTOTYPES" /D "STRICT" /D TEST_CLASS=50 /D "_WINDLL" /D "_AFXDLL" /D "_ARMOR" /D "LAB_ONLY" /Fr /Yu"stdafx.h" /FD /GF /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 Core.lib Geom.lib Gfx.Lib Mesh.lib Util.lib /nologo /subsystem:windows /dll /machine:I386 /out:"..\binaries\Debug\AnimationSuite.dlu" /libpath:"..\..\..\Libs\3dsMax2\Debug"
# ADD LINK32 Core.lib Geom.lib Gfx.Lib Mesh.lib Util.lib winmm.lib expr.lib bmm.lib /nologo /subsystem:windows /dll /incremental:yes /debug /machine:I386 /out:"..\..\..\Binaries\3DSPlug-ins\Debug\AnimationSuite.dle" /libpath:"..\..\..\Libraries\3dsMax2\Dbglib"
# SUBTRACT LINK32 /pdb:none /nodefaultlib
!ELSEIF "$(CFG)" == "AnimationSuite - Win32 Armor"
# PROP BASE Use_MFC 5
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Armor"
# PROP BASE Intermediate_Dir "Armor"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 6
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Armor"
# PROP Intermediate_Dir "Armor"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /G6 /MT /W3 /GX /O2 /Ob2 /I "..\..\Stuff" /I "..\..\ToolStuff" /I "..\..\..\Libs\3dsMax2\Include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_WINDLL" /D "MULTI_PLAYER" /D "USE_PROTOTYPES" /D "STRICT" /D TEST_CLASS=50 /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /G6 /Zp4 /MD /W3 /GR /Zi /Od /Gy /I "..\..\..\Libraries\3dsmax2\Include" /I "..\..\..\Libraries" /I "..\..\..\Code\Mw4" /I "..\..\..\Code" /I "..\..\..\..\CoreTech\Libraries" /I "..\..\..\Libraries\stlport" /D "_AFX_NO_DB_SUPPORT" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "MULTI_PLAYER" /D "USE_PROTOTYPES" /D "STRICT" /D TEST_CLASS=50 /D "_WINDLL" /D "_AFXDLL" /D "_ARMOR" /D "LAB_ONLY" /YX /FD /GF /c
# SUBTRACT CPP /Gf
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 Core.lib Geom.lib Gfx.Lib Mesh.lib Util.lib /nologo /subsystem:windows /dll /machine:I386 /out:"..\binaries\Rel\AnimationSuite.dlu" /libpath:"..\..\..\Libs\3dsMax2\Rel"
# ADD LINK32 Core.lib Geom.lib Gfx.Lib Mesh.lib Util.lib winmm.lib expr.lib bmm.lib /nologo /subsystem:windows /dll /incremental:yes /debug /machine:I386 /out:"..\..\..\Binaries\3DSPlug-ins\Armor\AnimationSuite.dle" /libpath:"..\..\..\Libraries\3dsMax2\Rellib"
# SUBTRACT LINK32 /nodefaultlib
!ELSEIF "$(CFG)" == "AnimationSuite - Win32 Profile"
# PROP BASE Use_MFC 5
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Profile"
# PROP BASE Intermediate_Dir "Profile"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 6
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Profile"
# PROP Intermediate_Dir "Profile"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /G6 /MT /W3 /GX /O2 /Ob2 /I "..\..\Stuff" /I "..\..\ToolStuff" /I "..\..\..\Libs\3dsMax2\Include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_WINDLL" /D "MULTI_PLAYER" /D "USE_PROTOTYPES" /D "STRICT" /D TEST_CLASS=50 /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /G6 /Zp4 /MD /W3 /GR /Zi /Ox /Ot /Oa /Og /Oi /Gy /I "..\..\..\Libraries\3dsmax2\Include" /I "..\..\..\Libraries" /I "..\..\..\Code\Mw4" /I "..\..\..\Code" /I "..\..\..\..\CoreTech\Libraries" /I "..\..\..\Libraries\stlport" /D "_AFX_NO_DB_SUPPORT" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "MULTI_PLAYER" /D "USE_PROTOTYPES" /D "STRICT" /D TEST_CLASS=50 /D "_WINDLL" /D "_AFXDLL" /D "LAB_ONLY" /Yu"stdafx.h" /FD /GF /c
# SUBTRACT CPP /Gf
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 Core.lib Geom.lib Gfx.Lib Mesh.lib Util.lib /nologo /subsystem:windows /dll /machine:I386 /out:"..\binaries\Rel\AnimationSuite.dlu" /libpath:"..\..\..\Libs\3dsMax2\Rel"
# ADD LINK32 Core.lib Geom.lib Gfx.Lib Mesh.lib Util.lib winmm.lib expr.lib bmm.lib /nologo /subsystem:windows /dll /incremental:yes /machine:I386 /out:"..\..\..\Binaries\3DSPlug-ins\Profile\AnimationSuite.dle" /libpath:"..\..\..\Libraries\3dsMax2\Rellib"
# SUBTRACT LINK32 /debug /nodefaultlib
!ENDIF
# Begin Target
# Name "AnimationSuite - Win32 Release"
# Name "AnimationSuite - Win32 Debug"
# Name "AnimationSuite - Win32 Armor"
# Name "AnimationSuite - Win32 Profile"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\About.cpp
# End Source File
# Begin Source File
SOURCE=.\AnimationExport.cpp
# End Source File
# Begin Source File
SOURCE=.\AnimationSuite.cpp
# End Source File
# Begin Source File
SOURCE=.\AnimationSuite.def
# End Source File
# Begin Source File
SOURCE=.\AnimationSuite.rc
# End Source File
# Begin Source File
SOURCE=.\ArmatureExport.cpp
# End Source File
# Begin Source File
SOURCE=.\BaseGeoExport.cpp
# End Source File
# Begin Source File
SOURCE=.\BatchExport.cpp
# End Source File
# Begin Source File
SOURCE=.\CvExport.cpp
# End Source File
# Begin Source File
SOURCE=.\cvobject.cpp
# End Source File
# Begin Source File
SOURCE=.\cvtool.cpp
# End Source File
# Begin Source File
SOURCE=.\DlgSelectMegatextures.cpp
# End Source File
# Begin Source File
SOURCE=.\EBFExport.cpp
# End Source File
# Begin Source File
SOURCE=.\EditBatch.cpp
# End Source File
# Begin Source File
SOURCE=.\ErfExport.cpp
# End Source File
# Begin Source File
SOURCE=.\ErfImport.cpp
# End Source File
# Begin Source File
SOURCE=.\ErrorDlg.cpp
# End Source File
# Begin Source File
SOURCE=.\ExportUtil.cpp
# End Source File
# Begin Source File
SOURCE=.\FallTool.cpp
# End Source File
# Begin Source File
SOURCE=.\GeoExport.cpp
# End Source File
# Begin Source File
SOURCE=.\HillAdjust.cpp
# End Source File
# Begin Source File
SOURCE=.\JointEditDialog.cpp
# End Source File
# Begin Source File
SOURCE=.\JointPrefrence.cpp
# End Source File
# Begin Source File
SOURCE=.\LegMirrorPanel.cpp
# End Source File
# Begin Source File
SOURCE=.\LightExport.cpp
# End Source File
# Begin Source File
SOURCE=.\MapSizeDlg.cpp
# End Source File
# Begin Source File
SOURCE=.\Mirror.cpp
# End Source File
# Begin Source File
SOURCE=.\MissionImp.cpp
# End Source File
# Begin Source File
SOURCE=.\MLRExport.cpp
# End Source File
# Begin Source File
SOURCE=.\OptimizeKeyframe.cpp
# End Source File
# Begin Source File
SOURCE=.\Replicate.cpp
# End Source File
# Begin Source File
SOURCE=.\Reverse.cpp
# End Source File
# Begin Source File
SOURCE=.\SiteObject.cpp
# End Source File
# Begin Source File
SOURCE=.\SkeletonVerify.cpp
# End Source File
# Begin Source File
SOURCE=.\StdAfx.cpp
# ADD CPP /Yc"stdafx.h"
# End Source File
# Begin Source File
SOURCE=.\ThresholdDialog.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\About.h
# End Source File
# Begin Source File
SOURCE=.\AnimationExport.h
# End Source File
# Begin Source File
SOURCE=.\AnimationSuite.h
# End Source File
# Begin Source File
SOURCE=.\ArmatureExport.h
# End Source File
# Begin Source File
SOURCE=.\BaseGeoExport.h
# End Source File
# Begin Source File
SOURCE=.\BatchExport.h
# End Source File
# Begin Source File
SOURCE=.\CvExport.h
# End Source File
# Begin Source File
SOURCE=.\cvobject.h
# End Source File
# Begin Source File
SOURCE=.\cvtool.hpp
# End Source File
# Begin Source File
SOURCE=.\DlgSelectMegatextures.h
# End Source File
# Begin Source File
SOURCE=.\EBFExport.h
# End Source File
# Begin Source File
SOURCE=.\EditBatch.h
# End Source File
# Begin Source File
SOURCE=.\ErfExport.h
# End Source File
# Begin Source File
SOURCE=.\ErfImport.h
# End Source File
# Begin Source File
SOURCE=.\ErrorDlg.h
# End Source File
# Begin Source File
SOURCE=.\ExportUtil.h
# End Source File
# Begin Source File
SOURCE=.\FallTool.hpp
# End Source File
# Begin Source File
SOURCE=.\GeoExport.h
# End Source File
# Begin Source File
SOURCE=.\HillAdjust.hpp
# End Source File
# Begin Source File
SOURCE=.\JointEditDialog.h
# End Source File
# Begin Source File
SOURCE=.\JointPrefrence.h
# End Source File
# Begin Source File
SOURCE=.\LegMirrorPanel.h
# End Source File
# Begin Source File
SOURCE=.\LightExport.h
# End Source File
# Begin Source File
SOURCE=.\MapSizeDlg.h
# End Source File
# Begin Source File
SOURCE=.\MissionImp.h
# End Source File
# Begin Source File
SOURCE=.\MLRExport.h
# End Source File
# Begin Source File
SOURCE=.\OptimizeKeyframe.h
# End Source File
# Begin Source File
SOURCE=.\Replicate.h
# End Source File
# Begin Source File
SOURCE=.\Resource.h
# End Source File
# Begin Source File
SOURCE=.\SiteObject.h
# End Source File
# Begin Source File
SOURCE=.\SkeletonVerify.hpp
# End Source File
# Begin Source File
SOURCE=.\StdAfx.h
# End Source File
# Begin Source File
SOURCE=.\ThresholdDialog.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
# Begin Source File
SOURCE=.\Res\building.damage
# End Source File
# Begin Source File
SOURCE=.\Res\building.data
# End Source File
# Begin Source File
SOURCE=.\Res\building.instance
# End Source File
# Begin Source File
SOURCE=.\Res\building.subsystems
# End Source File
# Begin Source File
SOURCE=.\Res\building.torso
# End Source File
# Begin Source File
SOURCE=.\Res\mech.damage
# End Source File
# Begin Source File
SOURCE=.\Res\mech.data
# End Source File
# Begin Source File
SOURCE=.\Res\mech.instance
# End Source File
# Begin Source File
SOURCE=.\Res\mech.subsystems
# End Source File
# Begin Source File
SOURCE=.\Res\turret.damage
# End Source File
# Begin Source File
SOURCE=.\Res\vehicle.damage
# End Source File
# Begin Source File
SOURCE=.\Res\vehicle.data
# End Source File
# Begin Source File
SOURCE=.\Res\vehicle.instance
# End Source File
# Begin Source File
SOURCE=.\Res\vehicle.subsystems
# End Source File
# Begin Source File
SOURCE=.\Res\vehicle.torso
# End Source File
# End Group
# End Target
# End Project
@@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "AnimationSuite"=.\AnimationSuite.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################
@@ -0,0 +1,486 @@
// PlugTest.h : main header file for the PLUGTEST DLL
//
#if !defined(AFX_ANIMATIONSUITE_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_)
#define AFX_ANIMATIONSUITE_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#include "Stuff\Stuff.hpp"
#include <MW4\MW4AnimationSystem.hpp>
#include <afxmt.h>
#undef Min
#undef Max
#pragma pack(push,8)
#include "Max.h"
#pragma pack(pop)
#include "resource.h"
#pragma pack(push,8)
#include "UTILEXP.H"
//include "MAXTYPES.h"
//include "bmmlib.h" // Bitmap lib
#include "utilapi.h" // Utility Plugins lib
#include "istdplug.h"
#include "stdmat.h"
#include "shape.h"
#include "interpik.h"
#include "decomp.h"
#include "keyreduc.h"
#include "simpobj.h"
#pragma pack(pop)
#include "JointEditDialog.h"
#include "ThresholdDialog.h"
#include "About.h"
#include <GameOS\GameOS.hpp>
#define ANIMEXPORT_CLASS_ID Class_ID(0x5b132f04, 0x1f117e3b)
#define JOINTPREFS_CLASS_ID Class_ID(0x3215ab2, 0x1d7577f9)
#define OPTIMIZE_CLASS_ID Class_ID(0x34cb1359, 0x614a5ed6)
#define REPLICATE_CLASS_ID Class_ID(0x39335814, 0x311f59a6)
#define SITEOBJECT_CLASS_ID Class_ID(0xc3168894, 0x72508fd9)
#define LEGMIRROR_CLASS_ID Class_ID(0x3ce33955, 0x158b2c7a)
#define HILLADJUST_CLASS_ID Class_ID(0x4a043633, 0x157f5f04)
#define ERFEXPORT_CLASS_ID Class_ID(0x74085d30, 0x227d1efa)
#define MLREXPORT_CLASS_ID Class_ID(0x24c704a3, 0x68e41817)
#define EBFEXPORT_CLASS_ID Class_ID(0x24186b99, 0x1af34c02)
#define ARMATUREEXPORT_CLASS_ID Class_ID(0x438e49ad, 0x6efa1a44)
#define BATCHEXPORT_CLASS_ID Class_ID(0x68653fb, 0x20e4831)
#define FALLTOOL_CLASS_ID Class_ID(0x610a6d23,0x7396680)
#define SKELETONVERIFY_CLASS_ID Class_ID(0x610a6d33,0x7396690)
#define CVOBJECT_CLASS_ID Class_ID(0xc3168894, 0x72508fe9)
#define CVEXPORT_CLASS_ID Class_ID(0x35281962, 0x31f15c3c)
#define CVTOOL_CLASS_ID Class_ID(0x64a91170, 0x69153f)
#define LIGHTEXPORT_CLASS_ID Class_ID(0x64a91170, 0x79153f)
#define ERFIMPORT_CLASS_ID Class_ID(0x64a91170, 0x89153f)
#define MISSIONIMPORT_CLASS_ID Class_ID(0xfb837bef, 0xdd35a6c8)
#define WM_QUICKFILE_BEGIN (WM_USER+1000)
#define WM_QUICKFILE_APPLYFILE (WM_USER+1001)
#define WM_QUICKFILE_END (WM_USER+1002)
/////////////////////////////////////////////////////////////////////////////
// CAnimExpApp
// See PlugTest.cpp for the implementation of this class
//
class CAnimExpApp;
class AnimExp;
class ErfExp;
class MLRExp;
class ArmatureExp;
class BatchExp;
class CvExp;
class LightExp;
class ErfImp;
class MissionImp;
class JointPreferencePanel;
class OptimizeKeyframePanel;
class ReplicatePanel;
class LegMirrorPanel;
class HillAdjustPanel;
class FallToolPanel;
class SkeletonVerifyPanel;
class CvToolPanel;
class AnimExpClassDesc;
class ArmatureExpClassDesc;
class ErfExpClassDesc;
class MLRExpClassDesc;
class EBFExpClassDesc;
class BatchExpClassDesc;
class JointPreferenceClassDesc;
class OptimizeKeyframeClassDesc;
class ReplicateClassDesc;
class SiteObjectClassDesc;
class LegMirrorClassDesc;
class HillAdjustClassDesc;
class FallToolClassDesc;
class SkeletonVerifyClassDesc;
class CvObjectClassDesc;
class CvExpClassDesc;
class CvToolClassDesc;
class LightExpClassDesc;
class ErfImpClassDesc;
class MissionImpClassDesc;
extern ClassDesc* GetAnimExpDesc();
extern TCHAR *GetString(int id);
extern CAnimExpApp theApp;
extern HINSTANCE hInstance;
extern AnimExpClassDesc animExpDesc;
extern ErfExpClassDesc erfExpDesc;
extern MLRExpClassDesc MLRExpDesc;
extern EBFExpClassDesc EBFExpDesc;
extern BatchExpClassDesc batchExpDesc;
extern ArmatureExpClassDesc armatureExpDesc;
extern JointPreferenceClassDesc jointPreferenceDesc;
extern OptimizeKeyframeClassDesc optimizeKeyframeDesc;
extern ReplicateClassDesc replicateExpDesc;
extern SiteObjectClassDesc siteObjectClassDesc;
extern LegMirrorClassDesc legmirrorDesc;
extern HillAdjustClassDesc hillAdjustDesc;
extern FallToolClassDesc fallToolDesc;
extern SkeletonVerifyClassDesc skeletonVerifyDesc;
extern CvObjectClassDesc cvObjectClassDesc;
extern CvExpClassDesc cvExpDesc;
extern CvToolClassDesc cvToolDesc;
extern LightExpClassDesc lightExpDesc;
extern ErfImpClassDesc erfImpDesc;
extern MissionImpClassDesc missionImpDesc;
extern JointPreferencePanel g_jointPreferencePanel;
extern OptimizeKeyframePanel g_optimizeKeyframePanel;
extern ReplicatePanel g_replicatePanel;
extern LegMirrorPanel g_legmirrorPanel;
extern HillAdjustPanel g_hillAdjustPanel;
extern FallToolPanel g_fallToolPanel;
extern SkeletonVerifyPanel g_skeletonVerifyPanel;
extern CvToolPanel g_cvToolPanel;
void TurnOnExceptions();
void TurnOffExceptions();
DWORD WINAPI fn(LPVOID arg);
HWND EnableQuickFile(Interface *,HWND);
void DisableQuickFile(Interface * ip,HWND hWnd);
// Attempts to delete keys that lie within the given time range.
// The controller will be sampled within the range in 'step' size
// increments. After the key reduction, the controller's values
// at each step are gauranteed to be withen 'threshold' distance
// from their original values.
// Copied from keyreduc.h and keyreduc.cpp
int ApplyKeyReduction_MW4(
Control *cont,Interval range,float thresh,TimeValue step,
KeyReduceStatus *status);
/////////////////////////////////////////////////////////////////////////////
class CAnimExpApp : public CWinApp
{
public:
CAnimExpApp();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAnimExpApp)
public:
virtual BOOL InitInstance();
virtual int ExitInstance();
//}}AFX_VIRTUAL
//{{AFX_MSG(CAnimExpApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
class AnimExpClassDesc : public ClassDesc {
public:
int IsPublic () {return 1;}
void* Create(BOOL loading = FALSE);
const TCHAR* ClassName() { return GetString(IDS_ANIMEXP_NAME); }
SClass_ID SuperClassID() { return SCENE_EXPORT_CLASS_ID; }
Class_ID ClassID() { return ANIMEXPORT_CLASS_ID; }
const TCHAR* Category() { return GetString(IDS_CATEGORY); }
};
//-------------------------------------------------------------------------
class ErfExpClassDesc : public ClassDesc {
public:
int IsPublic () {return 1;}
void* Create(BOOL loading = FALSE);
const TCHAR* ClassName() { return GetString(IDS_ERFEXP_NAME); }
SClass_ID SuperClassID() { return SCENE_EXPORT_CLASS_ID; }
Class_ID ClassID() { return ERFEXPORT_CLASS_ID; }
const TCHAR* Category() { return GetString(IDS_CATEGORY); }
};
//-------------------------------------------------------------------------
class MLRExpClassDesc : public ClassDesc {
public:
int IsPublic () {return 1;}
void* Create(BOOL loading = FALSE);
const TCHAR* ClassName() { return GetString(IDS_MLREXP_NAME); }
SClass_ID SuperClassID() { return SCENE_EXPORT_CLASS_ID; }
Class_ID ClassID() { return MLREXPORT_CLASS_ID; }
const TCHAR* Category() { return GetString(IDS_CATEGORY); }
};
//-------------------------------------------------------------------------
class EBFExpClassDesc : public ClassDesc {
public:
int IsPublic () {return 1;}
void* Create(BOOL loading = FALSE);
const TCHAR* ClassName() { return GetString(IDS_EBFEXP_NAME); }
SClass_ID SuperClassID() { return SCENE_EXPORT_CLASS_ID; }
Class_ID ClassID() { return EBFEXPORT_CLASS_ID; }
const TCHAR* Category() { return GetString(IDS_CATEGORY); }
};
//-------------------------------------------------------------------------
class ArmatureExpClassDesc : public ClassDesc {
public:
int IsPublic () {return 1;}
void* Create(BOOL loading = FALSE);
const TCHAR* ClassName() { return GetString(IDS_ARMATUREEXP_NAME); }
SClass_ID SuperClassID() { return SCENE_EXPORT_CLASS_ID; }
Class_ID ClassID() { return ARMATUREEXPORT_CLASS_ID; }
const TCHAR* Category() { return GetString(IDS_CATEGORY); }
};
//-------------------------------------------------------------------------
class BatchExpClassDesc : public ClassDesc {
public:
int IsPublic () {return 1;}
void* Create(BOOL loading = FALSE);
const TCHAR* ClassName() { return GetString(IDS_BATCHEXP_NAME); }
SClass_ID SuperClassID() { return SCENE_EXPORT_CLASS_ID; }
Class_ID ClassID() { return BATCHEXPORT_CLASS_ID; }
const TCHAR* Category() { return GetString(IDS_CATEGORY); }
};
//-------------------------------------------------------------------------
class JointPreferenceClassDesc : public ClassDesc
{
public:
int IsPublic () {return 1;}
void* Create (BOOL loading = FALSE) {return &g_jointPreferencePanel;}
const TCHAR* ClassName () {return GetString(IDS_JOINTPREF_NAME);}
SClass_ID SuperClassID () {return UTILITY_CLASS_ID;}
Class_ID ClassID () {return JOINTPREFS_CLASS_ID;}
const TCHAR* Category () {return GetString(IDS_CATEGORY);}
};
//-------------------------------------------------------------------------
class OptimizeKeyframeClassDesc : public ClassDesc
{
public:
int IsPublic () {return 1;}
void* Create (BOOL loading = FALSE) {return &g_optimizeKeyframePanel;}
const TCHAR* ClassName () {return GetString(IDS_OPTIMIZEKEY_NAME);}
SClass_ID SuperClassID () {return UTILITY_CLASS_ID;}
Class_ID ClassID () {return OPTIMIZE_CLASS_ID;}
const TCHAR* Category () {return GetString(IDS_CATEGORY);}
};
//-------------------------------------------------------------------------
class ReplicateClassDesc : public ClassDesc
{
public:
int IsPublic () {return 1;}
void* Create (BOOL loading = FALSE) {return &g_replicatePanel;}
const TCHAR* ClassName () {return GetString(IDS_REPLICATE_NAME);}
SClass_ID SuperClassID () {return UTILITY_CLASS_ID;}
Class_ID ClassID () {return REPLICATE_CLASS_ID;}
const TCHAR* Category () {return GetString(IDS_CATEGORY);}
};
//-------------------------------------------------------------------------
class SiteObjectClassDesc : public ClassDesc {
public:
int IsPublic() {return 1;}
void * Create(BOOL loading = FALSE);
const TCHAR * ClassName() {return GetString(IDS_SITEOBJECT_NAME);}
SClass_ID SuperClassID() {return HELPER_CLASS_ID;}
Class_ID ClassID() {return SITEOBJECT_CLASS_ID;}
const TCHAR* Category() {return GetString(IDS_CATEGORY);}
void ResetClassParams (BOOL f_reset) {};
};
/////////////////////////////////////////////////////////////////////////////
//-------------------------------------------------------------------------
class LegMirrorClassDesc : public ClassDesc
{
public:
int IsPublic () {return 1;}
void* Create (BOOL loading = FALSE) {return &g_legmirrorPanel;}
const TCHAR* ClassName () {return GetString(IDS_LEGMIRROR_NAME);}
SClass_ID SuperClassID () {return UTILITY_CLASS_ID;}
Class_ID ClassID () {return LEGMIRROR_CLASS_ID;}
const TCHAR* Category () {return GetString(IDS_CATEGORY);}
};
/////////////////////////////////////////////////////////////////////////////
//-------------------------------------------------------------------------
class HillAdjustClassDesc : public ClassDesc
{
public:
int IsPublic () {return 1;}
void* Create (BOOL loading = FALSE) {return &g_hillAdjustPanel;}
const TCHAR* ClassName () {return GetString(IDS_HILLADJUST_NAME);}
SClass_ID SuperClassID () {return UTILITY_CLASS_ID;}
Class_ID ClassID () {return HILLADJUST_CLASS_ID;}
const TCHAR* Category () {return GetString(IDS_CATEGORY);}
};
/////////////////////////////////////////////////////////////////////////////
//-------------------------------------------------------------------------
class FallToolClassDesc : public ClassDesc
{
public:
int IsPublic () {return 1;}
void* Create (BOOL loading = FALSE) {return &g_fallToolPanel;}
const TCHAR* ClassName () {return GetString(IDS_FALLTOOL_NAME);}
SClass_ID SuperClassID () {return UTILITY_CLASS_ID;}
Class_ID ClassID () {return FALLTOOL_CLASS_ID;}
const TCHAR* Category () {return GetString(IDS_CATEGORY);}
};
/////////////////////////////////////////////////////////////////////////////
//-------------------------------------------------------------------------
class SkeletonVerifyClassDesc : public ClassDesc
{
public:
int IsPublic () {return 1;}
void* Create (BOOL loading = FALSE) {return &g_skeletonVerifyPanel;}
const TCHAR* ClassName () {return GetString(IDS_SKELETONVERIFY_NAME);}
SClass_ID SuperClassID () {return UTILITY_CLASS_ID;}
Class_ID ClassID () {return SKELETONVERIFY_CLASS_ID;}
const TCHAR* Category () {return GetString(IDS_CATEGORY);}
};
//-------------------------------------------------------------------------
class CvObjectClassDesc : public ClassDesc {
public:
int IsPublic() {return 1;}
void * Create(BOOL loading = FALSE);
const TCHAR * ClassName() {return GetString(IDS_CVOBJECT_NAME);}
SClass_ID SuperClassID() {return HELPER_CLASS_ID;}
Class_ID ClassID() {return CVOBJECT_CLASS_ID;}
const TCHAR* Category() {return GetString(IDS_CATEGORY);}
void ResetClassParams (BOOL f_reset) {};
};
//-------------------------------------------------------------------------
class CvExpClassDesc : public ClassDesc {
public:
int IsPublic () {return 1;}
void* Create(BOOL loading = FALSE);
const TCHAR* ClassName() { return GetString(IDS_CVEXP_NAME); }
SClass_ID SuperClassID() { return SCENE_EXPORT_CLASS_ID; }
Class_ID ClassID() { return CVEXPORT_CLASS_ID; }
const TCHAR* Category() { return GetString(IDS_CATEGORY); }
};
/////////////////////////////////////////////////////////////////////////////
//-------------------------------------------------------------------------
class CvToolClassDesc : public ClassDesc
{
public:
int IsPublic () {return 1;}
void* Create (BOOL loading = FALSE) {return &g_cvToolPanel;}
const TCHAR* ClassName () {return GetString(IDS_CVTOOL_NAME);}
SClass_ID SuperClassID () {return UTILITY_CLASS_ID;}
Class_ID ClassID () {return CVTOOL_CLASS_ID;}
const TCHAR* Category () {return GetString(IDS_CATEGORY);}
};
//-------------------------------------------------------------------------
class LightExpClassDesc : public ClassDesc {
public:
int IsPublic () {return 1;}
void* Create(BOOL loading = FALSE);
const TCHAR* ClassName() { return GetString(IDS_LIGHTEXP_NAME); }
SClass_ID SuperClassID() { return SCENE_EXPORT_CLASS_ID; }
Class_ID ClassID() { return LIGHTEXPORT_CLASS_ID; }
const TCHAR* Category() { return GetString(IDS_CATEGORY); }
};
//-------------------------------------------------------------------------
class ErfImpClassDesc : public ClassDesc {
public:
int IsPublic () {return 1;}
void* Create(BOOL loading = FALSE);
const TCHAR* ClassName() { return GetString(IDS_ERFIMP_NAME); }
SClass_ID SuperClassID() { return SCENE_IMPORT_CLASS_ID; }
Class_ID ClassID() { return ERFIMPORT_CLASS_ID; }
const TCHAR* Category() { return GetString(IDS_CATEGORY); }
};
//-------------------------------------------------------------------------
class MissionImpClassDesc : public ClassDesc {
public:
int IsPublic () {return 1;}
void* Create(BOOL loading = FALSE);
const TCHAR* ClassName() { return GetString(IDS_MISSIONIMP_NAME); }
SClass_ID SuperClassID() { return SCENE_IMPORT_CLASS_ID; }
Class_ID ClassID() { return MISSIONIMPORT_CLASS_ID; }
const TCHAR* Category() { return GetString(IDS_CATEGORY); }
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_ANIMATIONSUITE_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_)
@@ -0,0 +1,550 @@
<html>
<body>
<pre>
<h1>Build Log</h1>
<h3>
--------------------Configuration: AnimationSuite - Win32 Profile--------------------
</h3>
<h3>Command Lines</h3>
Creating command line "rc.exe /l 0x409 /fo"Profile/AnimationSuite.res" /d "NDEBUG" /d "_AFXDLL" "E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\AnimationSuite.rc""
Creating temporary file "C:\DOCUME~1\MLOWRA~1.VWE\LOCALS~1\Temp\RSP6AF.tmp" with contents
[
/nologo /G6 /Zp4 /MD /W3 /GR /Zi /Ox /Ot /Oa /Og /Oi /Gy /I "..\..\..\Libraries\3dsmax2\Include" /I "..\..\..\Libraries" /I "..\..\..\Code\Mw4" /I "..\..\..\Code" /I "..\..\..\..\CoreTech\Libraries" /I "..\..\..\Libraries\stlport" /D "_AFX_NO_DB_SUPPORT" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "MULTI_PLAYER" /D "USE_PROTOTYPES" /D "STRICT" /D TEST_CLASS=50 /D "_WINDLL" /D "_AFXDLL" /D "LAB_ONLY" /Fp"Profile/AnimationSuite.pch" /Yu"stdafx.h" /Fo"Profile/" /Fd"Profile/" /FD /GF /c
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\About.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\AnimationExport.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\AnimationSuite.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\ArmatureExport.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\BaseGeoExport.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\BatchExport.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\CvExport.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\cvobject.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\cvtool.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\DlgSelectMegatextures.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\EBFExport.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\EditBatch.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\ErfExport.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\ErfImport.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\ErrorDlg.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\ExportUtil.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\FallTool.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\GeoExport.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\HillAdjust.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\JointEditDialog.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\JointPrefrence.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\LegMirrorPanel.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\LightExport.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\MapSizeDlg.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\Mirror.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\MissionImp.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\MLRExport.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\OptimizeKeyframe.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\Replicate.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\Reverse.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\SiteObject.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\SkeletonVerify.cpp"
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\ThresholdDialog.cpp"
]
Creating command line "cl.exe @C:\DOCUME~1\MLOWRA~1.VWE\LOCALS~1\Temp\RSP6AF.tmp"
Creating temporary file "C:\DOCUME~1\MLOWRA~1.VWE\LOCALS~1\Temp\RSP6B0.tmp" with contents
[
/nologo /G6 /Zp4 /MD /W3 /GR /Zi /Ox /Ot /Oa /Og /Oi /Gy /I "..\..\..\Libraries\3dsmax2\Include" /I "..\..\..\Libraries" /I "..\..\..\Code\Mw4" /I "..\..\..\Code" /I "..\..\..\..\CoreTech\Libraries" /I "..\..\..\Libraries\stlport" /D "_AFX_NO_DB_SUPPORT" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "MULTI_PLAYER" /D "USE_PROTOTYPES" /D "STRICT" /D TEST_CLASS=50 /D "_WINDLL" /D "_AFXDLL" /D "LAB_ONLY" /Fp"Profile/AnimationSuite.pch" /Yc"stdafx.h" /Fo"Profile/" /Fd"Profile/" /FD /GF /c
"E:\GameleapCode5_03\mw4\Tools\3DSPlugins\AnimationSuite\StdAfx.cpp"
]
Creating command line "cl.exe @C:\DOCUME~1\MLOWRA~1.VWE\LOCALS~1\Temp\RSP6B0.tmp"
Creating temporary file "C:\DOCUME~1\MLOWRA~1.VWE\LOCALS~1\Temp\RSP6B1.tmp" with contents
[
Core.lib Geom.lib Gfx.Lib Mesh.lib Util.lib winmm.lib expr.lib bmm.lib /nologo /subsystem:windows /dll /incremental:yes /pdb:"Profile/AnimationSuite.pdb" /machine:I386 /def:".\AnimationSuite.def" /out:"..\..\..\Binaries\3DSPlug-ins\Profile\AnimationSuite.dle" /implib:"Profile/AnimationSuite.lib" /libpath:"..\..\..\Libraries\3dsMax2\Rellib"
.\Profile\About.obj
.\Profile\AnimationExport.obj
.\Profile\AnimationSuite.obj
.\Profile\ArmatureExport.obj
.\Profile\BaseGeoExport.obj
.\Profile\BatchExport.obj
.\Profile\CvExport.obj
.\Profile\cvobject.obj
.\Profile\cvtool.obj
.\Profile\DlgSelectMegatextures.obj
.\Profile\EBFExport.obj
.\Profile\EditBatch.obj
.\Profile\ErfExport.obj
.\Profile\ErfImport.obj
.\Profile\ErrorDlg.obj
.\Profile\ExportUtil.obj
.\Profile\FallTool.obj
.\Profile\GeoExport.obj
.\Profile\HillAdjust.obj
.\Profile\JointEditDialog.obj
.\Profile\JointPrefrence.obj
.\Profile\LegMirrorPanel.obj
.\Profile\LightExport.obj
.\Profile\MapSizeDlg.obj
.\Profile\Mirror.obj
.\Profile\MissionImp.obj
.\Profile\MLRExport.obj
.\Profile\OptimizeKeyframe.obj
.\Profile\Replicate.obj
.\Profile\Reverse.obj
.\Profile\SiteObject.obj
.\Profile\SkeletonVerify.obj
.\Profile\StdAfx.obj
.\Profile\ThresholdDialog.obj
.\Profile\AnimationSuite.res
]
Creating command line "link.exe @C:\DOCUME~1\MLOWRA~1.VWE\LOCALS~1\Temp\RSP6B1.tmp"
<h3>Output Window</h3>
Compiling resources...
Compiling...
StdAfx.cpp
Compiling...
About.cpp
AnimationExport.cpp
AnimationSuite.cpp
ArmatureExport.cpp
BaseGeoExport.cpp
BatchExport.cpp
CvExport.cpp
cvobject.cpp
cvtool.cpp
DlgSelectMegatextures.cpp
..\..\..\Libraries\3dsmax2\Include\Max.h(14) : warning C4005: 'STRICT' : macro redefinition
unknown(0) : see previous definition of 'STRICT'
EBFExport.cpp
EditBatch.cpp
ErfExport.cpp
ErfImport.cpp
ErrorDlg.cpp
..\..\..\Libraries\3dsmax2\Include\Max.h(14) : warning C4005: 'STRICT' : macro redefinition
unknown(0) : see previous definition of 'STRICT'
ExportUtil.cpp
FallTool.cpp
GeoExport.cpp
HillAdjust.cpp
JointEditDialog.cpp
Generating Code...
Compiling...
JointPrefrence.cpp
LegMirrorPanel.cpp
LightExport.cpp
MapSizeDlg.cpp
..\..\..\Libraries\3dsmax2\Include\Max.h(14) : warning C4005: 'STRICT' : macro redefinition
unknown(0) : see previous definition of 'STRICT'
Mirror.cpp
MissionImp.cpp
MLRExport.cpp
OptimizeKeyframe.cpp
Replicate.cpp
Reverse.cpp
SiteObject.cpp
SkeletonVerify.cpp
ThresholdDialog.cpp
Generating Code...
Linking...
Creating library Profile/AnimationSuite.lib and object Profile/AnimationSuite.exp
MissionImp.obj : error LNK2001: unresolved external symbol "long __stdcall ProcessException(struct _EXCEPTION_POINTERS *)" (?ProcessException@@YGJPAU_EXCEPTION_POINTERS@@@Z)
MLRExport.obj : error LNK2001: unresolved external symbol "long __stdcall ProcessException(struct _EXCEPTION_POINTERS *)" (?ProcessException@@YGJPAU_EXCEPTION_POINTERS@@@Z)
EBFExport.obj : error LNK2001: unresolved external symbol "long __stdcall ProcessException(struct _EXCEPTION_POINTERS *)" (?ProcessException@@YGJPAU_EXCEPTION_POINTERS@@@Z)
ErfExport.obj : error LNK2001: unresolved external symbol "long __stdcall ProcessException(struct _EXCEPTION_POINTERS *)" (?ProcessException@@YGJPAU_EXCEPTION_POINTERS@@@Z)
ErfImport.obj : error LNK2001: unresolved external symbol "long __stdcall ProcessException(struct _EXCEPTION_POINTERS *)" (?ProcessException@@YGJPAU_EXCEPTION_POINTERS@@@Z)
LightExport.obj : error LNK2001: unresolved external symbol "long __stdcall ProcessException(struct _EXCEPTION_POINTERS *)" (?ProcessException@@YGJPAU_EXCEPTION_POINTERS@@@Z)
AnimationExport.obj : error LNK2001: unresolved external symbol "long __stdcall ProcessException(struct _EXCEPTION_POINTERS *)" (?ProcessException@@YGJPAU_EXCEPTION_POINTERS@@@Z)
ArmatureExport.obj : error LNK2001: unresolved external symbol "long __stdcall ProcessException(struct _EXCEPTION_POINTERS *)" (?ProcessException@@YGJPAU_EXCEPTION_POINTERS@@@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "long __stdcall ProcessException(struct _EXCEPTION_POINTERS *)" (?ProcessException@@YGJPAU_EXCEPTION_POINTERS@@@Z)
CvExport.obj : error LNK2001: unresolved external symbol "long __stdcall ProcessException(struct _EXCEPTION_POINTERS *)" (?ProcessException@@YGJPAU_EXCEPTION_POINTERS@@@Z)
AnimationExport.obj : error LNK2001: unresolved external symbol "public: __thiscall MW4Animation::AnimData::~AnimData(void)" (??1AnimData@MW4Animation@@QAE@XZ)
AnimationExport.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall Stuff::MemoryStream::~MemoryStream(void)" (??1MemoryStream@Stuff@@UAE@XZ)
AnimationExport.obj : error LNK2001: unresolved external symbol "public: bool __thiscall MW4Animation::AnimData::Save(char const *)" (?Save@AnimData@MW4Animation@@QAE_NPBD@Z)
AnimationExport.obj : error LNK2001: unresolved external symbol "public: virtual class Stuff::MemoryStream & __thiscall Stuff::MemoryStream::WriteBytes(void const *,unsigned long)" (?WriteBytes@MemoryStream@Stuff@@UAEAAV12@PBXK@Z)
AnimationExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::MemoryStream::MemoryStream(void *,unsigned long,unsigned long)" (??0MemoryStream@Stuff@@QAE@PAXKK@Z)
AnimationExport.obj : error LNK2001: unresolved external symbol "public: class Stuff::MString & __thiscall Stuff::MString::StripExtension(void)" (?StripExtension@MString@Stuff@@QAEAAV12@XZ)
BatchExport.obj : error LNK2001: unresolved external symbol "public: class Stuff::MString & __thiscall Stuff::MString::StripExtension(void)" (?StripExtension@MString@Stuff@@QAEAAV12@XZ)
AnimationExport.obj : error LNK2001: unresolved external symbol "public: class Stuff::MString & __thiscall Stuff::MString::StripDirectory(void)" (?StripDirectory@MString@Stuff@@QAEAAV12@XZ)
BatchExport.obj : error LNK2001: unresolved external symbol "public: class Stuff::MString & __thiscall Stuff::MString::StripDirectory(void)" (?StripDirectory@MString@Stuff@@QAEAAV12@XZ)
ExportUtil.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::MString::MString(char const *)" (??0MString@Stuff@@QAE@PBD@Z)
MLRExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::MString::MString(char const *)" (??0MString@Stuff@@QAE@PBD@Z)
SkeletonVerify.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::MString::MString(char const *)" (??0MString@Stuff@@QAE@PBD@Z)
AnimationExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::MString::MString(char const *)" (??0MString@Stuff@@QAE@PBD@Z)
BaseGeoExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::MString::MString(char const *)" (??0MString@Stuff@@QAE@PBD@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::MString::MString(char const *)" (??0MString@Stuff@@QAE@PBD@Z)
EBFExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::MString::MString(char const *)" (??0MString@Stuff@@QAE@PBD@Z)
AnimationExport.obj : error LNK2001: unresolved external symbol "public: __thiscall MW4Animation::AnimData::AnimData(void)" (??0AnimData@MW4Animation@@QAE@XZ)
AnimationExport.obj : error LNK2001: unresolved external symbol "int __cdecl MW4Animation::CompressName(char const *,class Stuff::MString &)" (?CompressName@MW4Animation@@YAHPBDAAVMString@Stuff@@@Z)
AnimationExport.obj : error LNK2001: unresolved external symbol "public: static class Stuff::Vector3D const Stuff::Vector3D::Identity" (?Identity@Vector3D@Stuff@@2V12@B)
AnimationExport.obj : error LNK2001: unresolved external symbol "public: class Stuff::UnitQuaternion & __thiscall Stuff::UnitQuaternion::Normalize(void)" (?Normalize@UnitQuaternion@Stuff@@QAEAAV12@XZ)
AnimationExport.obj : error LNK2001: unresolved external symbol "public: class Stuff::Vector3D & __thiscall Stuff::Vector3D::operator=(class Stuff::UnitQuaternion const &)" (??4Vector3D@Stuff@@QAEAAV01@ABVUnitQuaternion@1@@Z)
AnimationExport.obj : error LNK2001: unresolved external symbol "public: class Stuff::UnitQuaternion & __thiscall Stuff::UnitQuaternion::Subtract(class Stuff::UnitQuaternion const &,class Stuff::UnitQuaternion const &)" (?Subtract@UnitQuaternion@Stuff@@QAEAAV12@ABV12@0@Z)
AnimationExport.obj : error LNK2001: unresolved external symbol "int __cdecl InternalFunctionStop(char const *,...)" (?InternalFunctionStop@@YAHPBDZZ)
AnimationSuite.obj : error LNK2001: unresolved external symbol "void __stdcall gos_MathExceptions(bool,bool)" (?gos_MathExceptions@@YGX_N0@Z)
AnimationSuite.obj : error LNK2001: unresolved external symbol "void __stdcall gos_PushCurrentHeap(struct gos_Heap *)" (?gos_PushCurrentHeap@@YGXPAUgos_Heap@@@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "void __stdcall gos_PushCurrentHeap(struct gos_Heap *)" (?gos_PushCurrentHeap@@YGXPAUgos_Heap@@@Z)
ErfImport.obj : error LNK2001: unresolved external symbol "void __stdcall gos_PushCurrentHeap(struct gos_Heap *)" (?gos_PushCurrentHeap@@YGXPAUgos_Heap@@@Z)
LightExport.obj : error LNK2001: unresolved external symbol "void __stdcall gos_PushCurrentHeap(struct gos_Heap *)" (?gos_PushCurrentHeap@@YGXPAUgos_Heap@@@Z)
AnimationSuite.obj : error LNK2001: unresolved external symbol "struct gos_Heap * __stdcall gos_CreateMemoryHeap(char *,unsigned long,struct gos_Heap *)" (?gos_CreateMemoryHeap@@YGPAUgos_Heap@@PADKPAU1@@Z)
AnimationSuite.obj : error LNK2001: unresolved external symbol "struct gos_Heap * ParentClientHeap" (?ParentClientHeap@@3PAUgos_Heap@@A)
AnimationSuite.obj : error LNK2001: unresolved external symbol "void __cdecl ElementProxies::InitializeClasses(void)" (?InitializeClasses@ElementProxies@@YAXXZ)
AnimationSuite.obj : error LNK2001: unresolved external symbol "void __cdecl ElementRenderer::InitializeClasses(class Stuff::NotationFile *)" (?InitializeClasses@ElementRenderer@@YAXPAVNotationFile@Stuff@@@Z)
AnimationSuite.obj : error LNK2001: unresolved external symbol "void __cdecl gosFX::InitializeClasses(class Stuff::NotationFile *)" (?InitializeClasses@gosFX@@YAXPAVNotationFile@Stuff@@@Z)
AnimationSuite.obj : error LNK2001: unresolved external symbol "void __cdecl MidLevelRenderer::InitializeClasses(class Stuff::NotationFile *,unsigned int,unsigned int,unsigned int,unsigned int,bool)" (?InitializeClasses@MidLevelRenderer@@YAXPAVNotationFile@Stuff@@IIII_N@Z)
AnimationSuite.obj : error LNK2001: unresolved external symbol "void __cdecl MAXProxies::InitializeClasses(void)" (?InitializeClasses@MAXProxies@@YAXXZ)
AnimationSuite.obj : error LNK2001: unresolved external symbol "void __cdecl Proxies::InitializeClasses(void)" (?InitializeClasses@Proxies@@YAXXZ)
AnimationSuite.obj : error LNK2001: unresolved external symbol "void __cdecl Stuff::InitializeClasses(unsigned int,unsigned int,unsigned int,unsigned int)" (?InitializeClasses@Stuff@@YAXIIII@Z)
AnimationSuite.obj : error LNK2001: unresolved external symbol "int Stuff::ArmorLevel" (?ArmorLevel@Stuff@@3HA)
AnimationSuite.obj : error LNK2001: unresolved external symbol "void __stdcall InitGameOS(struct HINSTANCE__ *,struct HWND__ *,char *)" (?InitGameOS@@YGXPAUHINSTANCE__@@PAUHWND__@@PAD@Z)
AnimationSuite.obj : error LNK2001: unresolved external symbol "struct HINSTANCE__ * hInstance" (?hInstance@@3PAUHINSTANCE__@@A)
BatchExport.obj : error LNK2001: unresolved external symbol "struct HINSTANCE__ * hInstance" (?hInstance@@3PAUHINSTANCE__@@A)
AnimationSuite.obj : error LNK2001: unresolved external symbol "void __stdcall ExitGameOS(void)" (?ExitGameOS@@YGXXZ)
AnimationSuite.obj : error LNK2001: unresolved external symbol "void __cdecl Stuff::TerminateClasses(void)" (?TerminateClasses@Stuff@@YAXXZ)
AnimationSuite.obj : error LNK2001: unresolved external symbol "void __cdecl Proxies::TerminateClasses(void)" (?TerminateClasses@Proxies@@YAXXZ)
AnimationSuite.obj : error LNK2001: unresolved external symbol "void __cdecl MAXProxies::TerminateClasses(void)" (?TerminateClasses@MAXProxies@@YAXXZ)
AnimationSuite.obj : error LNK2001: unresolved external symbol "void __cdecl ElementProxies::TerminateClasses(void)" (?TerminateClasses@ElementProxies@@YAXXZ)
AnimationSuite.obj : error LNK2001: unresolved external symbol "void __cdecl MidLevelRenderer::TerminateClasses(class Stuff::NotationFile *)" (?TerminateClasses@MidLevelRenderer@@YAXPAVNotationFile@Stuff@@@Z)
AnimationSuite.obj : error LNK2001: unresolved external symbol "void __cdecl gosFX::TerminateClasses(class Stuff::NotationFile *)" (?TerminateClasses@gosFX@@YAXPAVNotationFile@Stuff@@@Z)
AnimationSuite.obj : error LNK2001: unresolved external symbol "void __cdecl ElementRenderer::TerminateClasses(class Stuff::NotationFile *)" (?TerminateClasses@ElementRenderer@@YAXPAVNotationFile@Stuff@@@Z)
AnimationSuite.obj : error LNK2001: unresolved external symbol "void __stdcall gos_PopCurrentHeap(void)" (?gos_PopCurrentHeap@@YGXXZ)
BatchExport.obj : error LNK2001: unresolved external symbol "void __stdcall gos_PopCurrentHeap(void)" (?gos_PopCurrentHeap@@YGXXZ)
ErfImport.obj : error LNK2001: unresolved external symbol "void __stdcall gos_PopCurrentHeap(void)" (?gos_PopCurrentHeap@@YGXXZ)
LightExport.obj : error LNK2001: unresolved external symbol "void __stdcall gos_PopCurrentHeap(void)" (?gos_PopCurrentHeap@@YGXXZ)
AnimationSuite.obj : error LNK2001: unresolved external symbol "struct gosEnvironment Environment" (?Environment@@3UgosEnvironment@@A)
LightExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::NotationFile::~NotationFile(void)" (??1NotationFile@Stuff@@QAE@XZ)
MissionImp.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::NotationFile::~NotationFile(void)" (??1NotationFile@Stuff@@QAE@XZ)
MLRExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::NotationFile::~NotationFile(void)" (??1NotationFile@Stuff@@QAE@XZ)
SkeletonVerify.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::NotationFile::~NotationFile(void)" (??1NotationFile@Stuff@@QAE@XZ)
DlgSelectMegatextures.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::NotationFile::~NotationFile(void)" (??1NotationFile@Stuff@@QAE@XZ)
EBFExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::NotationFile::~NotationFile(void)" (??1NotationFile@Stuff@@QAE@XZ)
ExportUtil.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::NotationFile::~NotationFile(void)" (??1NotationFile@Stuff@@QAE@XZ)
GeoExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::NotationFile::~NotationFile(void)" (??1NotationFile@Stuff@@QAE@XZ)
ArmatureExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::NotationFile::~NotationFile(void)" (??1NotationFile@Stuff@@QAE@XZ)
BaseGeoExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::NotationFile::~NotationFile(void)" (??1NotationFile@Stuff@@QAE@XZ)
BatchExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::NotationFile::~NotationFile(void)" (??1NotationFile@Stuff@@QAE@XZ)
CvExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::NotationFile::~NotationFile(void)" (??1NotationFile@Stuff@@QAE@XZ)
ArmatureExport.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::NotationFile::SaveAs(char const *)" (?SaveAs@NotationFile@Stuff@@QAEXPBD@Z)
GeoExport.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::NotationFile::SaveAs(char const *)" (?SaveAs@NotationFile@Stuff@@QAEXPBD@Z)
LightExport.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::NotationFile::SaveAs(char const *)" (?SaveAs@NotationFile@Stuff@@QAEXPBD@Z)
ArmatureExport.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::Page::AppendEntry(char const *,char const *)" (?AppendEntry@Page@Stuff@@QAEXPBD0@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::Page::AppendEntry(char const *,char const *)" (?AppendEntry@Page@Stuff@@QAEXPBD0@Z)
EditBatch.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::Page::AppendEntry(char const *,char const *)" (?AppendEntry@Page@Stuff@@QAEXPBD0@Z)
GeoExport.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::Page::AppendEntry(char const *,char const *)" (?AppendEntry@Page@Stuff@@QAEXPBD0@Z)
ArmatureExport.obj : error LNK2001: unresolved external symbol "public: class Stuff::Page * __thiscall Stuff::NotationFile::SetPage(char const *)" (?SetPage@NotationFile@Stuff@@QAEPAVPage@2@PBD@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: class Stuff::Page * __thiscall Stuff::NotationFile::SetPage(char const *)" (?SetPage@NotationFile@Stuff@@QAEPAVPage@2@PBD@Z)
GeoExport.obj : error LNK2001: unresolved external symbol "public: class Stuff::Page * __thiscall Stuff::NotationFile::SetPage(char const *)" (?SetPage@NotationFile@Stuff@@QAEPAVPage@2@PBD@Z)
LightExport.obj : error LNK2001: unresolved external symbol "public: class Stuff::Page * __thiscall Stuff::NotationFile::SetPage(char const *)" (?SetPage@NotationFile@Stuff@@QAEPAVPage@2@PBD@Z)
LightExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::NotationFile::NotationFile(class Stuff::MemoryStream *)" (??0NotationFile@Stuff@@QAE@PAVMemoryStream@1@@Z)
ArmatureExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::NotationFile::NotationFile(class Stuff::MemoryStream *)" (??0NotationFile@Stuff@@QAE@PAVMemoryStream@1@@Z)
BaseGeoExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::NotationFile::NotationFile(class Stuff::MemoryStream *)" (??0NotationFile@Stuff@@QAE@PAVMemoryStream@1@@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::NotationFile::NotationFile(class Stuff::MemoryStream *)" (??0NotationFile@Stuff@@QAE@PAVMemoryStream@1@@Z)
GeoExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::NotationFile::NotationFile(class Stuff::MemoryStream *)" (??0NotationFile@Stuff@@QAE@PAVMemoryStream@1@@Z)
ArmatureExport.obj : error LNK2001: unresolved external symbol "public: class Stuff::Page * __thiscall Stuff::NotationFile::GetPage(char const *)" (?GetPage@NotationFile@Stuff@@QAEPAVPage@2@PBD@Z)
ArmatureExport.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::Page::SetEntry(char const *,char const *)" (?SetEntry@Page@Stuff@@QAEXPBD0@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::Page::SetEntry(char const *,char const *)" (?SetEntry@Page@Stuff@@QAEXPBD0@Z)
GeoExport.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::Page::SetEntry(char const *,char const *)" (?SetEntry@Page@Stuff@@QAEXPBD0@Z)
ArmatureExport.obj : error LNK2001: unresolved external symbol "bool __stdcall gos_CreateDirectory(char const *)" (?gos_CreateDirectory@@YG_NPBD@Z)
BaseGeoExport.obj : error LNK2001: unresolved external symbol "bool __stdcall gos_CreateDirectory(char const *)" (?gos_CreateDirectory@@YG_NPBD@Z)
EBFExport.obj : error LNK2001: unresolved external symbol "bool __stdcall gos_CreateDirectory(char const *)" (?gos_CreateDirectory@@YG_NPBD@Z)
MLRExport.obj : error LNK2001: unresolved external symbol "bool __stdcall gos_CreateDirectory(char const *)" (?gos_CreateDirectory@@YG_NPBD@Z)
ArmatureExport.obj : error LNK2001: unresolved external symbol "bool __cdecl Stuff::Close_Enough(class Stuff::AffineMatrix4D const &,class Stuff::AffineMatrix4D const &,float)" (?Close_Enough@Stuff@@YA_NABVAffineMatrix4D@1@0M@Z)
ArmatureExport.obj : error LNK2001: unresolved external symbol "float Stuff::SMALL" (?SMALL@Stuff@@3MA)
ArmatureExport.obj : error LNK2001: unresolved external symbol "public: class Stuff::AffineMatrix4D & __thiscall Stuff::AffineMatrix4D::BuildRotation(class Stuff::UnitQuaternion const &)" (?BuildRotation@AffineMatrix4D@Stuff@@QAEAAV12@ABVUnitQuaternion@2@@Z)
CvExport.obj : error LNK2001: unresolved external symbol "public: class Stuff::AffineMatrix4D & __thiscall Stuff::AffineMatrix4D::BuildRotation(class Stuff::UnitQuaternion const &)" (?BuildRotation@AffineMatrix4D@Stuff@@QAEAAV12@ABVUnitQuaternion@2@@Z)
ArmatureExport.obj : error LNK2001: unresolved external symbol "public: static class Stuff::LinearMatrix4D const Stuff::LinearMatrix4D::Identity" (?Identity@LinearMatrix4D@Stuff@@2V12@B)
EBFExport.obj : error LNK2001: unresolved external symbol "public: static class Stuff::LinearMatrix4D const Stuff::LinearMatrix4D::Identity" (?Identity@LinearMatrix4D@Stuff@@2V12@B)
ErfImport.obj : error LNK2001: unresolved external symbol "public: static class Stuff::LinearMatrix4D const Stuff::LinearMatrix4D::Identity" (?Identity@LinearMatrix4D@Stuff@@2V12@B)
ExportUtil.obj : error LNK2001: unresolved external symbol "public: static class Stuff::LinearMatrix4D const Stuff::LinearMatrix4D::Identity" (?Identity@LinearMatrix4D@Stuff@@2V12@B)
ArmatureExport.obj : error LNK2001: unresolved external symbol "class Stuff::UnitQuaternion __cdecl ConvertMaxToMW(class Quat &)" (?ConvertMaxToMW@@YA?AVUnitQuaternion@Stuff@@AAVQuat@@@Z)
CvExport.obj : error LNK2001: unresolved external symbol "class Stuff::UnitQuaternion __cdecl ConvertMaxToMW(class Quat &)" (?ConvertMaxToMW@@YA?AVUnitQuaternion@Stuff@@AAVQuat@@@Z)
ArmatureExport.obj : error LNK2001: unresolved external symbol "class Stuff::Point3D __cdecl ConvertMaxToMW(class Point3 &)" (?ConvertMaxToMW@@YA?AVPoint3D@Stuff@@AAVPoint3@@@Z)
CvExport.obj : error LNK2001: unresolved external symbol "class Stuff::Point3D __cdecl ConvertMaxToMW(class Point3 &)" (?ConvertMaxToMW@@YA?AVPoint3D@Stuff@@AAVPoint3@@@Z)
ArmatureExport.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::Page::AppendEntry(char const *,class Stuff::Vector3D const &)" (?AppendEntry@Page@Stuff@@QAEXPBDABVVector3D@2@@Z)
ArmatureExport.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::Page::AppendEntry(char const *,class Stuff::YawPitchRoll const &)" (?AppendEntry@Page@Stuff@@QAEXPBDABVYawPitchRoll@2@@Z)
ArmatureExport.obj : error LNK2001: unresolved external symbol "public: class Stuff::YawPitchRoll & __thiscall Stuff::YawPitchRoll::operator=(class Stuff::UnitQuaternion const &)" (??4YawPitchRoll@Stuff@@QAEAAV01@ABVUnitQuaternion@1@@Z)
ArmatureExport.obj : error LNK2001: unresolved external symbol "public: class Stuff::UnitQuaternion & __thiscall Stuff::UnitQuaternion::operator=(class Stuff::LinearMatrix4D const &)" (??4UnitQuaternion@Stuff@@QAEAAV01@ABVLinearMatrix4D@1@@Z)
BaseGeoExport.obj : error LNK2001: unresolved external symbol "bool g_bSaveTextureAsPng" (?g_bSaveTextureAsPng@@3_NA)
BatchExport.obj : error LNK2001: unresolved external symbol "bool g_bSaveTextureAsPng" (?g_bSaveTextureAsPng@@3_NA)
BaseGeoExport.obj : error LNK2001: unresolved external symbol "public: bool __thiscall Stuff::Page::GetEntry(char const *,bool *,bool)" (?GetEntry@Page@Stuff@@QAE_NPBDPA_N_N@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: bool __thiscall Stuff::Page::GetEntry(char const *,bool *,bool)" (?GetEntry@Page@Stuff@@QAE_NPBDPA_N_N@Z)
CvExport.obj : error LNK2001: unresolved external symbol "public: bool __thiscall Stuff::Page::GetEntry(char const *,bool *,bool)" (?GetEntry@Page@Stuff@@QAE_NPBDPA_N_N@Z)
ExportUtil.obj : error LNK2001: unresolved external symbol "public: bool __thiscall Stuff::Page::GetEntry(char const *,char const * *,bool)" (?GetEntry@Page@Stuff@@QAE_NPBDPAPBD_N@Z)
MissionImp.obj : error LNK2001: unresolved external symbol "public: bool __thiscall Stuff::Page::GetEntry(char const *,char const * *,bool)" (?GetEntry@Page@Stuff@@QAE_NPBDPAPBD_N@Z)
BaseGeoExport.obj : error LNK2001: unresolved external symbol "public: bool __thiscall Stuff::Page::GetEntry(char const *,char const * *,bool)" (?GetEntry@Page@Stuff@@QAE_NPBDPAPBD_N@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: bool __thiscall Stuff::Page::GetEntry(char const *,char const * *,bool)" (?GetEntry@Page@Stuff@@QAE_NPBDPAPBD_N@Z)
DlgSelectMegatextures.obj : error LNK2001: unresolved external symbol "public: bool __thiscall Stuff::Page::GetEntry(char const *,char const * *,bool)" (?GetEntry@Page@Stuff@@QAE_NPBDPAPBD_N@Z)
EditBatch.obj : error LNK2001: unresolved external symbol "public: bool __thiscall Stuff::Page::GetEntry(char const *,char const * *,bool)" (?GetEntry@Page@Stuff@@QAE_NPBDPAPBD_N@Z)
ExportUtil.obj : error LNK2001: unresolved external symbol "public: class Stuff::Page * __thiscall Stuff::NotationFile::FindPage(char const *)" (?FindPage@NotationFile@Stuff@@QAEPAVPage@2@PBD@Z)
MissionImp.obj : error LNK2001: unresolved external symbol "public: class Stuff::Page * __thiscall Stuff::NotationFile::FindPage(char const *)" (?FindPage@NotationFile@Stuff@@QAEPAVPage@2@PBD@Z)
BaseGeoExport.obj : error LNK2001: unresolved external symbol "public: class Stuff::Page * __thiscall Stuff::NotationFile::FindPage(char const *)" (?FindPage@NotationFile@Stuff@@QAEPAVPage@2@PBD@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: class Stuff::Page * __thiscall Stuff::NotationFile::FindPage(char const *)" (?FindPage@NotationFile@Stuff@@QAEPAVPage@2@PBD@Z)
CvExport.obj : error LNK2001: unresolved external symbol "public: class Stuff::Page * __thiscall Stuff::NotationFile::FindPage(char const *)" (?FindPage@NotationFile@Stuff@@QAEPAVPage@2@PBD@Z)
DlgSelectMegatextures.obj : error LNK2001: unresolved external symbol "public: class Stuff::Page * __thiscall Stuff::NotationFile::FindPage(char const *)" (?FindPage@NotationFile@Stuff@@QAEPAVPage@2@PBD@Z)
ExportUtil.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall Stuff::FileStream::~FileStream(void)" (??1FileStream@Stuff@@UAE@XZ)
MLRExport.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall Stuff::FileStream::~FileStream(void)" (??1FileStream@Stuff@@UAE@XZ)
BaseGeoExport.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall Stuff::FileStream::~FileStream(void)" (??1FileStream@Stuff@@UAE@XZ)
CvExport.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall Stuff::FileStream::~FileStream(void)" (??1FileStream@Stuff@@UAE@XZ)
EBFExport.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall Stuff::FileStream::~FileStream(void)" (??1FileStream@Stuff@@UAE@XZ)
ErfImport.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall Stuff::FileStream::~FileStream(void)" (??1FileStream@Stuff@@UAE@XZ)
BaseGeoExport.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall Stuff::FileStream::IsFileOpened(void)" (?IsFileOpened@FileStream@Stuff@@UAE_NXZ)
ExportUtil.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall Stuff::FileStream::IsFileOpened(void)" (?IsFileOpened@FileStream@Stuff@@UAE_NXZ)
BaseGeoExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::FileStream::FileStream(char const *,enum Stuff::FileStream::WriteStatus)" (??0FileStream@Stuff@@QAE@PBDW4WriteStatus@01@@Z)
CvExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::FileStream::FileStream(char const *,enum Stuff::FileStream::WriteStatus)" (??0FileStream@Stuff@@QAE@PBDW4WriteStatus@01@@Z)
EBFExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::FileStream::FileStream(char const *,enum Stuff::FileStream::WriteStatus)" (??0FileStream@Stuff@@QAE@PBDW4WriteStatus@01@@Z)
ExportUtil.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::FileStream::FileStream(char const *,enum Stuff::FileStream::WriteStatus)" (??0FileStream@Stuff@@QAE@PBDW4WriteStatus@01@@Z)
MLRExport.obj : error LNK2001: unresolved external symbol "bool __stdcall gos_DeleteFile(char const *)" (?gos_DeleteFile@@YG_NPBD@Z)
BaseGeoExport.obj : error LNK2001: unresolved external symbol "bool __stdcall gos_DeleteFile(char const *)" (?gos_DeleteFile@@YG_NPBD@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "bool __stdcall gos_DeleteFile(char const *)" (?gos_DeleteFile@@YG_NPBD@Z)
CvExport.obj : error LNK2001: unresolved external symbol "bool __stdcall gos_DeleteFile(char const *)" (?gos_DeleteFile@@YG_NPBD@Z)
EBFExport.obj : error LNK2001: unresolved external symbol "bool __stdcall gos_DeleteFile(char const *)" (?gos_DeleteFile@@YG_NPBD@Z)
GeoExport.obj : error LNK2001: unresolved external symbol "bool __stdcall gos_DoesFileExist(char const *)" (?gos_DoesFileExist@@YG_NPBD@Z)
MLRExport.obj : error LNK2001: unresolved external symbol "bool __stdcall gos_DoesFileExist(char const *)" (?gos_DoesFileExist@@YG_NPBD@Z)
SkeletonVerify.obj : error LNK2001: unresolved external symbol "bool __stdcall gos_DoesFileExist(char const *)" (?gos_DoesFileExist@@YG_NPBD@Z)
BaseGeoExport.obj : error LNK2001: unresolved external symbol "bool __stdcall gos_DoesFileExist(char const *)" (?gos_DoesFileExist@@YG_NPBD@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "bool __stdcall gos_DoesFileExist(char const *)" (?gos_DoesFileExist@@YG_NPBD@Z)
CvExport.obj : error LNK2001: unresolved external symbol "bool __stdcall gos_DoesFileExist(char const *)" (?gos_DoesFileExist@@YG_NPBD@Z)
EBFExport.obj : error LNK2001: unresolved external symbol "bool __stdcall gos_DoesFileExist(char const *)" (?gos_DoesFileExist@@YG_NPBD@Z)
BaseGeoExport.obj : error LNK2001: unresolved external symbol "public: __thiscall MAXProxies::FindMAXErrors::FindMAXErrors(class Stuff::NotationFile *,class Interface *,int,bool,void *)" (??0FindMAXErrors@MAXProxies@@QAE@PAVNotationFile@Stuff@@PAVInterface@@H_NPAX@Z)
SkeletonVerify.obj : error LNK2001: unresolved external symbol "public: __thiscall MAXProxies::FindMAXErrors::FindMAXErrors(class Stuff::NotationFile *,class Interface *,int,bool,void *)" (??0FindMAXErrors@MAXProxies@@QAE@PAVNotationFile@Stuff@@PAVInterface@@H_NPAX@Z)
SkeletonVerify.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::NotationFile::NotationFile(char const *,enum Stuff::NotationFile::Type,bool)" (??0NotationFile@Stuff@@QAE@PBDW4Type@01@_N@Z)
EBFExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::NotationFile::NotationFile(char const *,enum Stuff::NotationFile::Type,bool)" (??0NotationFile@Stuff@@QAE@PBDW4Type@01@_N@Z)
ExportUtil.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::NotationFile::NotationFile(char const *,enum Stuff::NotationFile::Type,bool)" (??0NotationFile@Stuff@@QAE@PBDW4Type@01@_N@Z)
MissionImp.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::NotationFile::NotationFile(char const *,enum Stuff::NotationFile::Type,bool)" (??0NotationFile@Stuff@@QAE@PBDW4Type@01@_N@Z)
MLRExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::NotationFile::NotationFile(char const *,enum Stuff::NotationFile::Type,bool)" (??0NotationFile@Stuff@@QAE@PBDW4Type@01@_N@Z)
BaseGeoExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::NotationFile::NotationFile(char const *,enum Stuff::NotationFile::Type,bool)" (??0NotationFile@Stuff@@QAE@PBDW4Type@01@_N@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::NotationFile::NotationFile(char const *,enum Stuff::NotationFile::Type,bool)" (??0NotationFile@Stuff@@QAE@PBDW4Type@01@_N@Z)
CvExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::NotationFile::NotationFile(char const *,enum Stuff::NotationFile::Type,bool)" (??0NotationFile@Stuff@@QAE@PBDW4Type@01@_N@Z)
DlgSelectMegatextures.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::NotationFile::NotationFile(char const *,enum Stuff::NotationFile::Type,bool)" (??0NotationFile@Stuff@@QAE@PBDW4Type@01@_N@Z)
SkeletonVerify.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::MString::MString(char const *,char const *)" (??0MString@Stuff@@QAE@PBD0@Z)
BaseGeoExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::MString::MString(char const *,char const *)" (??0MString@Stuff@@QAE@PBD0@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::MString::MString(char const *,char const *)" (??0MString@Stuff@@QAE@PBD0@Z)
EBFExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::MString::MString(char const *,char const *)" (??0MString@Stuff@@QAE@PBD0@Z)
MLRExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::MString::MString(char const *,char const *)" (??0MString@Stuff@@QAE@PBD0@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::Page::SetEntry(char const *,int)" (?SetEntry@Page@Stuff@@QAEXPBDH@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: class Stuff::MString & __thiscall Stuff::MString::operator=(char const *)" (??4MString@Stuff@@QAEAAV01@PBD@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: void __thiscall ElementProxies::MLRTexturePoolProxy::CloseLibrary(bool)" (?CloseLibrary@MLRTexturePoolProxy@ElementProxies@@QAEX_N@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: static class ElementProxies::MLRTexturePoolProxy * ElementProxies::MLRTexturePoolProxy::Instance" (?Instance@MLRTexturePoolProxy@ElementProxies@@2PAV12@A)
BatchExport.obj : error LNK2001: unresolved external symbol "public: bool __thiscall Stuff::Page::GetEntry(char const *,int *,bool)" (?GetEntry@Page@Stuff@@QAE_NPBDPAH_N@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "char * __stdcall gos_FindFilesNext(void)" (?gos_FindFilesNext@@YGPADXZ)
BatchExport.obj : error LNK2001: unresolved external symbol "char * __stdcall gos_FindFiles(char const *)" (?gos_FindFiles@@YGPADPBD@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: class Stuff::MString & __thiscall Stuff::MString::operator=(class Stuff::MString const &)" (??4MString@Stuff@@QAEAAV01@ABV01@@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::Chain::~Chain(void)" (??1Chain@Stuff@@QAE@XZ)
LightExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::Chain::~Chain(void)" (??1Chain@Stuff@@QAE@XZ)
BatchExport.obj : error LNK2001: unresolved external symbol "public: unsigned int __thiscall Stuff::Chain::GetSize(void)" (?GetSize@Chain@Stuff@@QAEIXZ)
MissionImp.obj : error LNK2001: unresolved external symbol "public: unsigned int __thiscall Stuff::Chain::GetSize(void)" (?GetSize@Chain@Stuff@@QAEIXZ)
BatchExport.obj : error LNK2001: unresolved external symbol "public: class Stuff::ChainOf<class Stuff::Note *> * __thiscall Stuff::Page::MakeNoteChain(char const *)" (?MakeNoteChain@Page@Stuff@@QAEPAV?$ChainOf@PAVNote@Stuff@@@2@PBD@Z)
SkeletonVerify.obj : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int,struct gos_Heap *)" (??2@YAPAXIPAUgos_Heap@@@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int,struct gos_Heap *)" (??2@YAPAXIPAUgos_Heap@@@Z)
CvExport.obj : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int,struct gos_Heap *)" (??2@YAPAXIPAUgos_Heap@@@Z)
DlgSelectMegatextures.obj : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int,struct gos_Heap *)" (??2@YAPAXIPAUgos_Heap@@@Z)
MissionImp.obj : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int,struct gos_Heap *)" (??2@YAPAXIPAUgos_Heap@@@Z)
SkeletonVerify.obj : error LNK2001: unresolved external symbol "struct gos_Heap * Stuff::g_Heap" (?g_Heap@Stuff@@3PAUgos_Heap@@A)
BatchExport.obj : error LNK2001: unresolved external symbol "struct gos_Heap * Stuff::g_Heap" (?g_Heap@Stuff@@3PAUgos_Heap@@A)
CvExport.obj : error LNK2001: unresolved external symbol "struct gos_Heap * Stuff::g_Heap" (?g_Heap@Stuff@@3PAUgos_Heap@@A)
DlgSelectMegatextures.obj : error LNK2001: unresolved external symbol "struct gos_Heap * Stuff::g_Heap" (?g_Heap@Stuff@@3PAUgos_Heap@@A)
MissionImp.obj : error LNK2001: unresolved external symbol "struct gos_Heap * Stuff::g_Heap" (?g_Heap@Stuff@@3PAUgos_Heap@@A)
BatchExport.obj : error LNK2001: unresolved external symbol "public: __thiscall MidLevelRenderer::MLRState::MLRState(class MidLevelRenderer::MLRState const &)" (??0MLRState@MidLevelRenderer@@QAE@ABV01@@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: class Stuff::Page * __thiscall Stuff::NotationFile::AddPage(char const *)" (?AddPage@NotationFile@Stuff@@QAEPAVPage@2@PBD@Z)
GeoExport.obj : error LNK2001: unresolved external symbol "public: class Stuff::Page * __thiscall Stuff::NotationFile::AddPage(char const *)" (?AddPage@NotationFile@Stuff@@QAEPAVPage@2@PBD@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: class MidLevelRenderer::MLRPrimitiveBase * __thiscall MidLevelRenderer::MLRShape::Find(int)" (?Find@MLRShape@MidLevelRenderer@@QAEPAVMLRPrimitiveBase@2@H@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: int __thiscall MidLevelRenderer::MLRShape::GetNumPrimitives(void)" (?GetNumPrimitives@MLRShape@MidLevelRenderer@@QAEHXZ)
BatchExport.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::Page::SetEntry(char const *,float)" (?SetEntry@Page@Stuff@@QAEXPBDM@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: class Stuff::Note * __thiscall Stuff::Page::FindNote(char const *)" (?FindNote@Page@Stuff@@QAEPAVNote@2@PBD@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::NotationFile::Save(void)" (?Save@NotationFile@Stuff@@QAEXXZ)
BatchExport.obj : error LNK2001: unresolved external symbol "bool __cdecl Stuff::CreateDirectories(char const *)" (?CreateDirectories@Stuff@@YA_NPBD@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: int __thiscall Stuff::OBB::ComputeBounds(class Stuff::ReadOnlyArrayOf<class Stuff::Point3D> &)" (?ComputeBounds@OBB@Stuff@@QAEHAAV?$ReadOnlyArrayOf@VPoint3D@Stuff@@@2@@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: int __thiscall Stuff::Sphere::ComputeBounds(class Stuff::ReadOnlyArrayOf<class Stuff::Point3D> &)" (?ComputeBounds@Sphere@Stuff@@QAEHAAV?$ReadOnlyArrayOf@VPoint3D@Stuff@@@2@@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: class Stuff::Point3D & __thiscall Stuff::Point3D::Multiply(class Stuff::Point3D const &,class Stuff::AffineMatrix4D const &)" (?Multiply@Point3D@Stuff@@QAEAAV12@ABV12@ABVAffineMatrix4D@2@@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: class Stuff::AffineMatrix4D & __thiscall Stuff::AffineMatrix4D::operator=(class Stuff::YawPitchRoll const &)" (??4AffineMatrix4D@Stuff@@QAEAAV01@ABVYawPitchRoll@1@@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: static class Stuff::YawPitchRoll const Stuff::YawPitchRoll::Identity" (?Identity@YawPitchRoll@Stuff@@2V12@B)
BatchExport.obj : error LNK2001: unresolved external symbol "public: int __thiscall ElementRenderer::ShapeLODElement::AttachLODFirstAvailableSlot(class MidLevelRenderer::MLRShape *,struct ElementRenderer::LODElement::Entry const &)" (?AttachLODFirstAvailableSlot@ShapeLODElement@ElementRenderer@@QAEHPAVMLRShape@MidLevelRenderer@@ABUEntry@LODElement@2@@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: void __thiscall ElementRenderer::ShapeLODElement::SetSize(unsigned short)" (?SetSize@ShapeLODElement@ElementRenderer@@QAEXG@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: __thiscall ElementRenderer::ShapeLODElement::ShapeLODElement(class ElementRenderer::Element__ClassData *)" (??0ShapeLODElement@ElementRenderer@@QAE@PAVElement__ClassData@1@@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: static class ElementRenderer::Element__ClassData * ElementRenderer::ShapeLODElement::DefaultData" (?DefaultData@ShapeLODElement@ElementRenderer@@2PAVElement__ClassData@2@A)
BatchExport.obj : error LNK2001: unresolved external symbol "public: static struct gos_Heap * ElementRenderer::ShapeLODElement::s_Heap" (?s_Heap@ShapeLODElement@ElementRenderer@@2PAUgos_Heap@@A)
BatchExport.obj : error LNK2001: unresolved external symbol "public: int __thiscall ElementRenderer::TreeElement::AttachLODFirstAvailableSlot(class MidLevelRenderer::MLRShape *,struct ElementRenderer::TreeElement::Entry const &)" (?AttachLODFirstAvailableSlot@TreeElement@ElementRenderer@@QAEHPAVMLRShape@MidLevelRenderer@@ABUEntry@12@@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: void __thiscall ElementRenderer::TreeElement::SetSize(unsigned short)" (?SetSize@TreeElement@ElementRenderer@@QAEXG@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: __thiscall ElementRenderer::TreeElement::TreeElement(void)" (??0TreeElement@ElementRenderer@@QAE@XZ)
BatchExport.obj : error LNK2001: unresolved external symbol "public: static struct gos_Heap * ElementRenderer::TreeElement::s_Heap" (?s_Heap@TreeElement@ElementRenderer@@2PAUgos_Heap@@A)
BatchExport.obj : error LNK2001: unresolved external symbol "void __stdcall gos_FindFilesClose(void)" (?gos_FindFilesClose@@YGXXZ)
BatchExport.obj : error LNK2001: unresolved external symbol "public: static class Stuff::RegisteredClass__ClassData * Proxies::GroupProxy::DefaultData" (?DefaultData@GroupProxy@Proxies@@2PAVRegisteredClass__ClassData@Stuff@@A)
EBFExport.obj : error LNK2001: unresolved external symbol "public: static class Stuff::RegisteredClass__ClassData * Proxies::GroupProxy::DefaultData" (?DefaultData@GroupProxy@Proxies@@2PAVRegisteredClass__ClassData@Stuff@@A)
ExportUtil.obj : error LNK2001: unresolved external symbol "public: static class Stuff::RegisteredClass__ClassData * Proxies::GroupProxy::DefaultData" (?DefaultData@GroupProxy@Proxies@@2PAVRegisteredClass__ClassData@Stuff@@A)
BatchExport.obj : error LNK2001: unresolved external symbol "public: bool __thiscall Stuff::RegisteredClass__ClassData::IsDerivedFrom(class Stuff::RegisteredClass__ClassData *)" (?IsDerivedFrom@RegisteredClass__ClassData@Stuff@@QAE_NPAV12@@Z)
EBFExport.obj : error LNK2001: unresolved external symbol "public: bool __thiscall Stuff::RegisteredClass__ClassData::IsDerivedFrom(class Stuff::RegisteredClass__ClassData *)" (?IsDerivedFrom@RegisteredClass__ClassData@Stuff@@QAE_NPAV12@@Z)
ExportUtil.obj : error LNK2001: unresolved external symbol "public: bool __thiscall Stuff::RegisteredClass__ClassData::IsDerivedFrom(class Stuff::RegisteredClass__ClassData *)" (?IsDerivedFrom@RegisteredClass__ClassData@Stuff@@QAE_NPAV12@@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: static class Stuff::RegisteredClass__ClassData * Proxies::PolygonMeshProxy::DefaultData" (?DefaultData@PolygonMeshProxy@Proxies@@2PAVRegisteredClass__ClassData@Stuff@@A)
EBFExport.obj : error LNK2001: unresolved external symbol "public: static class Stuff::RegisteredClass__ClassData * Proxies::PolygonMeshProxy::DefaultData" (?DefaultData@PolygonMeshProxy@Proxies@@2PAVRegisteredClass__ClassData@Stuff@@A)
ExportUtil.obj : error LNK2001: unresolved external symbol "public: static class Stuff::RegisteredClass__ClassData * Proxies::PolygonMeshProxy::DefaultData" (?DefaultData@PolygonMeshProxy@Proxies@@2PAVRegisteredClass__ClassData@Stuff@@A)
BatchExport.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::MString::ToLower(void)" (?ToLower@MString@Stuff@@QAEXXZ)
ExportUtil.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::MString::ToLower(void)" (?ToLower@MString@Stuff@@QAEXXZ)
BatchExport.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::MString::RemoveSpaces(void)" (?RemoveSpaces@MString@Stuff@@QAEXXZ)
ExportUtil.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::MString::RemoveSpaces(void)" (?RemoveSpaces@MString@Stuff@@QAEXXZ)
BatchExport.obj : error LNK2001: unresolved external symbol "public: static void __cdecl Proxies::PolygonMeshProxy::DetachArrayReferences(class Stuff::DynamicArrayOf<class Proxies::VertexProxy *> *)" (?DetachArrayReferences@PolygonMeshProxy@Proxies@@SAXPAV?$DynamicArrayOf@PAVVertexProxy@Proxies@@@Stuff@@@Z)
EBFExport.obj : error LNK2001: unresolved external symbol "public: static void __cdecl Proxies::PolygonMeshProxy::DetachArrayReferences(class Stuff::DynamicArrayOf<class Proxies::VertexProxy *> *)" (?DetachArrayReferences@PolygonMeshProxy@Proxies@@SAXPAV?$DynamicArrayOf@PAVVertexProxy@Proxies@@@Stuff@@@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: class Stuff::Vector3D & __thiscall Stuff::Vector3D::Multiply(class Stuff::Vector3D const &,class Stuff::AffineMatrix4D const &)" (?Multiply@Vector3D@Stuff@@QAEAAV12@ABV12@ABVAffineMatrix4D@2@@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: class Stuff::LinearMatrix4D & __thiscall Stuff::LinearMatrix4D::Invert(class Stuff::LinearMatrix4D const &)" (?Invert@LinearMatrix4D@Stuff@@QAEAAV12@ABV12@@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: static class Stuff::RegisteredClass__ClassData * Proxies::SceneProxy::DefaultData" (?DefaultData@SceneProxy@Proxies@@2PAVRegisteredClass__ClassData@Stuff@@A)
ExportUtil.obj : error LNK2001: unresolved external symbol "public: static class Stuff::RegisteredClass__ClassData * Proxies::SceneProxy::DefaultData" (?DefaultData@SceneProxy@Proxies@@2PAVRegisteredClass__ClassData@Stuff@@A)
BatchExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Proxies::CoalesceTexturesProcess::~CoalesceTexturesProcess(void)" (??1CoalesceTexturesProcess@Proxies@@QAE@XZ)
BatchExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Proxies::CoalesceTexturesProcess::CoalesceTexturesProcess(class Stuff::NotationFile *,char const *,bool,void *)" (??0CoalesceTexturesProcess@Proxies@@QAE@PAVNotationFile@Stuff@@PBD_NPAX@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Proxies::BuildMegatexturesProcess::BuildMegatexturesProcess(class Stuff::NotationFile *)" (??0BuildMegatexturesProcess@Proxies@@QAE@PAVNotationFile@Stuff@@@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Proxies::ArrangeMegatexturesProcess::ArrangeMegatexturesProcess(class Stuff::NotationFile *)" (??0ArrangeMegatexturesProcess@Proxies@@QAE@PAVNotationFile@Stuff@@@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "void __stdcall gos_CloseFile(struct gosFileStream *)" (?gos_CloseFile@@YGXPAUgosFileStream@@@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "unsigned long __stdcall gos_WriteFile(struct gosFileStream *,void const *,unsigned long)" (?gos_WriteFile@@YGKPAUgosFileStream@@PBXK@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "void __stdcall gos_OpenFile(struct gosFileStream * *,char const *,enum gosEnum_FileWriteStatus)" (?gos_OpenFile@@YGXPAPAUgosFileStream@@PBDW4gosEnum_FileWriteStatus@@@Z)
BatchExport.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::Note::GetEntry(int *)" (?GetEntry@Note@Stuff@@QAEXPAH@Z)
CvExport.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::FileStream::Close(void)" (?Close@FileStream@Stuff@@QAEXXZ)
CvExport.obj : error LNK2001: unresolved external symbol "public: void __thiscall Adept::CollisionVolume::Save(class Stuff::MemoryStream *)" (?Save@CollisionVolume@Adept@@QAEXPAVMemoryStream@Stuff@@@Z)
CvExport.obj : error LNK2001: unresolved external symbol "public: static void __cdecl Adept::CollisionVolume::WriteOBBVersion(class Stuff::MemoryStream *)" (?WriteOBBVersion@CollisionVolume@Adept@@SAXPAVMemoryStream@Stuff@@@Z)
CvExport.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::ChainIterator::Remove(void)" (?Remove@ChainIterator@Stuff@@QAEXXZ)
CvExport.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::Chain::AddPlug(class Stuff::Plug *)" (?AddPlug@Chain@Stuff@@QAEXPAVPlug@2@@Z)
CvExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Adept::CollisionVolume::CollisionVolume(void)" (??0CollisionVolume@Adept@@QAE@XZ)
CvExport.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall Adept::CollisionVolume::~CollisionVolume(void)" (??1CollisionVolume@Adept@@UAE@XZ)
CvExport.obj : error LNK2001: unresolved external symbol "char const * __cdecl Adept::MaterialTypeAsciiToText(int)" (?MaterialTypeAsciiToText@Adept@@YAPBDH@Z)
cvobject.obj : error LNK2001: unresolved external symbol "char const * __cdecl Adept::MaterialTypeAsciiToText(int)" (?MaterialTypeAsciiToText@Adept@@YAPBDH@Z)
DlgSelectMegatextures.obj : error LNK2001: unresolved external symbol "public: static class Stuff::ChainOf<class Stuff::PlugOf<class Stuff::MString> *> * __cdecl Proxies::CoalesceTexturesProcess::MakeMegatextureChain(char const *)" (?MakeMegatextureChain@CoalesceTexturesProcess@Proxies@@SAPAV?$ChainOf@PAV?$PlugOf@VMString@Stuff@@@Stuff@@@Stuff@@PBD@Z)
EBFExport.obj : error LNK2001: unresolved external symbol "void __cdecl MidLevelRenderer::WriteMLRVersion(class Stuff::MemoryStream *)" (?WriteMLRVersion@MidLevelRenderer@@YAXPAVMemoryStream@Stuff@@@Z)
MLRExport.obj : error LNK2001: unresolved external symbol "void __cdecl MidLevelRenderer::WriteMLRVersion(class Stuff::MemoryStream *)" (?WriteMLRVersion@MidLevelRenderer@@YAXPAVMemoryStream@Stuff@@@Z)
EBFExport.obj : error LNK2001: unresolved external symbol "void __cdecl gosFX::WriteGFXVersion(class Stuff::MemoryStream *)" (?WriteGFXVersion@gosFX@@YAXPAVMemoryStream@Stuff@@@Z)
MLRExport.obj : error LNK2001: unresolved external symbol "protected: __thiscall MAXProxies::MAXScene::MAXScene(class Interface *,char const *)" (??0MAXScene@MAXProxies@@IAE@PAVInterface@@PBD@Z)
SkeletonVerify.obj : error LNK2001: unresolved external symbol "protected: __thiscall MAXProxies::MAXScene::MAXScene(class Interface *,char const *)" (??0MAXScene@MAXProxies@@IAE@PAVInterface@@PBD@Z)
EBFExport.obj : error LNK2001: unresolved external symbol "protected: __thiscall MAXProxies::MAXScene::MAXScene(class Interface *,char const *)" (??0MAXScene@MAXProxies@@IAE@PAVInterface@@PBD@Z)
ErfImport.obj : error LNK2001: unresolved external symbol "protected: __thiscall MAXProxies::MAXScene::MAXScene(class Interface *,char const *)" (??0MAXScene@MAXProxies@@IAE@PAVInterface@@PBD@Z)
ExportUtil.obj : error LNK2001: unresolved external symbol "protected: __thiscall MAXProxies::MAXScene::MAXScene(class Interface *,char const *)" (??0MAXScene@MAXProxies@@IAE@PAVInterface@@PBD@Z)
LightExport.obj : error LNK2001: unresolved external symbol "protected: __thiscall MAXProxies::MAXScene::MAXScene(class Interface *,char const *)" (??0MAXScene@MAXProxies@@IAE@PAVInterface@@PBD@Z)
EBFExport.obj : error LNK2001: unresolved external symbol "public: bool __thiscall ElementProxies::OptimizeSyncProcess::OptimizeSync(class ElementProxies::ElementPolygonMeshProxy *)" (?OptimizeSync@OptimizeSyncProcess@ElementProxies@@QAE_NPAVElementPolygonMeshProxy@2@@Z)
ExportUtil.obj : error LNK2001: unresolved external symbol "public: bool __thiscall ElementProxies::OptimizeSyncProcess::OptimizeSync(class ElementProxies::ElementPolygonMeshProxy *)" (?OptimizeSync@OptimizeSyncProcess@ElementProxies@@QAE_NPAVElementPolygonMeshProxy@2@@Z)
MLRExport.obj : error LNK2001: unresolved external symbol "public: bool __thiscall ElementProxies::OptimizeSyncProcess::OptimizeSync(class ElementProxies::ElementPolygonMeshProxy *)" (?OptimizeSync@OptimizeSyncProcess@ElementProxies@@QAE_NPAVElementPolygonMeshProxy@2@@Z)
EBFExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Proxies::Process::Process(void)" (??0Process@Proxies@@QAE@XZ)
ErfImport.obj : error LNK2001: unresolved external symbol "public: __thiscall Proxies::Process::Process(void)" (??0Process@Proxies@@QAE@XZ)
ExportUtil.obj : error LNK2001: unresolved external symbol "public: __thiscall Proxies::Process::Process(void)" (??0Process@Proxies@@QAE@XZ)
MLRExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Proxies::Process::Process(void)" (??0Process@Proxies@@QAE@XZ)
EBFExport.obj : error LNK2001: unresolved external symbol "public: __thiscall MAXProxies::MAXFlattenHierarchyProcess::MAXFlattenHierarchyProcess(class Stuff::NotationFile *,class Interface *,int,bool,void *)" (??0MAXFlattenHierarchyProcess@MAXProxies@@QAE@PAVNotationFile@Stuff@@PAVInterface@@H_NPAX@Z)
ExportUtil.obj : error LNK2001: unresolved external symbol "public: __thiscall MAXProxies::MAXFlattenHierarchyProcess::MAXFlattenHierarchyProcess(class Stuff::NotationFile *,class Interface *,int,bool,void *)" (??0MAXFlattenHierarchyProcess@MAXProxies@@QAE@PAVNotationFile@Stuff@@PAVInterface@@H_NPAX@Z)
MLRExport.obj : error LNK2001: unresolved external symbol "public: __thiscall MAXProxies::MAXFlattenHierarchyProcess::MAXFlattenHierarchyProcess(class Stuff::NotationFile *,class Interface *,int,bool,void *)" (??0MAXFlattenHierarchyProcess@MAXProxies@@QAE@PAVNotationFile@Stuff@@PAVInterface@@H_NPAX@Z)
EBFExport.obj : error LNK2001: unresolved external symbol "public: __thiscall MAXProxies::MAXCopyProcess::MAXCopyProcess(class Stuff::NotationFile *,class Interface *,int,bool,void *)" (??0MAXCopyProcess@MAXProxies@@QAE@PAVNotationFile@Stuff@@PAVInterface@@H_NPAX@Z)
ExportUtil.obj : error LNK2001: unresolved external symbol "public: __thiscall MAXProxies::MAXCopyProcess::MAXCopyProcess(class Stuff::NotationFile *,class Interface *,int,bool,void *)" (??0MAXCopyProcess@MAXProxies@@QAE@PAVNotationFile@Stuff@@PAVInterface@@H_NPAX@Z)
MLRExport.obj : error LNK2001: unresolved external symbol "public: __thiscall MAXProxies::MAXCopyProcess::MAXCopyProcess(class Stuff::NotationFile *,class Interface *,int,bool,void *)" (??0MAXCopyProcess@MAXProxies@@QAE@PAVNotationFile@Stuff@@PAVInterface@@H_NPAX@Z)
EBFExport.obj : error LNK2001: unresolved external symbol "protected: __thiscall ElementProxies::ElementSceneProxy::ElementSceneProxy(class ElementRenderer::GroupElement *,char const *)" (??0ElementSceneProxy@ElementProxies@@IAE@PAVGroupElement@ElementRenderer@@PBD@Z)
ExportUtil.obj : error LNK2001: unresolved external symbol "protected: __thiscall ElementProxies::ElementSceneProxy::ElementSceneProxy(class ElementRenderer::GroupElement *,char const *)" (??0ElementSceneProxy@ElementProxies@@IAE@PAVGroupElement@ElementRenderer@@PBD@Z)
MLRExport.obj : error LNK2001: unresolved external symbol "protected: __thiscall ElementProxies::ElementSceneProxy::ElementSceneProxy(class ElementRenderer::GroupElement *,char const *)" (??0ElementSceneProxy@ElementProxies@@IAE@PAVGroupElement@ElementRenderer@@PBD@Z)
EBFExport.obj : error LNK2001: unresolved external symbol "public: __thiscall ElementRenderer::GroupElement::GroupElement(class ElementRenderer::Element__ClassData *)" (??0GroupElement@ElementRenderer@@QAE@PAVElement__ClassData@1@@Z)
ErfImport.obj : error LNK2001: unresolved external symbol "public: __thiscall ElementRenderer::GroupElement::GroupElement(class ElementRenderer::Element__ClassData *)" (??0GroupElement@ElementRenderer@@QAE@PAVElement__ClassData@1@@Z)
ExportUtil.obj : error LNK2001: unresolved external symbol "public: __thiscall ElementRenderer::GroupElement::GroupElement(class ElementRenderer::Element__ClassData *)" (??0GroupElement@ElementRenderer@@QAE@PAVElement__ClassData@1@@Z)
MLRExport.obj : error LNK2001: unresolved external symbol "public: __thiscall ElementRenderer::GroupElement::GroupElement(class ElementRenderer::Element__ClassData *)" (??0GroupElement@ElementRenderer@@QAE@PAVElement__ClassData@1@@Z)
EBFExport.obj : error LNK2001: unresolved external symbol "public: static class ElementRenderer::Element__ClassData * ElementRenderer::GroupElement::DefaultData" (?DefaultData@GroupElement@ElementRenderer@@2PAVElement__ClassData@2@A)
ErfImport.obj : error LNK2001: unresolved external symbol "public: static class ElementRenderer::Element__ClassData * ElementRenderer::GroupElement::DefaultData" (?DefaultData@GroupElement@ElementRenderer@@2PAVElement__ClassData@2@A)
ExportUtil.obj : error LNK2001: unresolved external symbol "public: static class ElementRenderer::Element__ClassData * ElementRenderer::GroupElement::DefaultData" (?DefaultData@GroupElement@ElementRenderer@@2PAVElement__ClassData@2@A)
MLRExport.obj : error LNK2001: unresolved external symbol "public: static class ElementRenderer::Element__ClassData * ElementRenderer::GroupElement::DefaultData" (?DefaultData@GroupElement@ElementRenderer@@2PAVElement__ClassData@2@A)
EditBatch.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::Page::DeleteAllNotes(void)" (?DeleteAllNotes@Page@Stuff@@QAEXXZ)
ErfImport.obj : error LNK2001: unresolved external symbol "public: class INode * __thiscall MAXProxies::NodeKeeper::GetNode(int)" (?GetNode@NodeKeeper@MAXProxies@@QAEPAVINode@@H@Z)
ErfImport.obj : error LNK2001: unresolved external symbol "public: int __thiscall MAXProxies::NodeKeeper::Count(void)" (?Count@NodeKeeper@MAXProxies@@QAEHXZ)
ErfImport.obj : error LNK2001: unresolved external symbol "protected: __thiscall ElementProxies::ElementSceneProxy::ElementSceneProxy(class ElementRenderer::GroupElement *)" (??0ElementSceneProxy@ElementProxies@@IAE@PAVGroupElement@ElementRenderer@@@Z)
ErfImport.obj : error LNK2001: unresolved external symbol "public: static class ElementRenderer::Element * __cdecl ElementRenderer::Element::Create(class Stuff::MemoryStream *,int,class MidLevelRenderer::MLRShape * (__cdecl*)(class Stuff::MemoryStream *,int,int))" (?Create@Element@ElementRenderer@@SAPAV12@PAVMemoryStream@Stuff@@HP6APAVMLRShape@MidLevelRenderer@@0HH@Z@Z)
ErfImport.obj : error LNK2001: unresolved external symbol "int __cdecl ElementRenderer::ReadERFVersion(class Stuff::MemoryStream *)" (?ReadERFVersion@ElementRenderer@@YAHPAVMemoryStream@Stuff@@@Z)
ErfImport.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::FileStream::Open(char const *,enum Stuff::FileStream::WriteStatus)" (?Open@FileStream@Stuff@@QAEXPBDW4WriteStatus@12@@Z)
ExportUtil.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::FileStream::Open(char const *,enum Stuff::FileStream::WriteStatus)" (?Open@FileStream@Stuff@@QAEXPBDW4WriteStatus@12@@Z)
MLRExport.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::FileStream::Open(char const *,enum Stuff::FileStream::WriteStatus)" (?Open@FileStream@Stuff@@QAEXPBDW4WriteStatus@12@@Z)
ErfImport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::FileStream::FileStream(void)" (??0FileStream@Stuff@@QAE@XZ)
ExportUtil.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::FileStream::FileStream(void)" (??0FileStream@Stuff@@QAE@XZ)
MLRExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Stuff::FileStream::FileStream(void)" (??0FileStream@Stuff@@QAE@XZ)
ErfImport.obj : error LNK2001: unresolved external symbol "public: static class MidLevelRenderer::MLRTexturePool * MidLevelRenderer::MLRTexturePool::Instance" (?Instance@MLRTexturePool@MidLevelRenderer@@2PAV12@A)
ErfImport.obj : error LNK2001: unresolved external symbol "public: __thiscall MidLevelRenderer::MLRTexturePool::MLRTexturePool(class MidLevelRenderer::GOSImagePool *,int)" (??0MLRTexturePool@MidLevelRenderer@@QAE@PAVGOSImagePool@1@H@Z)
ErfImport.obj : error LNK2001: unresolved external symbol "public: __thiscall MidLevelRenderer::TGAFilePool::TGAFilePool(char const *,char const *)" (??0TGAFilePool@MidLevelRenderer@@QAE@PBD0@Z)
ErfImport.obj : error LNK2001: unresolved external symbol "struct gos_Heap * MidLevelRenderer::TexturePoolHeap" (?TexturePoolHeap@MidLevelRenderer@@3PAUgos_Heap@@A)
ErfImport.obj : error LNK2001: unresolved external symbol "int g_bConvertMeshes" (?g_bConvertMeshes@@3HA)
ExportUtil.obj : error LNK2001: unresolved external symbol "public: __thiscall Proxies::Process::Process(class Stuff::NotationFile *,bool,void *)" (??0Process@Proxies@@QAE@PAVNotationFile@Stuff@@_NPAX@Z)
ExportUtil.obj : error LNK2001: unresolved external symbol "public: __thiscall MAXProxies::MAXSplitByStateProcess::MAXSplitByStateProcess(class Stuff::NotationFile *,class Interface *,int,bool,void *)" (??0MAXSplitByStateProcess@MAXProxies@@QAE@PAVNotationFile@Stuff@@PAVInterface@@H_NPAX@Z)
ExportUtil.obj : error LNK2001: unresolved external symbol "public: static void __cdecl Proxies::PolygonMeshProxy::DetachArrayReferences(class Stuff::DynamicArrayOf<class Proxies::PolygonProxy *> *)" (?DetachArrayReferences@PolygonMeshProxy@Proxies@@SAXPAV?$DynamicArrayOf@PAVPolygonProxy@Proxies@@@Stuff@@@Z)
MLRExport.obj : error LNK2001: unresolved external symbol "public: static void __cdecl Proxies::PolygonMeshProxy::DetachArrayReferences(class Stuff::DynamicArrayOf<class Proxies::PolygonProxy *> *)" (?DetachArrayReferences@PolygonMeshProxy@Proxies@@SAXPAV?$DynamicArrayOf@PAVPolygonProxy@Proxies@@@Stuff@@@Z)
ExportUtil.obj : error LNK2001: unresolved external symbol "public: bool __thiscall ElementProxies::SetExplicitAlphaModeProcess::SetExplicitAlphaMode(class ElementProxies::ElementPolygonMeshProxy *,enum MidLevelRenderer::MLRStateBase::AlphaMode)" (?SetExplicitAlphaMode@SetExplicitAlphaModeProcess@ElementProxies@@QAE_NPAVElementPolygonMeshProxy@2@W4AlphaMode@MLRStateBase@MidLevelRenderer@@@Z)
ExportUtil.obj : error LNK2001: unresolved external symbol "public: bool __thiscall ElementProxies::SetExplicitLightingModeProcess::SetExplicitLightingMode(class ElementProxies::ElementPolygonMeshProxy *,enum MidLevelRenderer::MLRStateBase::LightingMode)" (?SetExplicitLightingMode@SetExplicitLightingModeProcess@ElementProxies@@QAE_NPAVElementPolygonMeshProxy@2@W4LightingMode@MLRStateBase@MidLevelRenderer@@@Z)
ExportUtil.obj : error LNK2001: unresolved external symbol "public: bool __thiscall ElementProxies::SetExplicitFogModeProcess::SetExplicitFogMode(class ElementProxies::ElementPolygonMeshProxy *,int)" (?SetExplicitFogMode@SetExplicitFogModeProcess@ElementProxies@@QAE_NPAVElementPolygonMeshProxy@2@H@Z)
ExportUtil.obj : error LNK2001: unresolved external symbol "void __cdecl ElementRenderer::WriteERFVersion(class Stuff::MemoryStream *)" (?WriteERFVersion@ElementRenderer@@YAXPAVMemoryStream@Stuff@@@Z)
GeoExport.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::Page::SetEntry(char const *,bool)" (?SetEntry@Page@Stuff@@QAEXPBD_N@Z)
LegMirrorPanel.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::MultiplyValue(void *,float)" (?MultiplyValue@ExprControl@@UAEXPAXM@Z)
Mirror.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::MultiplyValue(void *,float)" (?MultiplyValue@ExprControl@@UAEXPAXM@Z)
Reverse.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::MultiplyValue(void *,float)" (?MultiplyValue@ExprControl@@UAEXPAXM@Z)
LegMirrorPanel.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::ApplyValue(void *,void *)" (?ApplyValue@ExprControl@@UAEXPAX0@Z)
Mirror.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::ApplyValue(void *,void *)" (?ApplyValue@ExprControl@@UAEXPAX0@Z)
Reverse.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::ApplyValue(void *,void *)" (?ApplyValue@ExprControl@@UAEXPAX0@Z)
LegMirrorPanel.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::DeleteTempValue(void *)" (?DeleteTempValue@ExprControl@@UAEXPAX@Z)
Mirror.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::DeleteTempValue(void *)" (?DeleteTempValue@ExprControl@@UAEXPAX@Z)
Reverse.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::DeleteTempValue(void *)" (?DeleteTempValue@ExprControl@@UAEXPAX@Z)
LegMirrorPanel.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall ExprControl::CreateTempValue(void)" (?CreateTempValue@ExprControl@@UAEPAXXZ)
Mirror.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall ExprControl::CreateTempValue(void)" (?CreateTempValue@ExprControl@@UAEPAXXZ)
Reverse.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall ExprControl::CreateTempValue(void)" (?CreateTempValue@ExprControl@@UAEPAXXZ)
LegMirrorPanel.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::Extrapolate(class Interval,int,void *,class Interval &,int)" (?Extrapolate@ExprControl@@UAEXVInterval@@HPAXAAV2@H@Z)
Mirror.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::Extrapolate(class Interval,int,void *,class Interval &,int)" (?Extrapolate@ExprControl@@UAEXVInterval@@HPAXAAV2@H@Z)
Reverse.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::Extrapolate(class Interval,int,void *,class Interval &,int)" (?Extrapolate@ExprControl@@UAEXVInterval@@HPAXAAV2@H@Z)
LegMirrorPanel.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::GetValueLocalTime(int,void *,class Interval &,enum GetSetMethod)" (?GetValueLocalTime@ExprControl@@UAEXHPAXAAVInterval@@W4GetSetMethod@@@Z)
Mirror.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::GetValueLocalTime(int,void *,class Interval &,enum GetSetMethod)" (?GetValueLocalTime@ExprControl@@UAEXHPAXAAVInterval@@W4GetSetMethod@@@Z)
Reverse.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::GetValueLocalTime(int,void *,class Interval &,enum GetSetMethod)" (?GetValueLocalTime@ExprControl@@UAEXHPAXAAVInterval@@W4GetSetMethod@@@Z)
LegMirrorPanel.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::Copy(class Control *)" (?Copy@ExprControl@@UAEXPAVControl@@@Z)
Mirror.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::Copy(class Control *)" (?Copy@ExprControl@@UAEXPAVControl@@@Z)
Reverse.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::Copy(class Control *)" (?Copy@ExprControl@@UAEXPAVControl@@@Z)
LegMirrorPanel.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::RefDeleted(void)" (?RefDeleted@ExprControl@@UAEXXZ)
Mirror.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::RefDeleted(void)" (?RefDeleted@ExprControl@@UAEXXZ)
Reverse.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::RefDeleted(void)" (?RefDeleted@ExprControl@@UAEXXZ)
LegMirrorPanel.obj : error LNK2001: unresolved external symbol "public: virtual enum RefResult __thiscall ExprControl::NotifyRefChanged(class Interval,class ReferenceTarget *,unsigned long &,unsigned int)" (?NotifyRefChanged@ExprControl@@UAE?AW4RefResult@@VInterval@@PAVReferenceTarget@@AAKI@Z)
Mirror.obj : error LNK2001: unresolved external symbol "public: virtual enum RefResult __thiscall ExprControl::NotifyRefChanged(class Interval,class ReferenceTarget *,unsigned long &,unsigned int)" (?NotifyRefChanged@ExprControl@@UAE?AW4RefResult@@VInterval@@PAVReferenceTarget@@AAKI@Z)
Reverse.obj : error LNK2001: unresolved external symbol "public: virtual enum RefResult __thiscall ExprControl::NotifyRefChanged(class Interval,class ReferenceTarget *,unsigned long &,unsigned int)" (?NotifyRefChanged@ExprControl@@UAE?AW4RefResult@@VInterval@@PAVReferenceTarget@@AAKI@Z)
LegMirrorPanel.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::SetReference(int,class ReferenceTarget *)" (?SetReference@ExprControl@@UAEXHPAVReferenceTarget@@@Z)
Mirror.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::SetReference(int,class ReferenceTarget *)" (?SetReference@ExprControl@@UAEXHPAVReferenceTarget@@@Z)
Reverse.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::SetReference(int,class ReferenceTarget *)" (?SetReference@ExprControl@@UAEXHPAVReferenceTarget@@@Z)
LegMirrorPanel.obj : error LNK2001: unresolved external symbol "public: virtual class ReferenceTarget * __thiscall ExprControl::GetReference(int)" (?GetReference@ExprControl@@UAEPAVReferenceTarget@@H@Z)
Mirror.obj : error LNK2001: unresolved external symbol "public: virtual class ReferenceTarget * __thiscall ExprControl::GetReference(int)" (?GetReference@ExprControl@@UAEPAVReferenceTarget@@H@Z)
Reverse.obj : error LNK2001: unresolved external symbol "public: virtual class ReferenceTarget * __thiscall ExprControl::GetReference(int)" (?GetReference@ExprControl@@UAEPAVReferenceTarget@@H@Z)
LegMirrorPanel.obj : error LNK2001: unresolved external symbol "public: virtual enum IOResult __thiscall ExprControl::Load(class ILoad *)" (?Load@ExprControl@@UAE?AW4IOResult@@PAVILoad@@@Z)
Mirror.obj : error LNK2001: unresolved external symbol "public: virtual enum IOResult __thiscall ExprControl::Load(class ILoad *)" (?Load@ExprControl@@UAE?AW4IOResult@@PAVILoad@@@Z)
Reverse.obj : error LNK2001: unresolved external symbol "public: virtual enum IOResult __thiscall ExprControl::Load(class ILoad *)" (?Load@ExprControl@@UAE?AW4IOResult@@PAVILoad@@@Z)
LegMirrorPanel.obj : error LNK2001: unresolved external symbol "public: virtual enum IOResult __thiscall ExprControl::Save(class ISave *)" (?Save@ExprControl@@UAE?AW4IOResult@@PAVISave@@@Z)
Mirror.obj : error LNK2001: unresolved external symbol "public: virtual enum IOResult __thiscall ExprControl::Save(class ISave *)" (?Save@ExprControl@@UAE?AW4IOResult@@PAVISave@@@Z)
Reverse.obj : error LNK2001: unresolved external symbol "public: virtual enum IOResult __thiscall ExprControl::Save(class ISave *)" (?Save@ExprControl@@UAE?AW4IOResult@@PAVISave@@@Z)
LegMirrorPanel.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::EditTrackParams(int,class ParamDimensionBase *,char *,struct HWND__ *,class IObjParam *,unsigned long)" (?EditTrackParams@ExprControl@@UAEXHPAVParamDimensionBase@@PADPAUHWND__@@PAVIObjParam@@K@Z)
Mirror.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::EditTrackParams(int,class ParamDimensionBase *,char *,struct HWND__ *,class IObjParam *,unsigned long)" (?EditTrackParams@ExprControl@@UAEXHPAVParamDimensionBase@@PADPAUHWND__@@PAVIObjParam@@K@Z)
Reverse.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::EditTrackParams(int,class ParamDimensionBase *,char *,struct HWND__ *,class IObjParam *,unsigned long)" (?EditTrackParams@ExprControl@@UAEXHPAVParamDimensionBase@@PADPAUHWND__@@PAVIObjParam@@K@Z)
LegMirrorPanel.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::MapKeys(class TimeMap *,unsigned long)" (?MapKeys@ExprControl@@UAEXPAVTimeMap@@K@Z)
Mirror.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::MapKeys(class TimeMap *,unsigned long)" (?MapKeys@ExprControl@@UAEXPAVTimeMap@@K@Z)
Reverse.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::MapKeys(class TimeMap *,unsigned long)" (?MapKeys@ExprControl@@UAEXPAVTimeMap@@K@Z)
LegMirrorPanel.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::EditTimeRange(class Interval,unsigned long)" (?EditTimeRange@ExprControl@@UAEXVInterval@@K@Z)
Mirror.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::EditTimeRange(class Interval,unsigned long)" (?EditTimeRange@ExprControl@@UAEXVInterval@@K@Z)
Reverse.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::EditTimeRange(class Interval,unsigned long)" (?EditTimeRange@ExprControl@@UAEXVInterval@@K@Z)
LegMirrorPanel.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::EndEditParams(class IObjParam *,unsigned long,class Animatable *)" (?EndEditParams@ExprControl@@UAEXPAVIObjParam@@KPAVAnimatable@@@Z)
Mirror.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::EndEditParams(class IObjParam *,unsigned long,class Animatable *)" (?EndEditParams@ExprControl@@UAEXPAVIObjParam@@KPAVAnimatable@@@Z)
Reverse.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::EndEditParams(class IObjParam *,unsigned long,class Animatable *)" (?EndEditParams@ExprControl@@UAEXPAVIObjParam@@KPAVAnimatable@@@Z)
LegMirrorPanel.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::BeginEditParams(class IObjParam *,unsigned long,class Animatable *)" (?BeginEditParams@ExprControl@@UAEXPAVIObjParam@@KPAVAnimatable@@@Z)
Mirror.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::BeginEditParams(class IObjParam *,unsigned long,class Animatable *)" (?BeginEditParams@ExprControl@@UAEXPAVIObjParam@@KPAVAnimatable@@@Z)
Reverse.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall ExprControl::BeginEditParams(class IObjParam *,unsigned long,class Animatable *)" (?BeginEditParams@ExprControl@@UAEXPAVIObjParam@@KPAVAnimatable@@@Z)
LegMirrorPanel.obj : error LNK2001: unresolved external symbol "public: __thiscall ExprControl::ExprControl(int,int)" (??0ExprControl@@QAE@HH@Z)
Mirror.obj : error LNK2001: unresolved external symbol "public: __thiscall ExprControl::ExprControl(int,int)" (??0ExprControl@@QAE@HH@Z)
Reverse.obj : error LNK2001: unresolved external symbol "public: __thiscall ExprControl::ExprControl(int,int)" (??0ExprControl@@QAE@HH@Z)
LegMirrorPanel.obj : error LNK2001: unresolved external symbol "public: __thiscall ExprControl::ExprControl(int,class ExprControl &)" (??0ExprControl@@QAE@HAAV0@@Z)
Mirror.obj : error LNK2001: unresolved external symbol "public: __thiscall ExprControl::ExprControl(int,class ExprControl &)" (??0ExprControl@@QAE@HAAV0@@Z)
Reverse.obj : error LNK2001: unresolved external symbol "public: __thiscall ExprControl::ExprControl(int,class ExprControl &)" (??0ExprControl@@QAE@HAAV0@@Z)
LegMirrorPanel.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall ExprControl::~ExprControl(void)" (??1ExprControl@@UAE@XZ)
Mirror.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall ExprControl::~ExprControl(void)" (??1ExprControl@@UAE@XZ)
Reverse.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall ExprControl::~ExprControl(void)" (??1ExprControl@@UAE@XZ)
LegMirrorPanel.obj : error LNK2001: unresolved external symbol "public: int __thiscall ExprControl::assignController(int,int,class ReferenceTarget *,int)" (?assignController@ExprControl@@QAEHHHPAVReferenceTarget@@H@Z)
Mirror.obj : error LNK2001: unresolved external symbol "public: int __thiscall ExprControl::assignController(int,int,class ReferenceTarget *,int)" (?assignController@ExprControl@@QAEHHHPAVReferenceTarget@@H@Z)
LightExport.obj : error LNK2001: unresolved external symbol "protected: __thiscall Stuff::MemoryBlockBase::~MemoryBlockBase(void)" (??1MemoryBlockBase@Stuff@@IAE@XZ)
LightExport.obj : error LNK2001: unresolved external symbol "public: void __thiscall MidLevelRenderer::MLRLight::SetLightToWorldMatrix(class Stuff::LinearMatrix4D const &)" (?SetLightToWorldMatrix@MLRLight@MidLevelRenderer@@QAEXABVLinearMatrix4D@Stuff@@@Z)
LightExport.obj : error LNK2001: unresolved external symbol "public: __thiscall MidLevelRenderer::MLRAmbientLight::MLRAmbientLight(void)" (??0MLRAmbientLight@MidLevelRenderer@@QAE@XZ)
LightExport.obj : error LNK2001: unresolved external symbol "public: __thiscall MidLevelRenderer::MLRInfiniteLight::MLRInfiniteLight(class Stuff::RegisteredClass__ClassData *)" (??0MLRInfiniteLight@MidLevelRenderer@@QAE@PAVRegisteredClass__ClassData@Stuff@@@Z)
LightExport.obj : error LNK2001: unresolved external symbol "public: static class Stuff::RegisteredClass__ClassData * MidLevelRenderer::MLRInfiniteLight::DefaultData" (?DefaultData@MLRInfiniteLight@MidLevelRenderer@@2PAVRegisteredClass__ClassData@Stuff@@A)
LightExport.obj : error LNK2001: unresolved external symbol "public: void __thiscall MidLevelRenderer::MLRSpotLight::SetSpreadAngle(class Stuff::Radian const &)" (?SetSpreadAngle@MLRSpotLight@MidLevelRenderer@@QAEXABVRadian@Stuff@@@Z)
LightExport.obj : error LNK2001: unresolved external symbol "public: __thiscall MidLevelRenderer::MLRSpotLight::MLRSpotLight(void)" (??0MLRSpotLight@MidLevelRenderer@@QAE@XZ)
LightExport.obj : error LNK2001: unresolved external symbol "public: void __thiscall MidLevelRenderer::MLRInfiniteLightWithFalloff::SetFalloffDistance(float,float)" (?SetFalloffDistance@MLRInfiniteLightWithFalloff@MidLevelRenderer@@QAEXMM@Z)
LightExport.obj : error LNK2001: unresolved external symbol "public: __thiscall MidLevelRenderer::MLRPointLight::MLRPointLight(void)" (??0MLRPointLight@MidLevelRenderer@@QAE@XZ)
LightExport.obj : error LNK2001: unresolved external symbol "public: __thiscall Proxies::BurnLightsProcess::BurnLightsProcess(void)" (??0BurnLightsProcess@Proxies@@QAE@XZ)
MissionImp.obj : error LNK2001: unresolved external symbol "class Point3 __cdecl ConvertMWToMax(class Stuff::Point3D &)" (?ConvertMWToMax@@YA?AVPoint3@@AAVPoint3D@Stuff@@@Z)
MissionImp.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::Note::GetEntry(class Stuff::Vector3D *)" (?GetEntry@Note@Stuff@@QAEXPAVVector3D@2@@Z)
MissionImp.obj : error LNK2001: unresolved external symbol "class Quat __cdecl ConvertMWToMax(class Stuff::UnitQuaternion &)" (?ConvertMWToMax@@YA?AVQuat@@AAVUnitQuaternion@Stuff@@@Z)
MissionImp.obj : error LNK2001: unresolved external symbol "public: class Stuff::UnitQuaternion & __thiscall Stuff::UnitQuaternion::operator=(class Stuff::YawPitchRoll const &)" (??4UnitQuaternion@Stuff@@QAEAAV01@ABVYawPitchRoll@1@@Z)
MissionImp.obj : error LNK2001: unresolved external symbol "public: void __thiscall Stuff::Note::GetEntry(class Stuff::YawPitchRoll *)" (?GetEntry@Note@Stuff@@QAEXPAVYawPitchRoll@2@@Z)
MissionImp.obj : error LNK2001: unresolved external symbol "public: bool __thiscall Stuff::Page::GetEntry(char const *,class Stuff::Vector3D *,bool)" (?GetEntry@Page@Stuff@@QAE_NPBDPAVVector3D@2@_N@Z)
MissionImp.obj : error LNK2001: unresolved external symbol "public: bool __thiscall Stuff::Page::GetEntry(char const *,class Stuff::YawPitchRoll *,bool)" (?GetEntry@Page@Stuff@@QAE_NPBDPAVYawPitchRoll@2@_N@Z)
..\..\..\Binaries\3DSPlug-ins\Profile\AnimationSuite.dle : fatal error LNK1120: 202 unresolved externals
Error executing link.exe.
<h3>Results</h3>
AnimationSuite.dle - 399 error(s), 3 warning(s)
</pre>
</body>
</html>
@@ -0,0 +1,950 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
// Generated Help ID header file
#define APSTUDIO_HIDDEN_SYMBOLS
#include "resource.hm"
#undef APSTUDIO_HIDDEN_SYMBOLS
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040c04b0"
BEGIN
VALUE "Comments", "This is the collection of animation tools for MechWarrior4\0"
VALUE "CompanyName", "Microsoft Corp.\0"
VALUE "FileDescription", "AnimationSuite\0"
VALUE "FileVersion", "1, 0, 0, 1\0"
VALUE "InternalName", "AnimationSuite\0"
VALUE "LegalCopyright", "Copyright (C) 1999\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "AnimationSuite.DLL\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "AnimationSuite\0"
VALUE "ProductVersion", "1, 0, 0, 1\0"
VALUE "SpecialBuild", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x40c, 1200
END
END
#endif // !_MAC
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_ABOUT DIALOGEX 0, 0, 187, 210
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CLIENTEDGE
CAPTION "About..."
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
CTEXT "MechWarrior 4 Animation Suite",IDC_STATIC,7,5,173,11,
SS_CENTERIMAGE,WS_EX_CLIENTEDGE
CTEXT "Copyright 1999(C)\nMicrosoft\nJerry Edsall\nJonathan Kyle\nThomas Steinke",
IDC_STATIC,55,19,76,42,SS_SUNKEN
LTEXT "C.V. - Collision Volume version 1.0. 7-26-1999",
IDC_STATIC,7,71,173,8
END
IDD_JOINT_EDIT DIALOGEX 0, 0, 397, 271
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Joint Data"
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,50,250,50,14
CONTROL "Tree1",IDC_NODE_TREE,"SysTreeView32",TVS_HASBUTTONS |
TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP |
TVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,5,5,220,240
GROUPBOX "Rotation",IDC_STATIC,235,40,150,92
COMBOBOX IDC_COMBO_ROT_CONVERT,310,50,70,40,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
CONTROL "Optimize",IDC_CHECK_ROT_OPT,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,250,72,50,15
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME,240,67,140,60,
WS_EX_DLGMODALFRAME
EDITTEXT IDC_EDIT_ROT_THRESH,350,72,25,15,ES_AUTOHSCROLL
LTEXT "Threshold:",IDC_STATIC,310,72,35,15,SS_CENTERIMAGE
EDITTEXT IDC_ROT_MIN_RANGE,275,107,20,12,ES_AUTOHSCROLL
EDITTEXT IDC_ROT_MAX_RANGE,340,107,20,12,ES_AUTOHSCROLL
CONTROL "Explicit Range",IDC_CHECK_ROT_RANGE,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,275,92,70,12
LTEXT "Min",IDC_STATIC,255,107,15,10,SS_CENTERIMAGE
LTEXT "Max",IDC_STATIC,320,107,20,10,SS_CENTERIMAGE
CONTROL "Encode Velocity",IDC_CHECK_ENCODE_VELOCITY,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,275,20,70,15
GROUPBOX "Translation",IDC_STATIC,235,140,150,97
COMBOBOX IDC_COMBO_TRAN_CONVERT,310,155,70,40,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
CONTROL "Optimize",IDC_CHECK_TRAN_OPT,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,250,177,50,15
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME,240,172,140,60,
WS_EX_DLGMODALFRAME
EDITTEXT IDC_EDIT_TRAN_THRESH,350,177,25,15,ES_AUTOHSCROLL
LTEXT "Threshold:",IDC_STATIC,310,177,35,15,SS_CENTERIMAGE
EDITTEXT IDC_TRAN_MIN_RANGE,275,212,20,12,ES_AUTOHSCROLL
EDITTEXT IDC_TRAN_MAX_RANGE,340,212,20,12,ES_AUTOHSCROLL
CONTROL "Explicit Range",IDC_CHECK_TRAN_RANGE,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,275,196,70,12
LTEXT "Min",IDC_STATIC,255,212,15,10,SS_CENTERIMAGE
LTEXT "Max",IDC_STATIC,320,212,20,10,SS_CENTERIMAGE
DEFPUSHBUTTON "Revert Joint",ID_REVERT_JOINT,285,245,50,14
DEFPUSHBUTTON "Cancel",IDCANCEL,115,250,50,14
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME,229,7,1,255,
WS_EX_STATICEDGE
LTEXT "Include:",IDC_STATIC,255,5,35,15,SS_CENTERIMAGE
COMBOBOX IDC_COMBO_INCLUDE,300,5,70,40,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
CONTROL "Convert",IDC_CONVERT_ROT_CHECK,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,250,50,55,15
CONTROL "Convert",IDC_CONVERT_TRAN_CHECK,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,250,155,55,12
END
IDD_JOINT_PREF_PANEL DIALOG DISCARDABLE 0, 0, 108, 71
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
PUSHBUTTON "Edit Joint Prefrence",IDC_EDIT_JOINT,7,5,94,15
PUSHBUTTON "About...",IDC_ABOUT,7,49,94,15
PUSHBUTTON "Delete All Joint Prefrences",IDC_DELETE_ALL,7,27,94,15
END
IDD_OPT_PANEL DIALOG DISCARDABLE 0, 0, 108, 48
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
PUSHBUTTON "Optimize",IDC_OPTIMIZE,7,5,94,15
PUSHBUTTON "About...",IDC_ABOUT,7,26,94,15
END
IDD_REP_PANEL DIALOG DISCARDABLE 0, 0, 108, 62
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
PUSHBUTTON "Replicate",IDC_REPLICATE,7,5,94,15
PUSHBUTTON "About...",IDC_ABOUT,7,39,94,15
PUSHBUTTON "Bake",IDC_BAKE,7,21,94,15
END
IDD_THRESHOLD_DIALOG DIALOGEX 0, 0, 155, 95
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_TOOLWINDOW
CAPTION "Enter Replicate Params"
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
CONTROL "Delete Original",IDC_DELETE_CHECK,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,7,7,141,18,WS_EX_STATICEDGE
DEFPUSHBUTTON "OK",IDOK,7,70,50,14
PUSHBUTTON "Cancel",IDCANCEL,98,70,50,14
EDITTEXT IDC_OFFSET_X,25,46,25,14,ES_AUTOHSCROLL
EDITTEXT IDC_OFFSET_Y,74,46,25,14,ES_AUTOHSCROLL
EDITTEXT IDC_OFFSET_Z,123,46,25,14,ES_AUTOHSCROLL
CTEXT "X:",IDC_X_TEXT,7,46,17,14,SS_CENTERIMAGE
CTEXT "Y:",IDC_Y_TEXT,56,46,17,14,SS_CENTERIMAGE
CTEXT "Z:",IDC_Z_TEXT,105,46,17,14,SS_CENTERIMAGE
CONTROL "Offset Model",IDC_OFFSET_CHECK,"Button",BS_AUTOCHECKBOX |
BS_PUSHLIKE | WS_TABSTOP,7,30,141,13
END
IDD_SITE_PANEL DIALOG DISCARDABLE 0, 0, 108, 206
STYLE WS_CHILD | WS_VISIBLE
FONT 8, "MS Sans Serif"
BEGIN
CONTROL "",IDC_EDIT_SIZE,"CustEdit",WS_TABSTOP,30,60,35,10
CONTROL "",IDC_SPIN_SIZE,"SpinnerControl",0x0,66,60,7,10
CONTROL "",IDC_EDIT_NUM_TRIGGER,"CustEdit",WS_TABSTOP,30,25,35,
10
CONTROL "",IDC_SPIN_NUM_TRIGGER,"SpinnerControl",0x0,66,25,7,10
CTEXT "Scale",IDC_STATIC,25,45,55,10
CTEXT "Trigger Count",IDC_STATIC,25,10,55,10
CONTROL "",IDC_SPIN_TRIGGER_0,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,17,84,13,10
CONTROL "",IDC_SPIN_TRIGGER_1,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,17,100,13,10
CONTROL "",IDC_SPIN_TRIGGER_2,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,17,114,13,10
CONTROL "",IDC_SPIN_TRIGGER_3,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,17,129,13,10
CONTROL "",IDC_SPIN_TRIGGER_4,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,17,145,13,10
CONTROL "",IDC_SPIN_TRIGGER_5,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,17,159,13,10
CONTROL "",IDC_SPIN_TRIGGER_6,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,17,174,13,10
CONTROL "",IDC_SPIN_TRIGGER_7,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,17,190,13,10
CONTROL "",IDC_SPIN_TRIGGER_8,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,69,85,13,10
CONTROL "",IDC_SPIN_TRIGGER_9,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,69,100,13,10
CONTROL "",IDC_SPIN_TRIGGER_10,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,69,115,13,10
CONTROL "",IDC_SPIN_TRIGGER_11,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,69,130,13,10
CONTROL "",IDC_SPIN_TRIGGER_12,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,69,145,13,10
CONTROL "",IDC_SPIN_TRIGGER_13,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,69,160,13,10
CONTROL "",IDC_SPIN_TRIGGER_14,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,69,175,13,10
CONTROL "",IDC_SPIN_TRIGGER_15,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,69,190,13,10
LTEXT "0:",IDC_STATIC,5,85,10,10
LTEXT "1:",IDC_STATIC,5,100,10,10
LTEXT "2:",IDC_STATIC,5,115,10,10
LTEXT "3:",IDC_STATIC,5,130,10,10
LTEXT "4:",IDC_STATIC,5,145,10,10
LTEXT "5:",IDC_STATIC,5,160,10,10
LTEXT "6:",IDC_STATIC,5,175,10,10
LTEXT "7:",IDC_STATIC,5,190,10,10
LTEXT "8:",IDC_STATIC,55,85,10,10
LTEXT "9:",IDC_STATIC,55,100,10,10
LTEXT "10:",IDC_STATIC,55,115,10,10
LTEXT "11:",IDC_STATIC,55,130,10,10
LTEXT "12:",IDC_STATIC,55,145,10,10
LTEXT "13:",IDC_STATIC,55,160,10,10
LTEXT "14:",IDC_STATIC,55,175,10,10
LTEXT "15:",IDC_STATIC,55,190,10,10
END
IDD_LEGMIRROR_PANEL DIALOG DISCARDABLE 0, 0, 108, 211
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
PUSHBUTTON "Mirror Legs",IDC_MIRRORLEG,7,5,94,15
PUSHBUTTON "About...",IDC_ABOUT,7,145,94,15
PUSHBUTTON "Reverse Animation",IDC_REVERSEANIM,7,23,94,15
PUSHBUTTON "Reverse Sites",IDC_REVSITES,7,59,94,15
PUSHBUTTON "Fix Expressions",IDC_FIXEXP,7,41,94,15
PUSHBUTTON "Export Animations",IDC_EXPORTANIM,7,94,94,14
PUSHBUTTON "Fix Velocity/Root Scale",IDC_FIXSCALE,7,77,94,14
PUSHBUTTON "Export Lights",IDC_EXPORTLIGHTS,7,111,94,14
PUSHBUTTON "Import Mission Contents...",IDC_IMPORTCONTENTS,7,128,94,
14
END
IDD_HILLADJUST_PANEL DIALOGEX 0, 0, 108, 282
STYLE WS_CHILD
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
PUSHBUTTON "About...",IDC_ABOUT,0,260,94,15
PUSHBUTTON "Adjust",IDC_HILL_ADJUST,0,240,94,15
CONTROL "",IDC_SPIN_ANGLE,"SpinnerControl",0x0,91,20,7,10
CONTROL "",IDC_EDIT_ANGLE,"CustEdit",WS_TABSTOP,55,20,35,10
LTEXT "Ground Angle",IDC_STATIC,0,20,44,8
LTEXT "Scale Root Pos",IDC_STATIC,0,35,52,8
CONTROL "",IDC_EDIT_SCALE_ROOT_POS_X,"CustEdit",WS_TABSTOP,20,46,
20,10
CONTROL "",IDC_SPIN_SCALE_ROOT_POS_X,"SpinnerControl",0x0,41,46,
7,10
CONTROL "",IDC_EDIT_SCALE_ROOT_POS_Y,"CustEdit",WS_TABSTOP,20,58,
20,10
CONTROL "",IDC_SPIN_SCALE_ROOT_POS_Y,"SpinnerControl",0x0,41,58,
7,10
CONTROL "",IDC_EDIT_SCALE_ROOT_POS_Z,"CustEdit",WS_TABSTOP,20,70,
20,10
CONTROL "",IDC_SPIN_SCALE_ROOT_POS_Z,"SpinnerControl",0x0,41,70,
7,10
LTEXT "Scale Root Rot",IDC_STATIC,55,35,52,8
CONTROL "",IDC_EDIT_SCALE_ROOT_ROT_X,"CustEdit",WS_TABSTOP,75,46,
21,10
CONTROL "",IDC_SPIN_SCALE_ROOT_ROT_X,"SpinnerControl",0x0,97,46,
7,10
CONTROL "",IDC_EDIT_SCALE_ROOT_ROT_Y,"CustEdit",WS_TABSTOP,75,58,
21,10
CONTROL "",IDC_SPIN_SCALE_ROOT_ROT_Y,"SpinnerControl",0x0,97,58,
7,10
CONTROL "",IDC_EDIT_SCALE_ROOT_ROT_Z,"CustEdit",WS_TABSTOP,75,70,
21,10
CONTROL "",IDC_SPIN_SCALE_ROOT_ROT_Z,"SpinnerControl",0x0,97,70,
7,10
LTEXT "Move Root Pos",IDC_STATIC,0,81,52,8
CONTROL "",IDC_EDIT_MOVE_ROOT_POS_X,"CustEdit",WS_TABSTOP,20,90,
21,10
CONTROL "",IDC_SPIN_MOVE_ROOT_POS_X,"SpinnerControl",0x0,42,90,7,
10
CONTROL "",IDC_EDIT_MOVE_ROOT_POS_Y,"CustEdit",WS_TABSTOP,20,102,
21,10
CONTROL "",IDC_SPIN_MOVE_ROOT_POS_Y,"SpinnerControl",0x0,42,102,
7,10
CONTROL "",IDC_EDIT_MOVE_ROOT_POS_Z,"CustEdit",WS_TABSTOP,20,114,
21,10
CONTROL "",IDC_SPIN_MOVE_ROOT_POS_Z,"SpinnerControl",0x0,42,114,
7,10
LTEXT "Hip Scale",IDC_STATIC,0,126,34,8
CONTROL "",IDC_EDIT_SCALE_HIP_POS_X,"CustEdit",WS_TABSTOP,15,135,
21,10
CONTROL "",IDC_SPIN_SCALE_HIP_POS_X,"SpinnerControl",0x0,37,135,
7,10
CONTROL "",IDC_EDIT_MOVE_HIP_Y,"CustEdit",WS_TABSTOP,70,135,21,
10
CONTROL "",IDC_SPIN_MOVE_HIP_Y,"SpinnerControl",0x0,92,135,7,10
CONTROL "",IDC_EDIT_SCALE_TORSO_X,"CustEdit",WS_TABSTOP,20,161,
21,10
CONTROL "",IDC_SPIN_SCALE_TORSO_X,"SpinnerControl",0x0,42,161,7,
10
LTEXT "Scale Feet",IDC_STATIC,55,150,36,8
CONTROL "",IDC_EDIT_SCALE_FEET_CLOSENESS_LEFT,"CustEdit",
WS_TABSTOP,75,161,21,10
CONTROL "",IDC_SPIN_SCALE_FEET_CLOSENESS_LEFT,"SpinnerControl",
0x0,97,161,7,10
CONTROL "",IDC_EDIT_SCALE_FEET_CLOSENESS_RIGHT,"CustEdit",
WS_TABSTOP,75,173,21,10
CONTROL "",IDC_SPIN_SCALE_FEET_CLOSENESS_RIGHT,"SpinnerControl",
0x0,97,173,7,10
CONTROL "",IDC_EDIT_SCALE_TORSO_Y,"CustEdit",WS_TABSTOP,20,173,
21,10
CONTROL "",IDC_SPIN_SCALE_TORSO_Y,"SpinnerControl",0x0,42,173,7,
10
LTEXT "Torso Scale",IDC_STATIC,0,150,40,8
CONTROL "",IDC_EDIT_SCALE_TORSO_Z,"CustEdit",WS_TABSTOP,20,185,
21,10
CONTROL "",IDC_SPIN_SCALE_TORSO_Z,"SpinnerControl",0x0,42,185,7,
10
LTEXT "Move Root Rot",IDC_STATIC,55,81,52,8
CONTROL "",IDC_EDIT_MOVE_ROOT_ROT_X,"CustEdit",WS_TABSTOP,75,90,
21,10
CONTROL "",IDC_SPIN_MOVE_ROOT_ROT_X,"SpinnerControl",0x0,97,90,7,
10
CONTROL "",IDC_EDIT_MOVE_ROOT_ROT_Y,"CustEdit",WS_TABSTOP,75,102,
21,10
CONTROL "",IDC_SPIN_MOVE_ROOT_ROT_Y,"SpinnerControl",0x0,97,102,
7,10
CONTROL "",IDC_EDIT_MOVE_ROOT_ROT_Z,"CustEdit",WS_TABSTOP,75,114,
21,10
CONTROL "",IDC_SPIN_MOVE_ROOT_ROT_Z,"SpinnerControl",0x0,97,114,
7,10
CONTROL "Leave Original Tangents",IDC_LEAVE_TANG,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,0,195,90,10
CONTROL "Leave Original Curves",IDC_LEAVE_CURVE,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,0,205,90,10
LTEXT "Hip Move",IDC_STATIC,55,126,32,8
COMBOBOX IDC_COMBO_DIRECTION,35,5,72,50,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
LTEXT "Direction",IDC_STATIC,0,5,29,8,0,0,HIDC_STATIC
PUSHBUTTON "R",IDC_CHECK_SCALE_ROOT_POS_X,10,46,8,8
PUSHBUTTON "R",IDC_CHECK_SCALE_ROOT_POS_Y,10,58,8,8
PUSHBUTTON "R",IDC_CHECK_SCALE_ROOT_POS_Z,10,70,8,8
LTEXT "X",IDC_STATIC,2,46,8,8
LTEXT "Y",IDC_STATIC,2,58,8,8
LTEXT "Z",IDC_STATIC,2,70,8,8
PUSHBUTTON "R",IDC_CHECK_SCALE_ROOT_ROT_X,65,46,8,8
PUSHBUTTON "R",IDC_CHECK_SCALE_ROOT_ROT_Y,65,58,8,8
PUSHBUTTON "R",IDC_CHECK_SCALE_ROOT_ROT_Z,65,70,8,8
LTEXT "X",IDC_STATIC,57,46,8,8
LTEXT "Y",IDC_STATIC,57,58,8,8
LTEXT "Z",IDC_STATIC,57,70,8,8
PUSHBUTTON "R",IDC_CHECK_SCALE_TORSO_X,10,161,8,8
PUSHBUTTON "R",IDC_CHECK_SCALE_TORSO_Y,10,173,8,8
PUSHBUTTON "R",IDC_CHECK_SCALE_TORSO_Z,10,185,8,8
LTEXT "X",IDC_STATIC,2,161,8,8
LTEXT "Y",IDC_STATIC,2,173,8,8
LTEXT "Z",IDC_STATIC,2,185,8,8
PUSHBUTTON "R",IDC_CHECK_MOVE_ROOT_POS_X,10,90,8,8
PUSHBUTTON "R",IDC_CHECK_MOVE_ROOT_POS_Y,10,102,8,8
PUSHBUTTON "R",IDC_CHECK_MOVE_ROOT_POS_Z,10,114,8,8
LTEXT "X",IDC_STATIC,2,90,8,8
LTEXT "Y",IDC_STATIC,2,102,8,8
LTEXT "Z",IDC_STATIC,2,114,8,8
PUSHBUTTON "R",IDC_CHECK_MOVE_ROOT_ROT_X,66,90,8,8
PUSHBUTTON "R",IDC_CHECK_MOVE_ROOT_ROT_Y,66,102,8,8
PUSHBUTTON "R",IDC_CHECK_MOVE_ROOT_ROT_Z,66,114,8,8
LTEXT "X",IDC_STATIC,58,90,8,8
LTEXT "Y",IDC_STATIC,58,102,8,8
LTEXT "Z",IDC_STATIC,58,114,8,8
PUSHBUTTON "R",IDC_CHECK_SCALE_FEET_L,66,161,8,8
PUSHBUTTON "R",IDC_CHECK_SCALE_FEET_R,66,173,8,8
LTEXT "L",IDC_STATIC,58,161,8,8
LTEXT "R",IDC_STATIC,58,173,8,8
PUSHBUTTON "R",IDC_CHECK_SCALE_HIP,5,135,8,8
PUSHBUTTON "R",IDC_CHECK_MOVE_HIP,60,135,8,8
PUSHBUTTON "Hold",IDC_HILL_HOLD,0,220,50,15
PUSHBUTTON "Fetch",IDC_HILL_FETCH,58,220,50,15
END
IDD_FALLTOOL_PANEL DIALOG DISCARDABLE 0, 0, 108, 67
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
CONTROL "Fall Left",IDC_FALLTOOL_FALLLEFT,"Button",
BS_AUTORADIOBUTTON,0,7,41,10
CONTROL "Fall Right",IDC_FALLTOOL_FALLRIGHT,"Button",
BS_AUTORADIOBUTTON,0,20,45,10
CONTROL "Fall Back",IDC_FALLTOOL_FALLBACK,"Button",
BS_AUTORADIOBUTTON,0,33,45,10
PUSHBUTTON "Execute",IDC_FALLTOOL_EXECUTE,0,46,107,14
END
IDD_SKELETONVERIFY_PANEL DIALOG DISCARDABLE 0, 0, 109, 160
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
PUSHBUTTON "Verify Skeleton",IDC_SKELETONVERIFY_EXECUTE,0,24,54,14
LISTBOX IDC_SKELETONVERIFY_LISTBOX,0,65,109,88,LBS_SORT |
LBS_NOINTEGRALHEIGHT | LBS_EXTENDEDSEL | WS_VSCROLL |
WS_HSCROLL | WS_TABSTOP
LTEXT "Verifcation Errors:",IDC_STATIC,0,55,56,8
PUSHBUTTON "Compare To...",IDC_SKELETONVERIFY_COMPARE,57,24,52,14
CONTROL "Compare to:",IDC_CHECK_COMPARE,"Button",BS_AUTOCHECKBOX |
WS_DISABLED | WS_TABSTOP,0,41,109,10
PUSHBUTTON "Check Export Errors",IDC_CHECKEXPORT,0,7,109,14
END
IDD_QUICKFILE_PANEL DIALOG DISCARDABLE 0, 0, 108, 142
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
LISTBOX IDC_QUICKFILE_LISTBOX,0,40,107,75,LBS_SORT |
LBS_NOINTEGRALHEIGHT | LBS_EXTENDEDSEL | WS_VSCROLL |
WS_TABSTOP
LTEXT "Quick File Selection",IDC_STATIC,0,7,64,8
PUSHBUTTON "Add...",IDC_QUICKFILE_ADD,0,20,50,14
PUSHBUTTON "Remove",IDC_QUICKFILE_REMOVE,58,20,50,14
PUSHBUTTON "Apply to plugin...",IDC_QUICKFILE_APPLY,0,120,107,14
END
IDD_CV_PANEL DIALOG DISCARDABLE 0, 0, 108, 176
STYLE WS_CHILD | WS_VISIBLE
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "Material",IDC_STATIC,0,7,26,8
LISTBOX IDC_LIST_MATERIAL,0,20,107,53,LBS_SORT |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
CONTROL "",IDC_EDIT_X,"CustEdit",WS_TABSTOP,18,120,50,10
CONTROL "",IDC_SPIN_X,"SpinnerControl",0x0,75,120,7,10
CONTROL "",IDC_EDIT_Y,"CustEdit",WS_TABSTOP,18,132,50,10
CONTROL "",IDC_SPIN_Y,"SpinnerControl",0x0,75,132,7,10
CONTROL "",IDC_EDIT_Z,"CustEdit",WS_TABSTOP,18,144,50,10
CONTROL "",IDC_SPIN_Z,"SpinnerControl",0x0,75,144,7,10
LTEXT "X",IDC_STATIC,0,120,8,8
LTEXT "Y",IDC_STATIC,0,132,8,8
LTEXT "Z",IDC_STATIC,0,144,8,8
LTEXT "Dimensions",IDC_STATIC,0,110,37,8
LTEXT "Important: Scale transforms do not work. Use the Dimensions below to resize the box.",
IDC_STATIC,0,80,107,30
CONTROL "Good Enuf",IDC_CHECK_GOODENUF,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,0,160,50,10
END
IDD_CVTOOL_PANEL DIALOG DISCARDABLE 0, 0, 108, 50
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "&Execute",IDC_EXECUTE,30,7,50,14
END
IDD_ERRORCHECK DIALOG DISCARDABLE 0, 0, 186, 95
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Error Check"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,7,74,50,14
PUSHBUTTON "Cancel",IDCANCEL,129,74,50,14
LTEXT "Select the type of errors to check for:",IDC_STATIC,7,7,
118,8
CONTROL "Geometry (.Erf Export)",IDC_GEOMETRY,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,7,20,85,10
CONTROL "Character/Shape (.Batch export)",IDC_BATCH,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,7,30,119,10
CONTROL "Collision Volume (.OBB Export)",IDC_CV,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,7,50,111,10
CONTROL "Lights Export (.Lights Export)",IDC_LIGHT,"Button",
BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,7,60,105,
10
CONTROL "Animation (.MW4ANIM Export)",IDC_ANIMATION,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,7,40,112,10
END
IDD_EDIT_BATCHPAGE DIALOG DISCARDABLE 0, 0, 482, 378
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Edit Batch Export"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,425,141,50,14
PUSHBUTTON "Cancel",IDCANCEL,425,159,50,14
LISTBOX IDC_LIST_CLASS,7,17,96,40,LBS_SORT |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
LTEXT "Class:",IDC_STATIC,7,7,20,8
CONTROL "Armatured (Character)",IDC_RADIO_CHAR,"Button",
BS_AUTORADIOBUTTON,108,17,85,10
CONTROL "Not Armatured (Shape)",IDC_RADIO_SHAPE,"Button",
BS_AUTORADIOBUTTON,108,30,88,10
EDITTEXT IDC_EDIT_SKEL,201,34,175,14,ES_AUTOHSCROLL
PUSHBUTTON "Browse",IDC_BROWSE_SKEL,326,20,50,14
LTEXT "Skeleton File Path:",IDC_STATIC,201,25,60,8
LTEXT "Destination Path:",IDC_STATIC,7,65,55,8
EDITTEXT IDC_EDIT_PATH,7,75,175,14,ES_AUTOHSCROLL
PUSHBUTTON "Browse",IDC_BROWSE_PATH,132,60,50,14
LTEXT "Cage File Path (Mechs only):",IDC_STATIC,202,65,91,8
CONTROL "Mech Cage",IDC_CHECK_CAGE,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,202,55,53,10
EDITTEXT IDC_EDIT_CAGE,200,75,175,14,ES_AUTOHSCROLL
PUSHBUTTON "Browse",IDC_BROWSE_CAGE,325,60,50,14
CONTROL "Animated",IDC_CHECK_ANIM,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,7,100,45,10
EDITTEXT IDC_EDIT_ANIM,7,120,175,14,ES_AUTOHSCROLL
PUSHBUTTON "Browse",IDC_BROWSE_ANIM,132,105,50,14
LTEXT "Animation Models Path:",IDC_STATIC,7,110,75,8
CONTROL "Collision Volume (.OBB file)",IDC_CHECK_OBB,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,200,100,100,10
EDITTEXT IDC_EDIT_OBB,200,120,175,14,ES_AUTOHSCROLL
PUSHBUTTON "Browse",IDC_BROWSE_OBB,325,105,50,14
LTEXT "Collision Volume File Path:",IDC_STATIC,200,110,83,8
EDITTEXT IDC_EDIT_HINT,7,158,175,14,ES_AUTOHSCROLL
PUSHBUTTON "Browse",IDC_BROWSE_HINT,131,142,50,14
LTEXT "Starting Hint File Path:",IDC_STATIC,7,147,71,8
EDITTEXT IDC_EDIT_MEGANAMES,200,158,175,14,ES_AUTOHSCROLL
LTEXT "Use Megatexture Hints:",IDC_STATIC,200,147,75,8
PUSHBUTTON "Select",IDC_SELECT_MEGANAMES,324,142,50,14
GROUPBOX "LOD",IDC_STATIC,7,184,468,186
LTEXT "Distance",IDC_STATIC,18,212,29,8
EDITTEXT IDC_EDIT_DIST0,28,224,20,14,ES_AUTOHSCROLL
LTEXT "LOD Distance Model Path:",IDC_STATIC,52,212,86,8
EDITTEXT IDC_EDIT_LOD0,52,224,116,14,ES_AUTOHSCROLL
PUSHBUTTON "Browse",IDC_BUTTON_LOD0,168,224,26,14
LTEXT "LOD0",IDC_STATIC,8,227,20,8
EDITTEXT IDC_EDIT_DAM0,200,224,115,14,ES_AUTOHSCROLL
PUSHBUTTON "Browse",IDC_BUTTON_LODDAM0,316,224,26,14
LTEXT "Damage LOD Distance Model Path:",IDC_STATIC,200,212,114,
8
EDITTEXT IDC_EDIT_DIST1,28,242,20,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_LOD1,54,242,116,14,ES_AUTOHSCROLL
PUSHBUTTON "Browse",IDC_BUTTON_LOD1,168,242,26,14
LTEXT "LOD1",IDC_STATIC,8,245,20,8
EDITTEXT IDC_EDIT_DAM1,200,242,115,14,ES_AUTOHSCROLL
PUSHBUTTON "Browse",IDC_BUTTON_LODDAM1,316,242,26,14
EDITTEXT IDC_EDIT_DIST2,28,262,20,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_LOD2,54,262,116,14,ES_AUTOHSCROLL
PUSHBUTTON "Browse",IDC_BUTTON_LOD2,168,262,26,14
LTEXT "LOD2",IDC_STATIC,8,265,20,8
EDITTEXT IDC_EDIT_DAM2,200,262,115,14,ES_AUTOHSCROLL
PUSHBUTTON "Browse",IDC_BUTTON_LODDAM2,316,262,26,14
EDITTEXT IDC_EDIT_DIST3,28,282,20,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_LOD3,54,282,116,14,ES_AUTOHSCROLL
PUSHBUTTON "Browse",IDC_BUTTON_LOD3,168,282,26,14
LTEXT "LOD3",IDC_STATIC,8,285,20,8
EDITTEXT IDC_EDIT_DAM3,200,282,115,14,ES_AUTOHSCROLL
PUSHBUTTON "Browse",IDC_BUTTON_LODDAM3,316,282,26,14
EDITTEXT IDC_EDIT_DIST4,28,300,20,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_LOD4,54,300,116,14,ES_AUTOHSCROLL
PUSHBUTTON "Browse",IDC_BUTTON_LOD4,168,300,26,14
LTEXT "LOD4",IDC_STATIC,8,303,20,8
EDITTEXT IDC_EDIT_DAM4,200,300,115,14,ES_AUTOHSCROLL
PUSHBUTTON "Browse",IDC_BUTTON_LODDAM4,316,300,26,14
EDITTEXT IDC_EDIT_DIST5,28,319,20,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_LOD5,54,319,116,14,ES_AUTOHSCROLL
PUSHBUTTON "Browse",IDC_BUTTON_LOD5,170,319,26,14
LTEXT "LOD5",IDC_STATIC,8,322,20,8
EDITTEXT IDC_EDIT_DAM5,200,319,115,14,ES_AUTOHSCROLL
PUSHBUTTON "Browse",IDC_BUTTON_LODDAM5,316,319,26,14
CONTROL "Crossfade",IDC_CHECK_CROSSFADE,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,355,198,47,10
LTEXT "Start from:",IDC_STATIC,291,351,33,8
LTEXT "Near",IDC_STATIC,358,214,16,8
LTEXT "Fade In",IDC_STATIC,382,214,25,8
LTEXT "Fade Out",IDC_STATIC,414,214,30,8
LTEXT "Far",IDC_STATIC,452,214,11,8
EDITTEXT IDC_EDIT_NEAR0,356,224,20,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_FADIN0,385,224,20,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_FADOUT0,419,224,20,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_FAR0,448,224,20,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_NEAR1,356,242,20,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_FADIN1,385,242,20,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_FADOUT1,419,242,20,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_FAR1,448,242,20,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_NEAR2,356,262,20,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_FADIN2,385,262,20,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_FADOUT2,419,262,20,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_FAR2,448,262,20,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_NEAR3,356,282,20,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_FADIN3,385,282,20,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_FADOUT3,419,282,20,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_FAR3,448,282,20,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_NEAR4,356,300,20,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_FADIN4,385,300,20,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_FADOUT4,419,300,20,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_FAR4,448,300,20,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_NEAR5,356,319,20,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_FADIN5,385,319,20,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_FADOUT5,419,319,20,14,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_FAR5,448,319,20,14,ES_AUTOHSCROLL
GROUPBOX "Billboard",IDC_STATIC,287,340,183,25
COMBOBOX IDC_ALIGN_STARTLOD,331,347,34,57,CBS_DROPDOWN |
WS_VSCROLL | WS_TABSTOP
CONTROL "Align X",IDC_ALIGN_X,"Button",BS_AUTOCHECKBOX,387,348,
38,10
CONTROL "Align Y",IDC_ALIGN_Y,"Button",BS_AUTOCHECKBOX,430,348,
38,10
END
IDD_DIALOG_MAPSIZE DIALOG DISCARDABLE 0, 0, 186, 66
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Map Size"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,129,7,50,14
PUSHBUTTON "Cancel",IDCANCEL,129,24,50,14
CONTROL "1 K",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,77,20,27,10
LTEXT "What is the size of this map?",IDC_STATIC,7,7,91,8
CONTROL "2 K",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,77,35,27,10
CONTROL "4 K",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON,77,50,27,10
CONTROL "Unknown",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON,7,21,47,
10
END
IDD_SELECT_MEGATEXTURES DIALOG DISCARDABLE 0, 0, 186, 95
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Select MegaTextures"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,129,7,50,14
PUSHBUTTON "Cancel",IDCANCEL,129,24,50,14
LISTBOX IDC_LIST_PAGES,7,7,110,81,LBS_SORT |
LBS_NOINTEGRALHEIGHT | LBS_EXTENDEDSEL | WS_VSCROLL |
WS_TABSTOP
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_ABOUT, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 180
TOPMARGIN, 7
BOTTOMMARGIN, 203
END
IDD_JOINT_EDIT, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 390
TOPMARGIN, 7
BOTTOMMARGIN, 264
END
IDD_JOINT_PREF_PANEL, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 101
TOPMARGIN, 5
BOTTOMMARGIN, 64
END
IDD_OPT_PANEL, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 101
TOPMARGIN, 5
BOTTOMMARGIN, 41
END
IDD_REP_PANEL, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 101
TOPMARGIN, 5
BOTTOMMARGIN, 55
END
IDD_THRESHOLD_DIALOG, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 148
TOPMARGIN, 7
BOTTOMMARGIN, 88
HORZGUIDE, 9
END
IDD_LEGMIRROR_PANEL, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 101
TOPMARGIN, 5
BOTTOMMARGIN, 165
END
IDD_HILLADJUST_PANEL, DIALOG
BEGIN
TOPMARGIN, 5
BOTTOMMARGIN, 275
END
IDD_FALLTOOL_PANEL, DIALOG
BEGIN
RIGHTMARGIN, 107
TOPMARGIN, 7
BOTTOMMARGIN, 60
END
IDD_SKELETONVERIFY_PANEL, DIALOG
BEGIN
TOPMARGIN, 7
BOTTOMMARGIN, 153
END
IDD_QUICKFILE_PANEL, DIALOG
BEGIN
TOPMARGIN, 7
BOTTOMMARGIN, 135
END
IDD_CV_PANEL, DIALOG
BEGIN
TOPMARGIN, 7
BOTTOMMARGIN, 170
END
IDD_CVTOOL_PANEL, DIALOG
BEGIN
TOPMARGIN, 7
BOTTOMMARGIN, 43
END
IDD_ERRORCHECK, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 179
TOPMARGIN, 7
BOTTOMMARGIN, 88
END
IDD_EDIT_BATCHPAGE, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 475
TOPMARGIN, 7
BOTTOMMARGIN, 371
END
IDD_DIALOG_MAPSIZE, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 179
TOPMARGIN, 7
BOTTOMMARGIN, 59
END
IDD_SELECT_MEGATEXTURES, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 179
TOPMARGIN, 7
BOTTOMMARGIN, 88
END
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// DATAFILE
//
IDR_MECH_DATA DATAFILE DISCARDABLE "Res\\mech.data"
IDR_MECH_DAMAGE DATAFILE DISCARDABLE "Res\\mech.damage"
IDR_MECH_SUBSYSTEMS DATAFILE DISCARDABLE "Res\\mech.subsystems"
IDR_VEHICLE_SUBSYSTEMS DATAFILE DISCARDABLE "Res\\vehicle.subsystems"
IDR_VEHICLE_TORSO DATAFILE DISCARDABLE "Res\\vehicle.torso"
IDR_VEHICLE_DAMAGE DATAFILE DISCARDABLE "Res\\vehicle.damage"
IDR_VEHICLE_DATA DATAFILE DISCARDABLE "Res\\vehicle.data"
IDR_BUILDING_DAMAGE DATAFILE DISCARDABLE "Res\\building.damage"
IDR_BUILDING_DATA DATAFILE DISCARDABLE "Res\\building.data"
IDR_TURRET_DAMAGE DATAFILE DISCARDABLE "Res\\turret.damage"
IDR_MECH_INSTANCE DATAFILE DISCARDABLE "Res\\mech.instance"
IDR_VEHICLE_INSTANCE DATAFILE DISCARDABLE "Res\\vehicle.instance"
IDR_BUILDING_INSTANCE DATAFILE DISCARDABLE "Res\\building.instance"
IDR_BUILDING_SUBSYSTEMS DATAFILE DISCARDABLE "Res\\building.subsystems"
IDR_BUILDING_TORSO DATAFILE DISCARDABLE "Res\\building.torso"
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDS_DB_BAD_NAME "Invalid variable name"
IDS_DB_POSITION_EXPR "Position Expression"
IDS_DB_POINT3_EXPR "Point3 Expression"
IDS_DB_FLOAT_EXPR "Float Expression"
IDS_DB_SCALE_EXPR "Scale Expression"
IDS_DB_ROTATION_EXPR "Rotation Expression"
IDS_DB_CIRCULAR_DEPENDENCY "Circular Dependency"
IDS_DB_CANT_ASSIGN "Can't Assign Controller"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_ANIMEXP_NAME "MW4 Animation Export"
IDS_CATEGORY "Microsoft - SABR"
IDS_LIBDESCRIPTION "Please obtain a copy of plugin: MW4 Animation Suite: For Microsoft internal use only"
IDS_LONGDESC "MW4 Animation Suite"
IDS_SHORTDESC "MW4 Animation"
IDS_COPYRIGHT "Copyright (C) 1999 Microsoft Corp."
IDS_ANALYZEANIM_NAME "Anylize Animation"
IDS_JOINTPREF_NAME "Joint Preference"
IDS_OPTIMIZEKEY_NAME "Optimize Keyframe"
IDS_REPLICATE_NAME "Replicate"
IDS_SITEOBJECT_NAME "Site object"
IDS_LEGMIRROR_NAME "Animation Utils"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_PARAMS "Parameters"
IDS_DB_SITEOBJECT "Site"
IDS_DB_SITE_HELPER "Site Object"
IDS_DB_PARAMETERS "Site Parameters"
IDS_EAST_MARK "E"
IDS_WEST_MARK "W"
IDS_NORTH_MARK "N"
IDS_SOUTH_MARK "S"
IDS_DB_CVOBJECT "cv_"
IDS_DB_CV_HELPER "C.V."
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_HILLADJUST_NAME "Hill Adjust"
IDS_ARMATUREEXP_NAME "Armature Exporter"
IDS_ERFEXP_NAME "Erf Exporter"
IDS_BATCHEXP_NAME "Batch Exporter"
IDS_FALLTOOL_NAME "Fall Tool"
IDS_SKELETONVERIFY_NAME "Check For Errors"
IDS_CVOBJECT_NAME "Collision Vlm."
IDS_CVEXP_NAME "CV Exporter"
IDS_CVTOOL_NAME "Collision Volume Tool"
IDS_MLREXP_NAME "MLR Exporter"
IDS_EBFEXP_NAME "EBF Exporter"
IDS_LIGHTEXP_NAME "Light Exporter"
IDS_ERFIMP_NAME "Erf Importer"
IDS_MISSIONIMP_NAME "Mission Contents Importer"
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// French (France) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
#ifdef _WIN32
LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
"#define _AFX_NO_OLE_RESOURCES\r\n"
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
"\r\n"
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)\r\n"
"#ifdef _WIN32\r\n"
"LANGUAGE 9, 1\r\n"
"#pragma code_page(1252)\r\n"
"#endif\r\n"
"#include ""res\\AnimationSuite.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
"#include ""l.fra\\afxres.rc"" // Standard components\r\n"
"#endif\0"
END
#endif // APSTUDIO_INVOKED
#endif // French (France) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
#ifdef _WIN32
LANGUAGE 9, 1
#pragma code_page(1252)
#endif
#include "res\AnimationSuite.rc2" // non-Microsoft Visual C++ edited resources
#include "l.fra\afxres.rc" // Standard components
#endif
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
@@ -0,0 +1,517 @@
//===========================================================================//
// File: ArmatureExp.cpp
// Project: MechWarrior 4
// Contents: Plugin to adjust height of max anmiations
//---------------------------------------------------------------------------//
// Date Who Modification //
// -------- --- ---------------------------------------------------------- //
// 04/28/99 TAS Initial coding,
//---------------------------------------------------------------------------//
// Copyright (C) 1999, Fasa Interactive, Inc.
// All Rights reserved worldwide
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL
//===========================================================================//
#include "stdafx.h"
#include <GameOS\GameOS.hpp>
#include <GameOs\TooLOS.hpp>
#include "MaxProxies\MaxProxyHeaders.hpp"
#include "Proxies\ProxyHeaders.hpp"
#include <proxies\optimizeflatshading.hpp>
#include "ExportUtil.h"
#if !defined(DLLPLATFORM_DLLPLATFORM_HPP)
#include "DLLPlatform\DLLPlatform.hpp"
#endif
#ifdef STRICT // Already defined by stdafx,
#undef STRICT // so we avoid warning linking msg
#endif
#ifdef _MBCS // The same as above
#undef _MBCS
#endif
#include "ArmatureExport.h"
//undef Verify
#ifndef _DEBUG //This is a hack To make it link in Release
#undef Spew
//void Spew() {}
#endif
//===========================================================================//
int ArmatureExp::DoExport(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts)
{
int return_value;
__try
{
return_value = m_Expt.DoExportWrap(name, ei, i, suppressPrompts);
//return_value = true;
GetSystemSetting(SYSSET_CLEAR_UNDO);
Verify(!theHold.Holding());
}
__except(ProcessException(GetExceptionInformation()))
{
}
return return_value;
}
//===========================================================================//
int ArmatureExporter::DoExportWrap(const TCHAR *name,ExpInterface *ei,Interface *ip, BOOL suppressPrompts,bool firstwrite)
{
m_first_write=firstwrite;
StartExport(ip, CString("Exporting Armature data."), suppressPrompts?true:false);
MAXProxies::MAXScene *max_scene = MakeMaxScene(ip,m_strHintFile);
//
// fill in all the directories
//
if (!LoadPlugCfg(ip))
return false;
// Check for errors
if (!CheckForErrors(max_scene,ip))
{
return false;
}
// Load settings
m_exportInfo.exportType = EXPORT_CHARACTER;
m_exportInfo.outputAmatureFile = true;
m_exportInfo.overwriteTextures = false;
SaveExportInfo(max_scene->GetProxiedScene());
//
// set up some name and path stuff
//
TSTR filename, extension;
TSTR fullpath = _T(name);
TSTR directoryPath;
SplitFilename(fullpath,&directoryPath,&filename,&extension);
directoryPath += "\\";
//
// write out the armarture file and content file
//
WriteOutArmatureFile(CString(directoryPath),CString(filename),max_scene->GetProxiedScene());
WriteOutContentFile(CString(directoryPath),CString(filename),max_scene->GetProxiedScene());
WriteOutGeometry_Video_Data_Files(CString(directoryPath), max_scene->GetProxiedScene());
EndExport(ip);
return true;
}
/*******************************************************************************
/* function name: WriteOutContentFile
/* description:
/*******************************************************************************/
int ArmatureExporter::WriteOutContentFile(const CString& directoryPath, const CString& filename, INode *node)
{
Check_Pointer(Stuff::FileStreamManager::Instance);
CString content_filename = directoryPath;
content_filename += filename;
content_filename += ".contents";
//if ( gos_DoesFileExist(content_filename) ) return 0;
Stuff::NotationFile content_file;
CString armature_filename ;
armature_filename += filename;
armature_filename += ".armature";
Page *page = content_file.SetPage("Includes");
Check_Object(page);
page->AppendEntry("!include",armature_filename);
TraverseTreeContent(node,&content_file);
content_file.SaveAs(content_filename);
return 0;
}
/*******************************************************************************
/* function name: TraverseTreeContent
/* description:
/*******************************************************************************/
int ArmatureExporter::TraverseTreeContent(INode *node, Stuff::NotationFile *content_file)
{
for (int c = 0; c < node->NumberOfChildren(); c++) {
TraverseTreeContent(node->GetChildNode(c),content_file);
INode *child = node->GetChildNode(c);
CString name=child->GetName();
name.MakeLower();
name.Replace(' ', '_');
CString prefix =name.Left(name.Find("_",0));
if (!IsNodeCamera(child))
{
if (!(IsNodeGeometry(child)) && (!prefix.CompareNoCase("joint") || !prefix.CompareNoCase("site")))
{
Page *page = content_file->SetPage(name);
Check_Object(page);
if(name.Right(5).CompareNoCase("ankle")==NULL)
{
page->SetEntry("Model","basic.data");
page->AppendEntry("ExecutionState","AlwaysExecuteState");
CString cname=name.Left(name.GetLength()-5)+"below"+name.Right(5);
page = content_file->SetPage(cname);
page->SetEntry("Model","basic.data");
page->AppendEntry("ExecutionState","AlwaysExecuteState");
name=cname;
page = content_file->GetPage(name);
}
else if (name.Right(4).CompareNoCase("cage")==NULL)
{
page->SetEntry("Model","armaturedata\\joint_cage.data");
page->AppendEntry("ExecutionState","AlwaysExecuteState");
}
else
{
page->SetEntry("Model","basic.data");
page->AppendEntry("ExecutionState","AlwaysExecuteState");
}
//
// now write out the list of children
//
CString data_filename = "basic.data";
int number_children = child->NumberOfChildren();
for (int y=0; y < number_children; y++)
{
INode* sib = child->GetChildNode(y);
if (sib)
{
CString sib_name = sib->GetName();
sib_name.Replace(' ', '_');
if (IsNodeGeometry(sib) && !IsNodePartOfGroupGeometry(sib))
{
data_filename = "armaturedata\\";
data_filename += sib_name;
data_filename += ".data";
break;
}
else if (y == child->NumberOfChildren()-1)
{
data_filename = "basic.data";
}
}
}
if (name.Find("joint_cage")>=0)
data_filename = "armaturedata\\joint_cage.data";
for (int z=0; z < number_children; z++)
{
INode* sib = child->GetChildNode(z);
if (sib)
{
if ( !prefix.CompareNoCase("joint") || !prefix.CompareNoCase("site"))
page->SetEntry("Model",data_filename);
}
}
}
}
}
return 0;
}
/*******************************************************************************
/* function name: WriteOutGeometry_Video_Data_Files
/* description: Write out armaturedata\.data files and armaturevideo\*.video files
/* for all the geometries in a skeleton max file
/*******************************************************************************/
int ArmatureExporter::WriteOutGeometry_Video_Data_Files(
const CString& directoryPath, INode *node, const CString& strCage, bool bSetUniqueYes)
{
for (int c = 0; c < node->NumberOfChildren(); c++)
{
WriteOutGeometry_Video_Data_Files(directoryPath, node->GetChildNode(c), strCage, bSetUniqueYes);
INode *child = node->GetChildNode(c);
CString name = child->GetName();
name.MakeLower();
name.Replace(' ', '_');
if ((!IsNodeCamera(child) && IsNodeGeometry(child) && !IsNodePartOfGroupGeometry(child)) ||
name.Find("joint_cage")>=0)
{
CString data_filename = directoryPath;
data_filename += "armaturedata\\";
gos_CreateDirectory( data_filename );
data_filename += name;
data_filename += ".data";
CString video_holder_name = "armaturevideo\\";
video_holder_name += name;
video_holder_name += ".video";
//
// make the stream for the data file and create the file
//
Stuff::NotationFile data_file;
Page *page = data_file.SetPage("GameData");
Check_Object(page);
page->SetEntry("Class","MechWarrior4::MWMover");
page = data_file.SetPage("Renderers");
Check_Object(page);
page->SetEntry("VideoRenderer",video_holder_name);
data_file.SaveAs(data_filename);
// Get the light erf's name
TurnOffExceptions();
INode *lightNode = GetLightNode(child);
CString lightFileName = "";
if (lightNode) {
CString lightName = lightNode->GetName();
lightName.MakeLower();
lightName.Replace(' ', '_');
lightFileName = lightName + ".erf";
}
TurnOnExceptions();
// Don't write out .video files for lights and KEEP_ nodes
if (name.Find("light", 0)<0 && name.Find("keep_", 0)<0) {
CString video_filepath = directoryPath;
video_filepath += "armaturevideo\\";
gos_CreateDirectory( video_filepath );
GeoExporter exp(NULL);
// Get the root erf's names
RootGeo rootGeos[MAX_PATH];
int numOfRootGeos = 1;
rootGeos[0].name=name;
rootGeos[0].type="ShapeComponent";
// Get all the geometries which are going into this video file
// and call GeoExporter's method to do the work
exp.GetRootGeos(directoryPath, rootGeos, &numOfRootGeos, node);
exp.WriteOutGeometry_Video_Data_Files(
directoryPath, "armaturevideo\\"+ name, strCage,
lightFileName, rootGeos, numOfRootGeos, bSetUniqueYes);
}
}
}
return 0;
}
/*******************************************************************************
/* function name: WriteOutArmatureFile
/* description:
/*******************************************************************************/
int ArmatureExporter::WriteOutArmatureFile(const CString& directoryPath, const CString& filename, INode *node)
{
CString armature_filename = directoryPath;
armature_filename += filename;
armature_filename += ".armature";
Check_Pointer(Stuff::FileStreamManager::Instance);
Stuff::NotationFile armature_file;
TraverseTree(node,&armature_file);
Page *page = armature_file.SetPage("");
Check_Object(page);
page->AppendEntry("!concatenate", "true");
armature_file.SaveAs(armature_filename);
return 0;
}
/*******************************************************************************
/* function name: GetLocalToParent
/* description:
/*******************************************************************************/
bool ArmatureExporter::GetLocalToParent(INode *node, Stuff::LinearMatrix4D *matrix)
{
Check_Pointer(matrix);
Matrix3 myTM = node->GetNodeTM(0,NULL);
Matrix3 parentTM = node->GetParentTM(0);
// Matrix3 objectTM = node->GetObjectTM(0,NULL);
Matrix3 mat = myTM * Inverse(parentTM);
//
// now that we have the local in max space let
// get the offset in max space and make them
// our space
//
Point3 offset_trans = node->GetObjOffsetPos();
Quat offset_rot = node->GetObjOffsetRot();
Stuff::Point3D offset_translation;
offset_translation=ConvertMaxToMW(offset_trans);
Stuff::UnitQuaternion offset_rotation;
offset_rotation=ConvertMaxToMW(offset_rot);
Stuff::LinearMatrix4D offset_matrix = Stuff::LinearMatrix4D::Identity;
offset_matrix.BuildRotation(offset_rotation);
offset_matrix.BuildTranslation(offset_translation);
//
// now decompose the max matrix and make our linear matrix
//
AffineParts parts;
decomp_affine(mat, &parts);
Stuff::Point3D translation;
translation=ConvertMaxToMW(parts.t);
Stuff::UnitQuaternion rotation;
rotation=ConvertMaxToMW(parts.q);
Stuff::LinearMatrix4D local_matrix = Stuff::LinearMatrix4D::Identity;
local_matrix.BuildRotation(rotation);
local_matrix.BuildTranslation(translation);
matrix->Multiply(offset_matrix,local_matrix);
return *matrix != Stuff::LinearMatrix4D::Identity;
}
/*******************************************************************************
/* function name: TraverseTree
/* description: Traverse the armature hierarchy
/*******************************************************************************/
int ArmatureExporter::TraverseTree(INode *node, Stuff::NotationFile *armature_file)
{
for (int c = 0; c < node->NumberOfChildren(); c++) {
TraverseTree(node->GetChildNode(c),armature_file);
INode *child = node->GetChildNode(c);
CString name =child->GetName();
name.Replace(' ', '_');
name.MakeLower();
CString prefix = name.Left(name.Find("_",0));
if (!IsNodeCamera(child))
{
if (!(IsNodeGeometry(child)) && (!prefix.CompareNoCase("joint") || !prefix.CompareNoCase("site")))
{
Page *page = armature_file->SetPage(name);
Check_Object(page);
if (child->GetParentNode()->IsRootNode())
{
page->AppendEntry("AttachedToRoot","true");
}
//
// now get the matrix
//
Stuff::LinearMatrix4D mat;
GetLocalToParent(child,&mat);
if(mat!=Stuff::LinearMatrix4D::Identity)
{
Stuff::UnitQuaternion quat_angle;
quat_angle = mat;
Stuff::YawPitchRoll ypr_angle;
ypr_angle=quat_angle;
if(Stuff::Close_Enough(ypr_angle.yaw ,0.0f,0.0001f))
ypr_angle.yaw = 0.0;
if(Stuff::Close_Enough(ypr_angle.pitch ,0.0f,0.0001f))
ypr_angle.pitch = 0.0;
if(Stuff::Close_Enough(ypr_angle.roll ,0.0f,0.0001f))
ypr_angle.roll = 0.0;
page->AppendEntry("Rotation" ,ypr_angle);
//
// write out the transform vector
//
Stuff::Point3D transform = Stuff::Point3D(0.0,0.0,0.0);
transform = mat;
if(Stuff::Close_Enough(transform.x ,0.0f,0.0001f))
transform.x = 0.0;
if(Stuff::Close_Enough(transform.y ,0.0f,0.0001f))
transform.y = 0.0;
if(Stuff::Close_Enough(transform.z ,0.0f,0.0001f))
transform.z = 0.0;
page->AppendEntry("Translation",transform);
}
if(name.Right(5).CompareNoCase("ankle")==NULL)
{
CString cname=name.Left(name.GetLength()-5)+"below"+name.Right(5);
page->AppendEntry("Child", (LPCSTR)cname);
name=cname;
page = NULL;
}
//
// now write out the list of children
//
CString data_filename = "basic.data";
int number_children = child->NumberOfChildren();
for (int y=0; y < number_children; y++)
{
INode* sib = child->GetChildNode(y);
if (sib)
{
CString sib_name = sib->GetName();
sib_name.Replace(' ', '_');
if (IsNodeGeometry(sib))
{
data_filename = sib_name;
data_filename += ".data";
break;
}
else if (y == child->NumberOfChildren()-1)
{
data_filename = "basic.data";
}
}
}
for (int z=0; z < number_children; z++)
{
INode* sib = child->GetChildNode(z);
if (sib)
{
CString sibname= sib->GetName();
CString sibprefix=sibname.Left(sibname.Find("_",0));
//armature_file->SetEntry(name,"Model",data_filename);
if (!IsNodeGeometry(sib) && (!sibprefix.CompareNoCase("joint") || !sibprefix.CompareNoCase("site")))
{
CString sib_name = sib->GetName();
sib_name.Replace(' ', '_');
if (!page)
page = armature_file->SetPage(name);
page->AppendEntry("Child", (const char *)sib_name);
}
}
}
}
}
}
return 0;
}
@@ -0,0 +1,101 @@
//===========================================================================//
// File: ArmatureExport.h
// Project: MechWarrior 4
// Contents: Plugin to adjust height of max anmiations
//---------------------------------------------------------------------------//
// Date Who Modification //
// -------- --- ---------------------------------------------------------- //
// 04/28/99 TAS Initial coding,
//---------------------------------------------------------------------------//
// Copyright (C) 1999, Fasa Interactive, Inc.
// All Rights reserved worldwide
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL
//===========================================================================//
#if !defined(AFX_ARMEXPORT_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_)
#define AFX_ARMEXPORT_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
class ArmatureExporter;
class LODArmatureExporter;
#include "AnimationSuite.h"
#include "GeoExport.h"
class ArmatureExporter: public GeoExporter
{
public:
ArmatureExporter(const char *str): GeoExporter(str), m_first_write(true) {}
~ArmatureExporter() {}
int WriteOutArmatureFile(const CString& path, const CString& filename, INode *node);
int WriteOutContentFile(const CString& path, const CString& filename, INode *node);
int WriteOutGeometry_Video_Data_Files(const CString& directoryPath, INode *node, const CString& strCage="", bool bSetUniqueYes=false);
int DoExportWrap(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts=FALSE,bool firstwrite=true);
private:
bool m_first_write;
bool GetLocalToParent(INode *node, Stuff::LinearMatrix4D *matrix);
int TraverseTreeContent(INode *node, Stuff::NotationFile *armature_file);
int TraverseTree(INode *node, Stuff::NotationFile *armature_file);
};
#define MAXLODLEVELS 256
class MeshInfo
{
public:
CString MeshName;
Stuff::LinearMatrix4D ObjectToWorld;
};
class ArmatureExp : public SceneExport
{
protected:
ArmatureExporter m_Expt;
public:
ArmatureExp() : m_Expt("") {}
~ArmatureExp() {}
int ExtCount() { return 1; }
const TCHAR * Ext(int n) {
switch(n) {
case 0:
// This cause a static string buffer overwrite
// return GetString(IDS_EXTENSION1);
return _T("armature");
}
return _T("");
}
const TCHAR * LongDesc() { return GetString(IDS_LONGDESC); }
const TCHAR * ShortDesc() { return _T("MW4 Armature"); }
const TCHAR * AuthorName() { return _T("Jerry Edsall,Thomas Steinke"); }
const TCHAR * CopyrightMessage() { return GetString(IDS_COPYRIGHT); }
const TCHAR * OtherMessage1() { return _T(""); }
const TCHAR * OtherMessage2() { return _T(""); }
unsigned int Version() { return 100; }
void ShowAbout(HWND hWnd) {
CAbout dlg;
dlg.DoModal();
}
int DoExport(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts=FALSE);
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_ANIMEXPORT_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_)
@@ -0,0 +1,388 @@
// BaseGeoExporter.cpp: implementation of the BaseGeoExporter class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "BaseGeoExport.h"
#include <GameOS\GameOS.hpp>
#include <GameOS\ToolOS.hpp>
#include "MaxProxies\MaxProxyHeaders.hpp"
#include "ExportUtil.h"
#if !defined(DLLPLATFORM_DLLPLATFORM_HPP)
#include "DLLPlatform\DLLPlatform.hpp"
#endif
// Used by the MLRTexturePoolProxy
extern bool g_bSaveTextureAsPng;
extern CString g_strLogFile;
/*******************************************************************************
/* function name: LoadPlugCfg
/* description: Load exporter settings from plugins.ini from the 3dsmax directory
/*******************************************************************************/
bool BaseGeoExporter::LoadPlugCfg(Interface *i)
{
TurnOffExceptions();
m_maxDataPath = i->GetDir(APP_PLUGCFG_DIR);
TSTR ini_file = m_maxDataPath;
ini_file += "\\Plugins.ini";
Check_Pointer(Stuff::FileStreamManager::Instance);
Stuff::FileStream file_stream(ini_file);
if (!file_stream.IsFileOpened())
{
if (!m_suppress) {
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
ReportError(CString("ERROR: Must have the PlugIns.ini file in ")+m_maxDataPath);
}
i->ProgressEnd();
TurnOnExceptions();
return false;
}
Stuff::NotationFile data_file(&file_stream);
const char* read_dir;
Page* page = data_file.FindPage("BRBData");
if (page)
{
page->GetEntry("GameDir", &read_dir);
}
else {
read_dir = "c:\\dev\\mw4";
}
m_texturePath = CString(read_dir)+"\\content\\textures\\";
g_strLogFile = CString(read_dir)+"\\export.log";
// set default to false, consistent with batch exporter
m_exportDataFiles = false;
page = data_file.FindPage("ExportData");
if (page)
{
if (page->GetEntry("ErfDir", &read_dir))
{
m_erfPath = read_dir;
m_erfPath += "\\";
}
if (page->GetEntry("TextureDir", &read_dir) && !m_isBRB)
{
m_texturePath = read_dir;
m_texturePath += "\\";
}
page->GetEntry("ExportDataFiles", &m_exportDataFiles);
page->GetEntry("TextureAsPng", &g_bSaveTextureAsPng);
}
// Make sure texture path exists
bool texture_dir_exists =
gos_CreateDirectory(
m_texturePath
);
TurnOnExceptions();
return true;
}
/*******************************************************************************
/* function name: SaveExportInfo
/* description:
/*******************************************************************************/
bool BaseGeoExporter::SaveExportInfo(INode *node)
{
INode *data_node = node;
ExportInfo savedExportInfo = m_exportInfo;
bool bNeedToSave = false;
//
// first check to see if the data is where it is suppose to be
//
if (node->IsRootNode())
{
int i = node->NumberOfChildren();
if (i>0)
{
data_node = node->GetChildNode(0);
//
// Grab the app data chunk
//
AppDataChunk *ad =
data_node->GetAppDataChunk(
EXPORTINFO_CLASS_ID,
EXPORTINFO_SUPER_CLASS_ID,
PERM_DATA_ID);
//
// if the data is there copy it and move on if not
// search the tree for it. If found copy it to where it
// should be and remove the old one
//
if (ad)
{
size_t size = sizeof(ExportInfo);
Mem_Copy(&savedExportInfo, ad->data, size, size);
}
else
{
bNeedToSave = true;
INode *find_node = FindChunk(node);
if (find_node)
{
AppDataChunk *ad =
find_node->GetAppDataChunk(
EXPORTINFO_CLASS_ID,
EXPORTINFO_SUPER_CLASS_ID,
PERM_DATA_ID);
size_t size = sizeof(ExportInfo);
Mem_Copy(&savedExportInfo, ad->data, size, size);
//
// Remove the chunk if it exists
//
find_node->RemoveAppDataChunk(
EXPORTINFO_CLASS_ID,
EXPORTINFO_SUPER_CLASS_ID,
PERM_DATA_ID);
}
}
}
}
if ((bNeedToSave) ||
(m_exportInfo.exportType != savedExportInfo.exportType) ||
(m_exportInfo.overwriteTextures != savedExportInfo.overwriteTextures) ||
(m_exportInfo.outputAmatureFile != savedExportInfo.outputAmatureFile) )
{
return InternalSaveExportInfo(node);
}
return true;
}
/*******************************************************************************
/* function name: InternalSaveExportInfo
/* description:
/*******************************************************************************/
bool BaseGeoExporter::InternalSaveExportInfo(INode *node)
{
INode *data_node = node;
if (node->IsRootNode())
{
int i = node->NumberOfChildren();
if (i>0)
{
data_node = node->GetChildNode(0);
}
else
{
return false;
}
}
//
// Remove the chunk if it exists
//
data_node->RemoveAppDataChunk(
EXPORTINFO_CLASS_ID,
EXPORTINFO_SUPER_CLASS_ID,
PERM_DATA_ID);
size_t size = sizeof(ExportInfo);
BYTE *data = new BYTE[size];
Mem_Copy(data, &m_exportInfo, sizeof(ExportInfo), size);
//
// Add a chunk
//
data_node->AddAppDataChunk(
EXPORTINFO_CLASS_ID,
EXPORTINFO_SUPER_CLASS_ID,
PERM_DATA_ID,
size, data);
SetSaveRequired(TRUE);
return true;
}
/*******************************************************************************
/* function name: ExportMaxScene
/* description: Exports a max scene to an erf file
/*******************************************************************************/
int BaseGeoExporter::ExportMaxScene(MAXProxies::MAXScene *max_scene, Interface *ip, const TCHAR *name)
{
Check_Object(max_scene);
// Load settings
m_exportInfo.exportType = EXPORT_SHAPE;
m_exportInfo.outputAmatureFile = false;
m_exportInfo.overwriteTextures = true;
SaveExportInfo(max_scene->GetProxiedScene());
//
// set up some name and path stuff
//
TSTR filename, extension;
TSTR fullpath = _T(name);
TSTR directoryPath;
SplitFilename(fullpath,&directoryPath,&filename,&extension);
directoryPath += "\\";
//
// see if the erf file already exists
//
CString erf_file_name = directoryPath + m_erfPath + filename + ".erf";
bool file_exists = gos_DoesFileExist(erf_file_name);
if (file_exists)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
gos_DeleteFile(erf_file_name);
}
//
// if we are exporting the character do the following
// or fall threw and export a fused mesh called a shape
//
TSTR shape_filename = filename + extension;
CString set_filename = directoryPath + shape_filename;
ElementProxies::ElementSceneProxy *element_scene = InitElementScene(CString(m_texturePath));
CopySceneMaxToElement(element_scene,max_scene,true,ip,m_progress,m_suppress);
FuseElementScene(element_scene,ip,m_progress,m_suppress);
OptimizeElementScene(element_scene);
// Set some special modes for lights,
// so that they don't pick up fog, and are self-illuminated
CString temp(name);
temp.MakeLower();
if (temp.Find("light") >= 0)
{
SetExplicitAlphaMode(element_scene, MidLevelRenderer::MLRState::AlphaOneMode);
SetExplicitLightingMode(element_scene, MidLevelRenderer::MLRState::LightingOffMode);
SetExplicitFogMode(element_scene, StateProxy::LightFogMode);
}
return SaveElementScene(element_scene,set_filename);
}
/*******************************************************************************
/* function name: CheckForErrors
/* description: method does the error checking set up by JM
/*******************************************************************************/
bool BaseGeoExporter::CheckForErrors(MAXProxies::MAXScene *scene, Interface *i, bool bProgressEnd)
{
//
// Now check the the data for errors
//
TurnOffExceptions();
if (!m_suppress) i->ProgressUpdate(++m_progress,false,"Checking for errors.");
TurnOnExceptions();
Stuff::NotationFile config_file(Stuff::MString(m_maxDataPath)+"\\PlugIns.ini");
MAXProxies::FindMAXErrors process_errors(&config_file,i,m_progress,m_suppress,(LPVOID)&ReportError);
if (scene->FindErrors(&process_errors)>0) {
if (bProgressEnd) {
TurnOffExceptions();
i->ProgressEnd();
TurnOnExceptions();
}
if (!m_suppress)
{
ReportError(CString(i->GetCurFileName())+": Found Data Errors: EXPORT FAILED!",m_suppress);
}
return false;
}
if (!m_suppress)
{
m_progress += 9;
TurnOffExceptions();
i->ProgressUpdate(++m_progress,false,"Error checks complete");
TurnOnExceptions();
}
return true;
}
/*******************************************************************************
/* function name: StartExport
/* description: Helper function
/*******************************************************************************/
void BaseGeoExporter::StartExport(Interface *ip, CString& str, bool bSuppressPrompts)
{
TurnOnExceptions();
AFX_MANAGE_STATE(AfxGetStaticModuleState());
m_suppress = bSuppressPrompts;
m_progress = 0;
LPVOID arg = NULL;
if (!m_suppress)
{
TurnOffExceptions();
ip->ProgressStart(str.GetBuffer(0), false, fn, arg);
str.ReleaseBuffer();
ip->ProgressUpdate(++m_progress,false,"");
TurnOnExceptions();
}
}
/*******************************************************************************
/* function name: EndExport
/* description: Helper function
/*******************************************************************************/
void BaseGeoExporter::EndExport(Interface *ip)
{
TurnOffExceptions();
if (!m_suppress)
{
ip->ProgressEnd();
}
}
/*******************************************************************************
/* function name: UpdateProgress
/* description: Helper function
/*******************************************************************************/
void BaseGeoExporter::UpdateProgress(Interface *ip, int progress, CString& str)
{
if (!m_suppress)
{
TurnOffExceptions();
m_progress = progress;
ip->ProgressUpdate(m_progress, false, str.GetBuffer(0));
str.ReleaseBuffer();
TurnOnExceptions();
}
}
/*******************************************************************************
/* function name: FindChunk
/* description:
/*******************************************************************************/
INode *BaseGeoExporter::FindChunk(INode *node)
{
for (int c = 0; c < node->NumberOfChildren(); c++)
{
FindChunk(node->GetChildNode(c));
INode *child = node->GetChildNode(c);
TCHAR *name = child->GetName();
AppDataChunk *ad =
child->GetAppDataChunk(
EXPORTINFO_CLASS_ID,
EXPORTINFO_SUPER_CLASS_ID,
TEMP_DATA_ID
);
if (ad) return child;
}
return NULL;
}
@@ -0,0 +1,81 @@
// 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_)
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,144 @@
//===========================================================================//
// File: BatchExp.h
// Project: MechWarrior 4
// Contents: Plugin to adjust height of max anmiations
//---------------------------------------------------------------------------//
// Date Who Modification //
// -------- --- ---------------------------------------------------------- //
// 04/28/99 JSE Initial coding,
// 05/10/00 fwang
//---------------------------------------------------------------------------//
// Copyright (C) 1998, Fasa Interactive, Inc.
// All Rights reserved worldwide
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL
//===========================================================================//
#if !defined(AFX_BATCHEXPORT_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_)
#define AFX_BATCHEXPORT_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
class BatchExp;
#include "AnimationSuite.h"
#include "ArmatureExport.h"
#include <Stuff\StuffHeaders.hpp>
class LODNODE
{
public:
LODNODE();
~LODNODE();
CString name;
LODNODE *pChild;
LODNODE *pNext;
};
class BatchExp : public SceneExport
{
public:
BatchExp():m_exp("") {}
~BatchExp() {}
int ExtCount() { return 1; }
const TCHAR * Ext(int n)
{
switch(n) {
case 0:
// This cause a static string buffer overwrite
// return GetString(IDS_EXTENSION1);
return _T("Batch");
}
return _T("");
}
const TCHAR * LongDesc() { return GetString(IDS_LONGDESC); }
const TCHAR * ShortDesc() { return _T("MW4 Batch"); }
const TCHAR * AuthorName() { return _T("Jerry Edsall,Thomas Steinke"); }
const TCHAR * CopyrightMessage() { return GetString(IDS_COPYRIGHT); }
const TCHAR * OtherMessage1() { return _T(""); }
const TCHAR * OtherMessage2() { return _T(""); }
unsigned int Version() { return 100; }
void ShowAbout(HWND hWnd) {
CAbout dlg;
dlg.DoModal();
}
int DoExport(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts=FALSE);
int DoExportWrap(const TCHAR *name,ExpInterface *ei,Interface *i, bool suppressPrompts=FALSE);
typedef enum ALIGNFLAG {AlignX=1, AlignY=2} ALIGNFLAG;
protected:
CString m_export_directory;
int m_current_export;
int m_total_exports;
Interface *m_ip;
bool m_bIsChar;
ALIGNFLAG m_billBoardAlign;
int m_nBillBoardStartLOD;
BaseGeoExporter m_exp;
bool m_bLogStates;
bool m_bFlatShading;
bool m_bSetUniqueYes;
private:
int EditPage(Page *page);
int ExportPage(Page *page, Page *log_page=NULL);
int ExportShape(Page *page, Page *log_page=NULL);
int ExportObb(Page *page, Page *log_page=NULL);;
int ExportLODShape(Page *page, Page *log_page=NULL);
int ExportLODSkel(Page *page, Page *log_page=NULL);
int ExportChar(Page *page, Page *log_page=NULL);
int ExportAnim(Page *page, Page *log_page=NULL);
int ExportMLRShape(Page *page, Page *log_page=NULL);
int ExportBuildingData(Page *page);
int ExportBuildingDamage(Page *page);
int ExportBuildingSubsystems(Page *page);
int ExportBuildingTorso(Page *);
int ExportBuildingInstance(Page *page);
int ExportMechData(Page *page);
int ExportMechSubsystems(Page *page);
int ExportMechDamage(Page *page);
int ExportMechInstance(Page *page);
int ExportVehicleData(Page *page);
int ExportVehicleDamage(Page *page);
int ExportVehicleSubsystems(Page *page);
int ExportVehicleTorso(Page *page);
int ExportVehicleInstance(Page *pagepage);
int WriteDataFile(int resourceID, CString fileName, CString strReplace);
bool LoadPlugCfg(Interface *i);
bool MakeLightLODAndRemoveFromScene(CString file_name, CString strHintFile, CMapWordToPtr* lightLOD, int iLod);
int SaveMapLOD(CMapWordToPtr *,CString *,const CString&,Page *log_page=NULL);
int MakeMapLOD(CString,int totalLODs,CString LodNames[MAXLODLEVELS],CString levels[MAXLODLEVELS],CString strHintFile,CMapStringToPtr *pTransInfo,CString strExtension,Page *log_page=NULL,CString strContains="");
int MakeAllLODMeshs(CString,Proxies::GenericProxy *proxy,Interface *ip,CMapStringToOb *pMapNames,int iLod,CMapStringToPtr *pTransInfo,CString strContains="");
int WriteOutLODMesh(CString,Proxies::GenericProxy *proxy, Interface *ip,CMapStringToOb *pMapNames,int iLod,CMapStringToPtr *pTransInfo);
void WriteOBBInfo(Page* newpage, CString name);
int MakeMegaTexture(CString strHintFile, CString hint);
int CoalesceMegaTexture(MAXProxies::MAXScene *max_scene, ElementProxies::ElementSceneProxy *element_scene, CString hint);
const CString GetMegaTextureHint(const CString& pagename);
const CString GetDamagedMegaTextureHint(const CString& pagename);
void LoadBillBoardInfo(Page* page);
int GetEntryList(Page* page, const CString& entryName, CString entries[]);
int GetEntryList(Page* page, const CString& entryName, int entries[]);
void WriteSummary(Stuff::NotationFile *pLogFile);
void LogStats(int ilod, Stuff::Scalar farDist, MidLevelRenderer::MLRShape *mlrShape, const CString& filename, Page* log_page);
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_ANIMEXPORT_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_)
@@ -0,0 +1,948 @@
//===========================================================================//
// File: CvExport.cpp
// Project: MechWarrior 4
// Contents: Plugin to export Collision Volume objects
//---------------------------------------------------------------------------//
// Date Who Modification //
// -------- --- ---------------------------------------------------------- //
// 07/29/99 jkyle
//---------------------------------------------------------------------------//
// Copyright (C) 1998, Fasa Interactive, Inc.
// All Rights reserved worldwide
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL
//===========================================================================//
#include "stdafx.h"
#ifdef STRICT // Already defined by stdafx,
#undef STRICT // so we avoid warning linking msg
#endif
#ifdef _MBCS // The same as above
#undef _MBCS
#endif
//#include "GeoExporter.h"
#include "cvobject.h"
#include <GameOS\ToolOS.hpp>
#include <Stuff\StuffHeaders.hpp>
#include <adept\adept.hpp>
#include <adept\collisionvolume.hpp>
#include "CvExport.h"
#include <DLLPlatform\DLLPlatform.hpp>
#include "MaxProxies\MaxProxyHeaders.hpp"
#include "mw4.hpp"
#include "ExportUtil.h"
//undef Verify
#ifndef _DEBUG //This is a hack To make it link in Release
#undef Spew
//void Spew() {}
#endif
static CString g_name_WORLD[] = {"joint_SOLID", "joint_WORLD", "cv_SOLID", "cv_WORLD", ""};
static CString g_name_ROOT[] = {"joint_HIERARCHICAL", "joint_ROOT", "cv_HIERARCHICAL", "cv_ROOT",""};
/*******************************************************************************
/* function name: DoExport
/* description:
/*******************************************************************************/
int CvExp::DoExport(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts)
{
int return_value;
__try
{
return_value = DoExportWrap(name, ei, i, suppressPrompts);
//return_value = true;
GetSystemSetting(SYSSET_CLEAR_UNDO);
Verify(!theHold.Holding());
}
__except(ProcessException(GetExceptionInformation()))
{
}
return return_value;
}
/*******************************************************************************
/* function name: DoExportWrap
/* description:
/*******************************************************************************/
int CvExp::DoExportWrap(const TCHAR *name,ExpInterface *ei,Interface *ip, BOOL suppressPrompts)
{
m_exp.StartExport(ip, CString("Exporting OBB data."), suppressPrompts?true:false);
m_ip = ip;
// Load stuff from plugins.ini
if (!LoadPlugCfg(ip))
return false;
bool bOBBSaved = false;
MaxCollisionVolume *pSolidCv = NULL;
MaxCollisionVolume *pHierarchicalCv = NULL;
m_exp.UpdateProgress(ip, 0, CString("Constructing cv hierarchy."));
ConstructCVs(ip, &pSolidCv, &pHierarchicalCv, suppressPrompts?true:false, m_bRemapMaterial);
// delete the existing obb file
if (::gos_DoesFileExist(name)) {
::gos_DeleteFile(name);
}
// save the hierarchical obb if found
if (pHierarchicalCv) {
m_exp.UpdateProgress(ip, 30, CString("Saving hierarchical cv."));
SaveHierarchicalOBB(name, pHierarchicalCv);
bOBBSaved = true;
Unregister_Object(pHierarchicalCv);
delete pHierarchicalCv;
pHierarchicalCv = NULL;
}
// save the solid obb if found
if (pSolidCv) {
m_exp.UpdateProgress(ip, 60, CString("Saving solid cv."));
pSolidCv = OptimizeCV(pSolidCv);
SaveSolidOBB(name, pSolidCv);
bOBBSaved = true;
Unregister_Object(pSolidCv);
delete pSolidCv;
pSolidCv = NULL;
}
// No obb has been saved
if (!bOBBSaved) {
ReportError(CString(name)+": Does not contain any collision volumes",suppressPrompts?true:false);
}
else if (m_bRemapMaterial) {
ip->FileSave();
}
m_exp.EndExport(ip);
return true;
}
/*******************************************************************************
/* function name: SaveSolidOBB
/* description: save the solid OBB for collision
/*******************************************************************************/
bool CvExp::SaveSolidOBB(const TCHAR *name, MaxCollisionVolume *pCv)
{
// create the Solid obb;
char drive[MAX_PATH];
char path[MAX_PATH];
char fname[MAX_PATH];
char fext[MAX_PATH];
_splitpath(name,drive,path,fname,fext);
char solid_file_name[MAX_PATH];
if (m_bUseNewNames) {
sprintf(solid_file_name,"%s%s%s_SOLID%s",drive,path,fname,fext);
}
else{
sprintf(solid_file_name,"%s%s%s%s",drive,path,fname,fext);
// if name is already used to save the hierarchical obb
// then save solid obb as object_SOLID.obb
if (::gos_DoesFileExist(name)) {
sprintf(solid_file_name,"%s%s%s_SOLID%s",drive,path,fname,fext);
}
}
// now we want the cv_root and the joint_root.
MaxCollisionVolume* cv_world = NULL;
MaxCollisionVolume* joint_world = NULL;
for (int i=0; g_name_WORLD[i]!= ""; i++) {
if (!joint_world)
joint_world = pCv->FindJointNode(g_name_WORLD[i]);
if (!cv_world)
cv_world = pCv->FindCVNode(g_name_WORLD[i]);
}
if (cv_world && joint_world) {
Check_Object(cv_world);
Check_Object(joint_world);
// transfer all the joint_world children to cv_world and
// and delete from the joint_world;
ChainIteratorOf<Adept::CollisionVolume*> children(&joint_world->m_children);
MaxCollisionVolume *cv;
while((cv = (MaxCollisionVolume*)children.GetCurrent()) != NULL)
{
// don't make a cyclic link
if (cv != cv_world)
{
// this is a stationary object
cv_world->m_children.Add(cv);
}
children.Remove();
}
}
if (!cv_world) {
// this is a flat object
cv_world = pCv;
}
// check to see if cv_world has any children,
// if so, the object is stationary, and cannot be a collider
// also force set GoodEnough flag
ChainIteratorOf<Adept::CollisionVolume*> children(&cv_world->m_children);
if(children.GetCurrent() != NULL) {
cv_world->MakeGoodEnough();
if (m_bUseNewNames)
sprintf(solid_file_name,"%s%s%s_STATIONARY%s",drive,path,fname,fext);
}
Check_Object(cv_world);
FileStream file_stream(solid_file_name,Stuff::FileStream::WriteOnly);
Adept::CollisionVolume::WriteOBBVersion(&file_stream);
cv_world->Save(&file_stream);
file_stream.Close();
if (cv_world!= pCv) delete cv_world;
if (joint_world && joint_world!= pCv) delete joint_world;
return true;
}
/*******************************************************************************
/* function name: SaveHierarchicalOBB
/* description: Save the hierarchial OBB for ray-casting
/*******************************************************************************/
bool CvExp::SaveHierarchicalOBB(const TCHAR *name, MaxCollisionVolume *pCv)
{
// now we want the cv_root and the joint_root.
MaxCollisionVolume* cv_root = NULL;
MaxCollisionVolume* joint_root = NULL;
for (int i=0; g_name_ROOT[i]!= ""; i++) {
if (!joint_root)
joint_root = pCv->FindJointNode(g_name_ROOT[i]);
if (!cv_root)
cv_root = pCv->FindCVNode(g_name_ROOT[i]);
}
if (!cv_root) {
ReportError(CString(name)+": Has no hierarchical collision volume");
return false;
}
Check_Object(cv_root);
if (joint_root) {
Check_Object(joint_root);
// transfer all the joint root children to cv_root and
// and delete from the joint_root;
ChainIteratorOf<Adept::CollisionVolume*> children(&joint_root->m_children);
MaxCollisionVolume *cv;
while((cv = (MaxCollisionVolume*)children.GetCurrent()) != NULL)
{
// don't make a cyclic link
if (cv != cv_root)
{
cv_root->m_children.Add(cv);
}
children.Remove();
}
}
// check to see if cv_root has any children,
// if so, force set GoodEnough flag
ChainIteratorOf<Adept::CollisionVolume*> children(&cv_root->m_children);
if (children.GetCurrent() != NULL) {
cv_root->MakeGoodEnough();
}
//joint root is now "empty"
// and cv_root has all the children
FileStream f(name,Stuff::FileStream::WriteOnly);
Adept::CollisionVolume::WriteOBBVersion(&f);
cv_root->Save(&f);
f.Close();
if (cv_root!= pCv) delete cv_root;
if (joint_root && joint_root!= pCv) delete joint_root;
return true;
}
/*******************************************************************************
/* function name: LoadPlugCfg
/* description: Load additional OBB related settings from the plugin.ini file
/*******************************************************************************/
bool CvExp::LoadPlugCfg(Interface *i)
{
if (!m_exp.LoadPlugCfg(i))
return false;
m_bUseNewNames = false;
m_bRemapMaterial = false;
CString ini_file = m_ip->GetDir(APP_PLUGCFG_DIR);
ini_file += "\\Plugins.ini";
NotationFile inifile(ini_file);
Page* page = inifile.FindPage("OBBData");
if (page)
{
page->GetEntry("RemapMaterial", &m_bRemapMaterial);
page->GetEntry("UseNewNames", &m_bUseNewNames);
}
return true;
}
/*******************************************************************************
/* function name: FindJointNode
/* description: Find a joint node by name
/*******************************************************************************/
MaxCollisionVolume *MaxCollisionVolume::FindJointNode(const char *name)
{
// first pass this could be us!!!
const char *my_name = GetName();
if (my_name != NULL)
{
if (!stricmp(my_name,name) &&
!strnicmp(my_name,"joint_",6))
{
return this;
}
}
ChainIteratorOf<Adept::CollisionVolume*> children(&m_children);
MaxCollisionVolume *cv;
while((cv = (MaxCollisionVolume*)children.ReadAndNext()) != NULL)
{
const char *debug_name = cv->GetName();
if (debug_name != NULL)
{
if (!stricmp(debug_name,name))
{
return cv;
}
}
// if this hasn't returned then we see if one of our children has it
MaxCollisionVolume *found_cv = NULL;
found_cv = cv->FindJointNode(name);
if (found_cv != NULL)
{
return found_cv;
}
}
return NULL;
}
/*******************************************************************************
/* function name: FindCVNode
/* description: Find a CV node by name
/*******************************************************************************/
MaxCollisionVolume *MaxCollisionVolume::FindCVNode(const char *name)
{
// first pass this could be us!!!
if (m_pNode) {
const char *my_name = m_pNode->GetName();
if (my_name != NULL)
{
if (!stricmp(my_name,name) &&
!strnicmp(my_name,"cv_",3))
{
return this;
}
}
}
// otherwise we are searching for the first cv of that joint name
MaxCollisionVolume *joint = FindJointNode(name);
if (joint == NULL)
return NULL;
Check_Object(joint);
ChainIteratorOf<Adept::CollisionVolume*> cv_list(&joint->m_children);
MaxCollisionVolume *cv;
while((cv = (MaxCollisionVolume*)cv_list.ReadAndNext()) != NULL)
{
if (cv->m_localSpaceBounds.sphereRadius > 0.00001)
return cv;
}
return NULL;
}
/*******************************************************************************
/* function name: GetName
/* description:
/*******************************************************************************/
const char* MaxCollisionVolume::GetName()
{
// Note: if the Material == MechWarrior4::MaterialCount then the radius should also be 0
// and a name should be returned
Check_Object(this);
if (this->m_localSpaceBounds.sphereRadius < 0.00001)//MechWarrior4::MaterialCount != this->m_material)
{
ChainIteratorOf<Adept::CollisionVolume*> children(&m_children);
//CollisionVolume *volume;
if (children.ReadAndNext() == NULL)
{
// We have a node here with 0 radius and 0 children. This is an error
ReportError(CString(m_pNode->GetName())+": Collision volume has zero radius and no children");
int x=1;
}
if (m_pNode)
return m_pNode->GetName();
}
return NULL;
}
/*******************************************************************************
/* function name: Contructor
/* description:
/*******************************************************************************/
MaxCollisionVolume::MaxCollisionVolume(INode *pNode, bool bRemapMaterial)
{
m_pNode = pNode;
Object *pObj = pNode->GetObjectRef();
IParamArray *pblock = NULL;
Point3 boxDim(0.0,0.0,0.0);
int material = Adept::MaterialCount;
if (pObj && (pObj->ClassID() == CVOBJECT_CLASS_ID))
{
// Get the Max data
pblock = pObj->GetParamBlock();
pblock->GetValue(CV_MATERIAL,0,(int &)material,FOREVER);
pblock->GetValue(CV_SIZE,0,boxDim,FOREVER);
boxDim *= 0.5;
}
// Transform Max to MechWarrior
Matrix3 mat;
Point3 p;
Quat q;
Point3 s;
Matrix3 TMParentToWorld, TMLocalToWorld, TMLocalToParent;
TMLocalToWorld = pNode->GetNodeTM(0);
// Don't transform cv_ROOT because it will be shuffled to be above joint_WORLD
// DEPENDENCY on MECH EXPORT from exportwrap (above)
if (strnicmp(pNode->GetName(),"cv_ROOT",7))
{
TMParentToWorld = pNode->GetParentTM(0);
TMLocalToParent = TMLocalToWorld*Inverse(TMParentToWorld);
}
else
{
TMLocalToParent = TMLocalToWorld;
}
//
// Because joints move independently but their children don't we end up with a need to flatten the transforms so that no
// matter how deeply nested the collision volumes are, their coordinates are always relative to their parent joint.
//
INode *pParentWalker = NULL;
INode *pParent = pNode->GetParentNode();
pParentWalker = pParent;
while (pParentWalker)
{
//
// Get the transform for this collision volume from it's parent.
//
if (strnicmp(pParentWalker->GetName(),"cv_",3))
{
break;
} // if parentwalker is cv
//
// Multiply this parents transform into the matrix
//
Matrix3 TMParentLocalToWorld, TMParentLocalToParent, TMGrandParentLocalToWorld;
TMParentLocalToWorld = pParentWalker->GetNodeTM(0);
INode * pGrandParent = pParentWalker->GetParentNode();
//
// Our parent may be the scene, and if so, we don't need to go against his parent
//
//
// If we have a grandparent, and it is a CV, add it's LocalToParent to our own
//
if (pGrandParent && !strnicmp(pGrandParent->GetName(), "cv_", 3))
{
TMGrandParentLocalToWorld = pGrandParent->GetNodeTM(0);
TMParentLocalToParent = TMParentLocalToWorld * Inverse(TMGrandParentLocalToWorld);
TMLocalToParent = TMLocalToParent * TMParentLocalToParent;
}
//
// It turns out that for the buildings, the grandparent at this point is the scene, and the scene potentially has
// a transform on it. With the mech, the joint takes care of it, but with the buildings
// we have to special case and go up one additional level to include this transform.
// So we need some check to make sure this is the case.
//
else if (pGrandParent && !strnicmp(pGrandParent->GetName(), "Scene", 5))
{
TMParentLocalToParent = TMParentLocalToWorld ;
TMLocalToParent = TMLocalToParent * TMParentLocalToParent;
}
//
// If we have a GrandParent, but it's not a CV, we don't want to fold in a transform at all
// I can't tell why this is the case, but it seems to work for mech legs and torso's correctly
// when the two cases above don't.
//
// else
// {
// TMParentLocalToParent = TMParentLocalToWorld ;
// TMLocalToParent = TMLocalToParent * TMParentLocalToParent;
// }
pParentWalker = pGrandParent;
}
AffineParts ap;
decomp_affine(TMLocalToParent, &ap);
p = ap.t;
q = ap.q;
// *******Show assert if Scale (s) is not 1.0, 1.0, 1.0*********
Stuff::UnitQuaternion mw_q = ConvertMaxToMW(q);
Stuff::Point3D mw_p = ConvertMaxToMW(p);
Stuff::LinearMatrix4D mw_mat;
mw_mat.BuildRotation(mw_q);
mw_mat.BuildTranslation(mw_p);
//Fill in the CollisionVolume dat
m_entity = NULL;
// Swapped z and y axis
m_localSpaceBounds.axisExtents = ConvertMaxToMW(boxDim);
m_localSpaceBounds.axisExtents.x = (float)fabs(m_localSpaceBounds.axisExtents.x);
m_localSpaceBounds.axisExtents.y = (float)fabs(m_localSpaceBounds.axisExtents.y);
m_localSpaceBounds.axisExtents.z = (float)fabs(m_localSpaceBounds.axisExtents.z);
// ********************Does sqrt(0) crash???***************************************
m_localSpaceBounds.sphereRadius = Length(boxDim);
m_localSpaceBounds.localToParent = mw_mat;
m_material = material;
// Remap material if needed
if (bRemapMaterial) {
switch (m_material&0x1f)
{
case 0: //DirtMaterial,
m_material |= Adept::BrownDirtMaterial;
break;
case 2: //RockMaterial,
m_material &= ~0x1f;
m_material |= Adept::RockMaterial;
break;
case 3: //SteelMaterial,
m_material &= ~0x1f;
m_material |= Adept::SteelMaterial;
break;
case 4: //BlacktopMaterial,
m_material &= ~0x1f;
m_material |= Adept::BlacktopMaterial;
break;
case 5: //UsMaterial,
m_material &= ~0x1f;
m_material |= Adept::UsMaterial;
break;
case 6: //ThemMaterial,
m_material &= ~0x1f;
m_material |= Adept::ThemMaterial;
break;
case 7: //VehicleMaterial,
m_material &= ~0x1f;
m_material |= Adept::SteelMaterial;
break;
case 8: //GlassMaterial,
m_material &= ~0x1f;
m_material |= Adept::GlassMaterial;
break;
case 9: //BrickMaterial,
m_material &= ~0x1f;
m_material |= Adept::ConcreteMaterial;
break;
case 10: //GrassMaterial,
m_material &= ~0x1f;
m_material |= Adept::GrassMaterial;
break;
case 11: //WoodMaterial,
m_material &= ~0x1f;
m_material |= Adept::WoodMaterial;
break;
case 12: //TreeMaterial,
m_material &= ~0x1f;
m_material |= Adept::WoodMaterial;
break;
case 13: //SwampMaterial,
m_material &= ~0x1f;
m_material |= Adept::GrassMaterial;
break;
case 14: //ConcreteMaterial,
m_material &= ~0x1f;
m_material |= Adept::ConcreteMaterial;
break;
case 15: //RoughMaterial,
m_material &= ~0x1f;
m_material |= Adept::GrassMaterial;
break;
case 16: //SnowMaterial,
m_material &= ~0x1f;
m_material |= Adept::SnowMaterial;
break;
case 17: //UnderbrushMaterial,
m_material &= ~0x1f;
m_material |= Adept::GrassMaterial;
break;
case 18: //ShallowWaterMaterial,
m_material &= ~0x1f;
m_material |= Adept::WaterMaterial;
break;
case 19: //MidWaterMaterial,
m_material &= ~0x1f;
m_material |= Adept::WaterMaterial;
break;
case 20: //DesertMaterial,
m_material &= ~0x1f;
m_material |= Adept::BrownDirtMaterial;
break;
case 21: //FlatSwampMaterial,
m_material &= ~0x1f;
m_material |= Adept::GrassMaterial;
break;
case 22: //ThickSwampMaterial,
m_material &= ~0x1f;
m_material |= Adept::GrassMaterial;
break;
case 23: //RedRockMaterial,
m_material &= ~0x1f;
m_material |= Adept::RockMaterial;
break;
case 24: //GreyDirtMaterial,
m_material &= ~0x1f;
m_material |= Adept::GreyDirtMaterial;
break;
case 25: //DarkDirtMaterial,
m_material &= ~0x1f;
m_material |= Adept::DarkBrownDirtMaterial;
break;
case 26: //DarkDesertMaterial,
m_material &= ~0x1f;
m_material |= Adept::DarkBrownDirtMaterial;
break;
case 27: //DarkRedRockMaterial,
m_material &= ~0x1f;
m_material |= Adept::DarkRockMaterial;
break;
case 28: //DarkRockMaterial,
m_material &= ~0x1f;
m_material |= Adept::DarkRockMaterial;
break;
case 29: //DarkConcreteMaterial,
m_material &= ~0x1f;
m_material |= Adept::DarkConcreteMaterial;
break;
case 30: //DarkGreyDirtMaterial,
m_material &= ~0x1f;
m_material |= Adept::DarkGreyDirtMaterial;
break;
}
if (pblock)
pblock->SetValue(CV_MATERIAL,0,m_material);
} /* end if m_bRemapMaterial */
}
/*******************************************************************************
/* function name: ConstructCVHeirarchy
/* description:
/*******************************************************************************/
MaxCollisionVolume *ConstructCVHeirarchy(INode *pNode, bool bRemapMaterial)
{
MaxCollisionVolume *this_cv = NULL;
bool is_joint = false;
if (!strnicmp(pNode->GetName(),"joint_",6))
is_joint = true;
bool is_cv = false;
if (!strnicmp(pNode->GetName(),"cv_",3))
is_cv = true;
int number_of_children = 0;
// only create collision volumes for joints and cv's
if ( is_joint || is_cv )
{
// create our collision volume
this_cv = new MaxCollisionVolume(pNode, bRemapMaterial);
Register_Object(this_cv);
for (int x=0;x<pNode->NumberOfChildren();x++)
{
// recurse our children and have them make collision volumes
INode *pChild = pNode->GetChildNode(x);
MaxCollisionVolume *children = ConstructCVHeirarchy(pChild, bRemapMaterial);
if (children != NULL)
{
// if our child made a collision volume add it to our children chain
Check_Object(children);
Check_Object(this_cv);
this_cv->m_children.Add(children);
// if our child is not a joint
if (children->m_localSpaceBounds.sphereRadius != 0.0f)
{
// verify that the parent joint only has one child that is
// a collision volume. A joint is allowed to have multiple
// joint children but only one cv child.
if (is_joint)
{
++number_of_children;
if (number_of_children > 1)
{
ReportError(CString(pNode->GetName())+": Has more than one cv child");
}
}
else
{
int z=1;
}
}
}
}
}
return this_cv;
}
/*******************************************************************************
/* function name: OptimizeCV
/* description:
/*******************************************************************************/
MaxCollisionVolume *OptimizeCV(MaxCollisionVolume *pCV)
{
const char *debug_name = pCV->m_pNode->GetName();
int count = 0;
ChainIteratorOf<Adept::CollisionVolume*> children(&pCV->m_children);
MaxCollisionVolume *cv;
children.First();
while((cv = (MaxCollisionVolume*)children.GetCurrent()) != NULL)
{
MaxCollisionVolume *child = OptimizeCV(cv);
if (child == NULL)
{
children.Remove();
Unregister_Object(cv);
delete cv;
}
else
{
++count;
children.Next();
}
}
if (0 == count && (pCV->m_localSpaceBounds.sphereRadius < 0.00001))
return NULL;
return pCV;
}
/*******************************************************************************
/* function name: CountMaterials
/* description:
/*******************************************************************************/
void CountMaterials(MaxCollisionVolume *pCV, Stuff::Page *logPage, CMapStringToPtr &matCounts)
{
if (!pCV)
return;
Check_Object(pCV);
Check_Object(logPage);
const char *debug_name = pCV->m_pNode->GetName();
int count = 0;
ChainIteratorOf<Adept::CollisionVolume*> children(&pCV->m_children);
MaxCollisionVolume *cv;
children.First();
while((cv = (MaxCollisionVolume*)children.GetCurrent()) != NULL)
{
CountMaterials(cv, logPage, matCounts);
CString name = cv->m_pNode->GetName();
name.MakeLower();
if (name.Find("cv_")>=0) {
const char *material = Adept::MaterialTypeAsciiToText(cv->m_material&0x1f);
LPVOID lpVoid = NULL;
if (lpVoid = matCounts[material]) {
int *count = (int*) lpVoid;
(*count)++;
}
else {
int *count = new int;
*count = 1;
matCounts[material] = count;
}
}
children.Next();
}
}
/*******************************************************************************
/* function name: ConstructCVs
/* description: Construct solid and hierarchical CVs from a max file
/*******************************************************************************/
void ConstructCVs(Interface* ip,
MaxCollisionVolume **pSolidCvOut,
MaxCollisionVolume **pHierarchicalCvOut,
bool bSuppressPrompts,
bool bRemapMaterial)
{
MaxCollisionVolume *pSolidCv = NULL;
MaxCollisionVolume *pHierarchicalCv = NULL;
// Search for joint_WORLD
INode *pSolid = NULL;
if (pSolid = FindNodeByNames(ip->GetRootNode(), g_name_WORLD)) {
pSolidCv = ConstructCVHeirarchy(pSolid, bRemapMaterial);
Check_Object(pSolidCv);
pSolidCv = OptimizeCV(pSolidCv);
// find the root colision volume
for (int i=0; g_name_ROOT[i]!= ""; i++) {
if (pHierarchicalCv = pSolidCv->FindJointNode(g_name_ROOT[i])) {
break;
}
}
}
// Search for joint_ROOT
if (!pHierarchicalCv) {
INode *pHierarchical = NULL;
if (pHierarchical = FindNodeByNames(ip->GetRootNode(), g_name_ROOT)) {
pHierarchicalCv = ConstructCVHeirarchy(pHierarchical, bRemapMaterial);
Check_Object(pHierarchicalCv);
pHierarchicalCv = OptimizeCV(pHierarchicalCv);
}
}
// if pHierarchicalCv doesn't have any children
// then add first level joints to pHierarchicalCv
if (pHierarchicalCv) {
Check_Object(pHierarchicalCv);
ChainIteratorOf<Adept::CollisionVolume*> children(&pHierarchicalCv->m_children);
if((MaxCollisionVolume*)children.GetCurrent() == NULL)
{
MaxCollisionVolume* pBaseCv = NULL;
for (int x=0;x<ip->GetRootNode()->NumberOfChildren();x++)
{
INode *pChild = ip->GetRootNode()->GetChildNode(x);
if (!strnicmp(pChild->GetName(),"joint_",6))
{
pBaseCv = ConstructCVHeirarchy(pChild, bRemapMaterial);
if (pBaseCv != NULL)
{
Check_Object(pBaseCv);
pHierarchicalCv->m_children.Add(pBaseCv);
}
}
}
}
pHierarchicalCv = OptimizeCV(pHierarchicalCv);
}
// No cv_WORLD or cv_ROOT
// this is not a heiracrhied object so recurse the first level children
// looking for the solid cv
if (!pSolidCv && !pHierarchicalCv)
{
int cv_children = 0;
for (int x=0;x<ip->GetRootNode()->NumberOfChildren();x++)
{
INode *pChild = ip->GetRootNode()->GetChildNode(x);
if (!strnicmp(pChild->GetName(),"cv_",3))
{
pSolidCv = ConstructCVHeirarchy(pChild, bRemapMaterial);
if (pSolidCv != NULL)
{
// make sure we haven't found more than one base child that is a cv.
Check_Object(pSolidCv);
++cv_children;
if (cv_children > 1)
{
ReportError(CString(pChild->GetName())+": Has more than one base cv",bSuppressPrompts);
}
Check_Object(pSolidCv);
pSolidCv = OptimizeCV(pSolidCv);
}
}
}
}
*pSolidCvOut = pSolidCv;
*pHierarchicalCvOut = pHierarchicalCv;
}
/*******************************************************************************
/* function name: MakeGoodEnough
/* description: Recursively mark a CV and its children as "Good Enough"
/*******************************************************************************/
void MaxCollisionVolume::MakeGoodEnough()
{
Check_Object(this);
m_material &= ~Adept::CollisionVolume::e_GoodEnough;
m_material |= Adept::CollisionVolume::e_GoodEnough;
ChainIteratorOf<Adept::CollisionVolume*> children(&m_children);
MaxCollisionVolume *cv;
while((cv = (MaxCollisionVolume*)children.ReadAndNext()) != NULL)
{
cv->MakeGoodEnough();
}
}
@@ -0,0 +1,105 @@
//===========================================================================//
// File: CvExport.h
// Project: MechWarrior 4
// Contents: Plugin to adjust height of max anmiations
//---------------------------------------------------------------------------//
// Date Who Modification //
// -------- --- ---------------------------------------------------------- //
// 04/28/99 JSE Initial coding,
// 05/10/00 fwang
//---------------------------------------------------------------------------//
// Copyright (C) 1998, Fasa Interactive, Inc.
// All Rights reserved worldwide
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL
//===========================================================================//
#if !defined(AFX_CVEXPORT_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_)
#define AFX_CVEXPORT_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
// Forward class declaration
class CvExp;
class MaxCollisionVolume;
#include "AnimationSuite.h"
#include "GeoExport.h"
class CvExp : public SceneExport
{
public:
CvExp():m_exp("") {}
~CvExp() {}
// Some inline functions
int ExtCount() { return 1; }
const TCHAR * Ext(int n) {
switch(n) {
case 0:
// This cause a static string buffer overwrite
// return GetString(IDS_EXTENSION1);
return _T("OBB");
}
return _T("");
}
const TCHAR * LongDesc() { return GetString(IDS_LONGDESC); }
const TCHAR * ShortDesc(){ return _T("MW4 OBB"); }
const TCHAR * AuthorName() { return _T("Jonthan Kyle"); }
const TCHAR * CopyrightMessage() { return GetString(IDS_COPYRIGHT); }
const TCHAR * OtherMessage1() { return _T(""); }
const TCHAR * OtherMessage2() { return _T(""); }
unsigned int Version() { return 100; }
void ShowAbout(HWND hWnd)
{
CAbout dlg;
dlg.DoModal();
}
int DoExport(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts=FALSE);
int DoExportWrap(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts=FALSE);
private:
Interface *m_ip;
bool m_bRemapMaterial;
bool m_bUseNewNames;
bool SaveSolidOBB(const TCHAR *name, MaxCollisionVolume *pCv);
bool SaveHierarchicalOBB(const TCHAR *name, MaxCollisionVolume *pCv);
bool LoadPlugCfg(Interface *i);
BaseGeoExporter m_exp;
};
/////////////////////////////////////////////////////////////////////////////
class MaxCollisionVolume : public Adept::CollisionVolume
{
protected:
INode *m_pNode;
public:
MaxCollisionVolume(INode *pNode, bool bRemapMaterial);
const char* GetName();
MaxCollisionVolume *FindJointNode(const char *name);
MaxCollisionVolume *FindCVNode(const char *name);
void MakeGoodEnough();
friend MaxCollisionVolume *ConstructCVHeirarchy(INode *pnode, bool bRemapMaterial=false);
friend MaxCollisionVolume *OptimizeCV(MaxCollisionVolume *);
friend void CountMaterials(MaxCollisionVolume *, Stuff::Page *logPage, CMapStringToPtr &);
friend void ConstructCVs(Interface* ip,
MaxCollisionVolume **pSolidCv,
MaxCollisionVolume **pHierarchicalCv,
bool bSuppressPrompts=false,
bool bRemapMaterial=false);
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_ANIMEXPORT_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_)
@@ -0,0 +1,124 @@
// DlgSelectMegatextures.cpp : implementation file
//
#include "stdafx.h"
#include "animationsuite.h"
#include "DlgSelectMegatextures.h"
#include "Proxies\ProxyHeaders.hpp"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDlgSelectMegatextures dialog
CDlgSelectMegatextures::CDlgSelectMegatextures(CWnd* pParent /*=NULL*/)
: CDialog(CDlgSelectMegatextures::IDD, pParent)
{
//{{AFX_DATA_INIT(CDlgSelectMegatextures)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CDlgSelectMegatextures::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDlgSelectMegatextures)
DDX_Control(pDX, IDC_LIST_PAGES, m_listPages);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDlgSelectMegatextures, CDialog)
//{{AFX_MSG_MAP(CDlgSelectMegatextures)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDlgSelectMegatextures message handlers
BOOL CDlgSelectMegatextures::OnInitDialog()
{
CDialog::OnInitDialog();
CStringList namelist;
MStringChainIterator megatextures(Proxies::CoalesceTexturesProcess::MakeMegatextureChain(m_strMegaTextures));
PlugOf<MString> *string;
const char* mega_name = NULL;
while ((string = megatextures.ReadAndNext()) != NULL)
{
mega_name = string->GetItem();
Check_Pointer(mega_name);
namelist.AddTail(mega_name);
}
if (m_strHintFile.GetLength())
{
bool bDone = false;
CString filename = m_strHintFile;
while (!bDone)
{
Stuff::NotationFile *pFile = new Stuff::NotationFile(filename);
Stuff::NotationFile::PageIterator *pages = pFile->MakePageIterator();
Stuff::Page *page;
while (page = pages->ReadAndNext())
{
CString pagename = page->GetName();
const char *entry;
if (page->GetEntry("PageSize",&entry))
{
int index = m_listPages.AddString(pagename);
if (namelist.Find(pagename))
{
m_listPages.SetSel(index);
}
}
}
delete pages;
bDone = true;
page = pFile->FindPage("");
if (page)
{
const char *entry;
if (page->GetEntry("Parent",&entry))
{
filename = entry;
}
else
{
bDone = false;
}
}
delete pFile;
}
}
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CDlgSelectMegatextures::OnOK()
{
int count;
count = m_listPages.GetSelCount();
int *items = new int[count];
m_listPages.GetSelItems(count,items);
m_strMegaTextures = "";
for (int x=0;x<count;x++)
{
CString str;
m_listPages.GetText(items[x],str);
if (x>0)
{
m_strMegaTextures += ",";
}
m_strMegaTextures += str;
}
m_strMegaTextures.TrimRight();
CDialog::OnOK();
}
@@ -0,0 +1,49 @@
#if !defined(AFX_DLGSELECTMEGATEXTURES_H__52E5A92C_6BEF_467D_9D60_87E44B99829A__INCLUDED_)
#define AFX_DLGSELECTMEGATEXTURES_H__52E5A92C_6BEF_467D_9D60_87E44B99829A__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// DlgSelectMegatextures.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CDlgSelectMegatextures dialog
class CDlgSelectMegatextures : public CDialog
{
// Construction
public:
CString m_strMegaTextures;
CString m_strHintFile;
CDlgSelectMegatextures(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CDlgSelectMegatextures)
enum { IDD = IDD_SELECT_MEGATEXTURES };
CListBox m_listPages;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDlgSelectMegatextures)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CDlgSelectMegatextures)
virtual BOOL OnInitDialog();
virtual void OnOK();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DLGSELECTMEGATEXTURES_H__52E5A92C_6BEF_467D_9D60_87E44B99829A__INCLUDED_)
@@ -0,0 +1,298 @@
// EBFExporter.cpp: implementation of the EBFExporter class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "EBFExport.h"
#include "stdafx.h"
#include "MLRExport.h"
#include "ExportUtil.h"
#include <GameOS\GameOS.hpp>
#include <GameOS\ToolOS.hpp>
#include <MaxProxies\MaxProxyHeaders.hpp>
#include <MLR\MLRShape.hpp>
#if !defined(DLLPLATFORM_DLLPLATFORM_HPP)
#include "DLLPlatform\DLLPlatform.hpp"
#endif
//===========================================================================//
int EBFExporter::DoExportWrap(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts)
{
StartExport(i, CString("Exporting EBF data."), suppressPrompts?true:false);
MAXProxies::MAXScene *scene = MAXProxies::MAXScene::MakeProxy(i,m_strHintFile);
Register_Object(scene);
//
// fill in all the directories
//
if (!LoadPlugCfg(i))
return false;
// Check for errors
if (!CheckForErrors(scene,i))
{
return false;
}
// Load settings
m_exportInfo.exportType = EXPORT_SHAPE;
m_exportInfo.outputAmatureFile = false;
m_exportInfo.overwriteTextures = true;
SaveExportInfo(scene->GetProxiedScene());
//
// see if the EBF file already exists
//
//
// set up some name and path stuff
//
TSTR filename, extension;
TSTR fullpath = _T(name);
TSTR directoryPath;
SplitFilename(fullpath,&directoryPath,&filename,&extension);
directoryPath += "\\";
CString erf_file_name = directoryPath + m_erfPath + filename + ".EBF";
bool file_exists = gos_DoesFileExist(erf_file_name);
if (file_exists)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
gos_DeleteFile(erf_file_name);
/*
int ret = AfxMessageBox("Overwrite " + filename + ".erf" + " ?", MB_YESNO);
if (ret == IDYES)
{
gos_DeleteFile(erf_file_name);
}
else
{
return false;
}
*/
}
//
// if we are exporting the character do the following
// or fall threw and export a fused mesh called a shape
//
CString shape_filename = filename + extension;
CString set_filename = directoryPath + filename;
Check_Object(Stuff::FileStreamManager::Instance);
Stuff::FileStream element_stream(directoryPath + m_erfPath + shape_filename, Stuff::FileStream::WriteOnly);
gosFX::WriteGFXVersion(&element_stream);
MidLevelRenderer::WriteMLRVersion(&element_stream);
CString path = directoryPath;
ExportShape(scene, i, path, &element_stream, suppressPrompts);
TurnOffExceptions();
return true;
}
/*******************************************************************************
/* function name: ExportShape
/* description: Write out .ebf file for destroyed effect, every child
/* under root node is going be a separate piece when the object is blown up
/*******************************************************************************/
int EBFExporter::ExportShape(MAXProxies::MAXScene *scene,
Interface *i,
const CString& directoryPath,
Stuff::FileStream *stream,
BOOL suppressPrompts)
{
//
// create an empty scene
//
UpdateProgress(i, ++m_progress,CString("Preparing to copy."));
ElementRenderer::GroupElement *root = new ElementRenderer::GroupElement;
Register_Object(root);
// Make sure that texture and erf paths exist
bool texture_dir_exists = gos_CreateDirectory(m_texturePath);
bool erf_dir_exists = gos_CreateDirectory(directoryPath + m_erfPath);
ElementProxies::ElementSceneProxy *element_scene =
ElementProxies::ElementSceneProxy::MakeProxy(
root,
m_texturePath
);
Register_Object(element_scene);
Stuff::NotationFile config_file(Stuff::MString(m_maxDataPath)+"\\PlugIns.ini");
MAXProxies::MAXCopyProcess copy_process(&config_file,i,m_progress,m_suppress,(LPVOID)&ReportError);
element_scene->Copy(&copy_process, scene);
int ref_count = element_scene->GetReferenceCount();
int nrOfChildren = element_scene->GetChildCount();
*stream << nrOfChildren;
Proxies::ChildProxy *child = element_scene->UseFirstChildProxy();
for(int c=0;c<nrOfChildren;c++)
{
Check_Object(child);
Stuff::LinearMatrix4D theMatrix;
Stuff::Point3D position;
Proxies::ChildProxy *next = child->UseNextSiblingProxy();
MAXProxies::MAXFlattenHierarchyProcess flatten_hierarchy(&config_file,i, m_progress, m_suppress);
child->FlattenHierarchy(&flatten_hierarchy);
Proxies::CleanHierarchyProcess cleanMeUp;
cleanMeUp.CleanHierarchyCallback(child);
if(child->IsDerivedFrom(Proxies::GroupProxy::DefaultData))
{
child->GetLocalToWorld(&theMatrix);
position = theMatrix;
// Save position of the child
*stream << position;
//
// See if there are any meshes to fuse. If there are no meshes, don't save
// anything
//
Proxies::GroupProxy *group = Cast_Object(Proxies::GroupProxy*, child);
Proxies::ChildProxy *first_child = group->UseFirstChildProxy();
if (!first_child)
{
Verify(group->GetReferenceCount() == 1);
EndExport(i);
TurnOnExceptions();
group->Destroy();
return 1;
}
//
// Look for any meshes after the first. These will be merged with the
// first one
//
ElementProxies::ElementPolygonMeshProxy *first_mesh =
Cast_Object(ElementProxies::ElementPolygonMeshProxy*, first_child);
FusePolygonMeshProxy(first_mesh,group->GetChildCount(),i,m_progress,m_suppress);
//
// Build the bounding sphere around the now only child
//
ElementProxies::OptimizeSyncProcess optimize;
if (optimize.OptimizeSync(first_mesh))
first_mesh->DetachReference();
//
// Open up the file to save the shape into, then save the child as the
// root
//
ElementRenderer::Element *element = first_mesh->GetProxiedShape();
ElementRenderer::ShapeElement *ElmShape=Cast_Object(ElementRenderer::ShapeElement *,element);
ElmShape->GetMLRShape()->Save(stream);
}
else if(child->IsDerivedFrom(Proxies::PolygonMeshProxy::DefaultData))
{
ElementProxies::ElementPolygonMeshProxy *mesh =
Cast_Object(ElementProxies::ElementPolygonMeshProxy*, child);
FusePolygonMeshProxy(mesh,1,i,m_progress,m_suppress);
ElementProxies::OptimizeSyncProcess optimize;
if (optimize.OptimizeSync(mesh))
{
Stuff::Sphere bsphere;
mesh->GetBoundingSphere(&bsphere);
// Save position of the child
*stream << bsphere.center;
// Save bounding sphere radius for controlling purposes
*stream << bsphere.center << bsphere.radius;
DynamicArrayOf<Proxies::VertexProxy*> vertices;
unsigned vertex_count = mesh->UseVertexArray(&vertices);
for (unsigned i=0; i<vertex_count; ++i)
{
Proxies::VertexProxy *vertex = vertices[i];
Check_Object(vertex);
Point3D old_position;
vertex->GetPosition(&old_position);
Point3D new_position;
new_position.Subtract(old_position, bsphere.center);
vertex->SetPosition(new_position);
}
mesh->DetachArrayReferences(&vertices);
Stuff::LinearMatrix4D newMatrix;
newMatrix = Stuff::LinearMatrix4D::Identity;
newMatrix.BuildTranslation(bsphere.center);
mesh->SetLocalToParent(newMatrix);
//
// Open up the file to save the shape into, then save the child as the
// root
//
ElementRenderer::Element *element = mesh->GetProxiedShape();
ElementRenderer::ShapeElement *ElmShape = Cast_Object(ElementRenderer::ShapeElement*,element);
ElmShape->GetMLRShape()->Save(stream);
}
}
Check_Object(child);
child->DetachReference();
child = next;
}
if(child != NULL)
{
child->DetachReference();
}
//
// Clean up
//
EndExport(i);
TurnOnExceptions();
Verify(element_scene->GetReferenceCount() == 1);
element_scene->Destroy();
return 1;
}
//===========================================================================//
int EBFExp::DoExport(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts)
{
int return_value;
__try
{
return_value = m_Expt.DoExportWrap(name, ei, i, suppressPrompts);
//return_value = true;
GetSystemSetting(SYSSET_CLEAR_UNDO);
Verify(!theHold.Holding());
}
__except(ProcessException(GetExceptionInformation()))
{
}
return return_value;
}
@@ -0,0 +1,64 @@
// EBFExporter.h: interface for the EBFExporter class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_EBFEXPORTER_H__CD5F2FC1_7048_11D3_8B36_00902712C9AE__INCLUDED_)
#define AFX_EBFEXPORTER_H__CD5F2FC1_7048_11D3_8B36_00902712C9AE__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "BaseGeoExport.h"
class EBFExporter :public BaseGeoExporter
{
public:
EBFExporter(const char *str): BaseGeoExporter(str) {}
~EBFExporter() {}
int DoExportWrap(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts=FALSE);
private:
int ExportShape(MAXProxies::MAXScene *scene,
Interface *i,
const CString& path,
Stuff::FileStream *stream,
BOOL suppressPrompts);
};
class EBFExp : public SceneExport
{
protected:
EBFExporter m_Expt;
public:
EBFExp() :m_Expt("") {}
~EBFExp() {};
int ExtCount() { return 1; }
const TCHAR * Ext(int n) {
switch(n) {
case 0:
// This cause a static string buffer overwrite
// return GetString(IDS_EXTENSION1);
return _T("EBF");
}
return _T("");
}
const TCHAR * LongDesc() { return GetString(IDS_LONGDESC); }
const TCHAR * ShortDesc() { return _T("MW4 EBF"); }
const TCHAR * AuthorName() { return _T("Thomas Steinke"); }
const TCHAR * CopyrightMessage() { return GetString(IDS_COPYRIGHT); }
const TCHAR * OtherMessage1() { return _T(""); }
const TCHAR * OtherMessage2() { return _T(""); }
unsigned int Version() { return 100; }
void ShowAbout(HWND hWnd) {
CAbout dlg;
dlg.DoModal();
}
int DoExport(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts=FALSE);
};
#endif // !defined(AFX_EBFEXPORTER_H__CD5F2FC1_7048_11D3_8B36_00902712C9AE__INCLUDED_)
@@ -0,0 +1,896 @@
// EditBatch.cpp : implementation file
//
#include "stdafx.h"
#ifdef STRICT // Already defined by stdafx,
#undef STRICT // so we avoid warning linking msg
#endif
#ifdef _MBCS // The same as above
#undef _MBCS
#endif
#include "animationsuite.h"
#include <Stuff\StuffHeaders.hpp>
#include "EditBatch.h"
#include "DlgSelectMegatextures.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CEditBatch dialog
CEditBatch::CEditBatch(Page *page,CWnd* pParent /*=NULL*/)
: CDialog(CEditBatch::IDD, pParent)
{
//{{AFX_DATA_INIT(CEditBatch)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
m_pPage = page;
}
void CEditBatch::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CEditBatch)
DDX_Control(pDX, IDC_EDIT_MEGANAMES, m_MegaNames);
DDX_Control(pDX, IDC_EDIT_HINT, m_Hint);
DDX_Control(pDX, IDC_CHECK_CROSSFADE, m_checkFade);
DDX_Control(pDX, IDC_CHECK_CAGE, m_checkCage);
DDX_Control(pDX, IDC_EDIT_CAGE, m_Cage);
DDX_Control(pDX, IDC_CHECK_ANIM, m_checkAnim);
DDX_Control(pDX, IDC_CHECK_OBB, m_checkOBB);
DDX_Control(pDX, IDC_EDIT_OBB, m_Obb);
DDX_Control(pDX, IDC_EDIT_SKEL, m_Skel);
DDX_Control(pDX, IDC_EDIT_ANIM, m_Anim);
DDX_Control(pDX, IDC_EDIT_PATH, m_Path);
DDX_Control(pDX, IDC_LIST_CLASS, m_listclass);
DDX_Control(pDX, IDC_ALIGN_X, m_checkAlignX);
DDX_Control(pDX, IDC_ALIGN_Y, m_checkAlignY);
DDX_Control(pDX, IDC_ALIGN_STARTLOD, m_comboStartLOD);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CEditBatch, CDialog)
//{{AFX_MSG_MAP(CEditBatch)
ON_BN_CLICKED(IDC_BUTTON_LOD0, OnButtonLod0)
ON_BN_CLICKED(IDC_BUTTON_LOD1, OnButtonLod1)
ON_BN_CLICKED(IDC_BUTTON_LOD2, OnButtonLod2)
ON_BN_CLICKED(IDC_BUTTON_LOD4, OnButtonLod4)
ON_BN_CLICKED(IDC_BUTTON_LOD5, OnButtonLod5)
ON_BN_CLICKED(IDC_BUTTON_LODDAM0, OnButtonLoddam0)
ON_BN_CLICKED(IDC_BUTTON_LODDAM1, OnButtonLoddam1)
ON_BN_CLICKED(IDC_BUTTON_LODDAM2, OnButtonLoddam2)
ON_BN_CLICKED(IDC_BUTTON_LODDAM3, OnButtonLoddam3)
ON_BN_CLICKED(IDC_BUTTON_LODDAM4, OnButtonLoddam4)
ON_BN_CLICKED(IDC_BUTTON_LODDAM5, OnButtonLoddam5)
ON_BN_CLICKED(IDC_BUTTON_LOD3, OnButtonLod3)
ON_BN_CLICKED(IDC_CHECK_ANIM, OnCheckAnim)
ON_BN_CLICKED(IDC_CHECK_OBB, OnCheckObb)
ON_BN_CLICKED(IDC_BROWSE_PATH, OnBrowsePath)
ON_BN_CLICKED(IDC_BROWSE_SKEL, OnBrowseSkel)
ON_BN_CLICKED(IDC_BROWSE_ANIM, OnBrowseAnim)
ON_BN_CLICKED(IDC_BROWSE_OBB, OnBrowseObb)
ON_BN_CLICKED(IDC_BROWSE_CAGE, OnBrowseCage)
ON_BN_CLICKED(IDC_CHECK_CAGE, OnCheckCage)
ON_BN_CLICKED(IDC_RADIO_CHAR, OnRadioChar)
ON_BN_CLICKED(IDC_RADIO_SHAPE, OnRadioShape)
ON_BN_CLICKED(IDC_CHECK_CROSSFADE, OnCheckCrossfade)
ON_BN_CLICKED(IDC_BROWSE_HINT, OnBrowseHint)
ON_BN_CLICKED(IDC_SELECT_MEGANAMES, OnSelectMeganames)
ON_CBN_SELCHANGE(IDC_ALIGN_STARTLOD, OnSelectStartLOD)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CEditBatch message handlers
CString g_szbrowsepath;
static int CALLBACK BrowseCallbackProc1(HWND hWnd, UINT uMsg, LPARAM lParam, LPARAM lpData)
{
RECT rect;
//
//Center the browse dialog on the screen...
//
switch (uMsg)
{
case BFFM_INITIALIZED:
{
SendMessage(hWnd,BFFM_SETSELECTION,TRUE,(LPARAM)(LPCTSTR)g_szbrowsepath);
if (GetWindowRect(hWnd, &rect))
{
SetWindowPos(hWnd,
HWND_TOP,
(GetSystemMetrics(SM_CXSCREEN) - (rect.right - rect.left)) >> 1,
(GetSystemMetrics(SM_CYSCREEN) - (rect.bottom - rect.top)) >> 1,
0,
0,
SWP_NOSIZE);
}
}
}
return 0;
}
CString BrowseDirectory(const char *strCurrent,CWnd *pWnd)
{
CString str;
TCHAR szBuffer[MAX_PATH];
LPITEMIDLIST pidlBrowse,pidlRoot;
BROWSEINFO bi;
LPMALLOC lpMalloc;
SHGetMalloc(&lpMalloc);
ASSERT(lpMalloc);
bi.hwndOwner = pWnd->GetSafeHwnd();
// Get the ID for the "My Computer" root folder
SHGetSpecialFolderLocation(pWnd->GetSafeHwnd(),CSIDL_DRIVES,&pidlRoot);
bi.pidlRoot = pidlRoot;
bi.pszDisplayName = szBuffer;
// Localize the descriptive text
bi.lpszTitle = "Select a path";
// BIF_EDITBOX and BIF_VALIDATE are for versions 4.71 and later, they
// might be ignored by older versions
bi.ulFlags = BIF_RETURNONLYFSDIRS | BIF_STATUSTEXT;// | BIF_EDITBOX;// | BIF_USENEWUI;// | BIF_VALIDATE;
bi.lParam = (LPARAM)pWnd;
bi.iImage = NULL;
bi.lpfn = BrowseCallbackProc1;
bi.lParam = (LPARAM)strCurrent;
g_szbrowsepath = strCurrent;
//
//Call the Windows shell folder browsing routine...
//
pidlBrowse = SHBrowseForFolder(&bi);
if (NULL != pidlBrowse)
{
if (SHGetPathFromIDList(pidlBrowse, szBuffer))
{
if ('\\' == szBuffer[lstrlen(szBuffer)-1])
szBuffer[lstrlen(szBuffer)-1] = '\0';
str = CString(szBuffer);
}
else
str = "";
//
//Free up shell memory used...
//
lpMalloc->Free(pidlBrowse);
}
else
str = "";
lpMalloc->Free(pidlRoot);
lpMalloc->Release();
return str;
}
CString szClasses[] =
{
"MechWarrior4::Airplane",
"MechWarrior4::Bridge",
"MechWarrior4::Building",
"MechWarrior4::Boat",
"MechWarrior4::Cultural",
"MechWarrior4::DropShip",
"MechWarrior4::Helicopter",
"MechWarrior4::HoverCraft",
"MechWarrior4::Mech",
"MechWarrior4::MFB",
"MechWarrior4::NonCom",
"MechWarrior4::Tank",
"MechWarrior4::Truck",
"MechWarrior4::Turret",
""
};
BOOL CEditBatch::OnInitDialog()
{
CDialog::OnInitDialog();
// Initialize the controls
int index=0;
while (szClasses[index] != "") {
m_listclass.InsertString(index, szClasses[index]);
index++;
}
const char *strclass;
if (m_pPage->GetEntry("Class",&strclass))
{
int index=0;
while (szClasses[index] != "") {
if (0==strnicmp(szClasses[index],strclass,strlen(szClasses[index])))
m_listclass.SetCurSel(index);
index++;
}
}
// Get the entries out of the page
const char *path;
if (m_pPage->GetEntry("path",&path))
{
m_Path.SetWindowText(path);
}
const char *lodSkel;
if (m_pPage->GetEntry("lodSkel",&lodSkel))
{
m_Skel.SetWindowText(lodSkel);
}
const char *anim;
if (m_pPage->GetEntry("anim",&anim))
{
this->m_checkAnim.SetCheck(1);
m_Anim.SetWindowText(anim);
}
else
{
m_Anim.EnableWindow(false);
}
const char *obb;
if (m_pPage->GetEntry("obb",&obb))
{
this->m_checkOBB.SetCheck(1);
m_Obb.SetWindowText(obb);
}
else
{
m_Obb.EnableWindow(false);
}
const char *cage;
if (m_pPage->GetEntry("Cage",&cage))
{
this->m_checkCage.SetCheck(1);
m_Cage.SetWindowText(cage);
}
else
{
m_Cage.EnableWindow(false);
}
CString strHint(path);
const char *hint=NULL;
if (m_pPage->GetEntry("Hint",&hint))
{
}
else
{
strHint.MakeLower();
int index = strHint.Find("\\content\\");
if (index>0)
{
strHint = strHint.Left(index);
strHint+="\\content\\textures\\textures.hint";
hint = strHint;
}
}
if (hint)
m_Hint.SetWindowText(hint);
const char *meganames;
if (m_pPage->GetEntry("MegaTextures",&meganames))
{
m_MegaNames.SetWindowText(meganames);
}
BYTE bChar = 0;
const char *lodChar[6];
for (int x=0;x<6;x++)
{
CString str;
str.Format("LODChar%d",x);
if (m_pPage->GetEntry(str,&lodChar[x]))
{
bChar |= 1<<x;
}
}
BYTE bShape = 0;
const char *lodShape[6];
for (x=0;x<6;x++)
{
CString str;
str.Format("LODShape%d",x);
if (m_pPage->GetEntry(str,&lodShape[x]))
{
bShape |= 1<<x;
}
}
if (bChar && bShape)
{
// We have a problem here
MessageBox("Both LODShape and LODChar specified, defaulting to LODShape (Shape export)",m_pPage->GetName(),MB_OK);
bChar = 0;
}
BYTE flags = 0;
const char **lod = NULL;
if (bChar)
{
flags = bChar;
lod = lodChar;
CButton *b = (CButton *)this->GetDlgItem(IDC_RADIO_CHAR);
b->SetCheck(1);
}
if (bShape)
{
flags = bShape;
lod = lodShape;
CButton *b = (CButton *)this->GetDlgItem(IDC_RADIO_SHAPE);
b->SetCheck(1);
m_Skel.EnableWindow(false);
}
for (x=0;x<6;x++)
{
if (flags & (1<<x))
{
this->SetDlgItemText(IDC_EDIT_LOD0+x,lod[x]);
}
}
BYTE bDam = 0;
const char *lodDam[6];
for (x=0;x<6;x++)
{
CString str;
str.Format("LodDam%d",x);
if (m_pPage->GetEntry(str,&lodDam[x]))
{
bDam &= 1<<x;
this->SetDlgItemText(IDC_EDIT_DAM0+x,lodDam[x]);
}
}
// Load billboarding stuff
m_comboStartLOD.ResetContent();
m_comboStartLOD.AddString("None");
m_comboStartLOD.AddString("LOD0");
m_comboStartLOD.AddString("LOD1");
m_comboStartLOD.AddString("LOD2");
m_comboStartLOD.AddString("LOD3");
m_comboStartLOD.AddString("LOD4");
m_comboStartLOD.AddString("LOD5");
m_comboStartLOD.SelectString(0, "None");
bool bFade = false;
const char *lodDist[6];
for (x=0;x<6;x++)
{
CString str;
str.Format("LodDist%d",x);
if (m_pPage->GetEntry(str,&lodDist[x]))
{
char dist[6][4][MAX_PATH];
::memset(dist, 0, 6*4*MAX_PATH);
int count = sscanf(lodDist[x],"%s %s %s %s",dist[x][0],dist[x][1],dist[x][2],dist[x][3]);
if (count>1)
bFade = true;
}
}
m_checkFade.SetCheck(bFade);
OnCheckCrossfade();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CEditBatch::OnOK()
{
m_pPage->DeleteAllNotes();
int index = m_listclass.GetCurSel();
if (index>=0)
{
CString str;
m_listclass.GetText(index,str);
m_pPage->AppendEntry("Class",str);
}
else
{
MessageBox("You must select a Class for this export: Building, Mech, or Vehicle.","Batch Export",MB_OK);
return;
}
CString str;
this->m_Path.GetWindowText(str);
m_pPage->AppendEntry("Path",str);
//this->m_Skel.GetWindowText(str);
//m_pPage->AppendEntry("LODSkel",str);
CString lodstr;
CButton *b1 = (CButton *)this->GetDlgItem(IDC_RADIO_CHAR);
CButton *b2 = (CButton *)this->GetDlgItem(IDC_RADIO_SHAPE);
//this->m_Skel.GetWindowText(str);
//if (str.GetLength())
// m_pPage->AppendEntry("LODSkel",str);
if (b1->GetCheck())
{
lodstr = "LODChar";
this->m_Skel.GetWindowText(str);
m_pPage->AppendEntry("LODSkel",str);
}
if (b2->GetCheck())
{
lodstr = "LODShape";
}
for (int x=0;x<6;x++)
{
this->GetDlgItemText(IDC_EDIT_LOD0+x,str);
if (str.GetLength())
{
CString str1;
str1.Format("%s%d",lodstr,x);
m_pPage->AppendEntry(str1,str);
}
}
for (x=0;x<6;x++)
{
this->GetDlgItemText(IDC_EDIT_DAM0+x,str);
if (str.GetLength())
{
CString str1;
str1.Format("LODDam%d",x);
m_pPage->AppendEntry(str1,str);
}
}
bool bFade = m_checkFade.GetCheck() != 0;
for (x=0;x<6;x++)
{
CString strName;
strName.Format("LODDist%d",x);
if (bFade) {
CString strNear;
this->GetDlgItemText(IDC_EDIT_NEAR0+x,strNear);
CString strFar;
this->GetDlgItemText(IDC_EDIT_FAR0+x,strFar);
if (strNear.GetLength() && strFar.GetLength())
{
CString strin;
this->GetDlgItemText(IDC_EDIT_FADIN0+2*x,strin);
CString strout;
this->GetDlgItemText(IDC_EDIT_FADOUT0+2*x,strout);
CString strEntry;
strEntry.Format("%s %s %s %s",strNear,strin,strout,strFar);
m_pPage->AppendEntry(strName,strEntry);
}
}
else {
CString strFar;
this->GetDlgItemText(IDC_EDIT_DIST0+x,strFar);
if (strFar.GetLength())
{
m_pPage->AppendEntry(strName,strFar);
}
}
}
if (this->m_checkAnim.GetCheck())
{
this->m_Anim.GetWindowText(str);
m_pPage->AppendEntry("Anim",str);
}
if (this->m_checkOBB.GetCheck())
{
this->m_Obb.GetWindowText(str);
m_pPage->AppendEntry("OBB",str);
}
if (this->m_checkCage.GetCheck())
{
this->m_Cage.GetWindowText(str);
m_pPage->AppendEntry("Cage",str);
}
m_Hint.GetWindowText(str);
m_pPage->AppendEntry("Hint",str);
m_MegaNames.GetWindowText(str);
m_pPage->AppendEntry("MegaTextures",str);
// Save billboarding stuff
this->m_comboStartLOD.GetWindowText(str);
if (str != "None") {
m_pPage->AppendEntry("BillboardFrom", str);
bool bAlignX = this->m_checkAlignX.GetCheck() != 0;
bool bAlignY = this->m_checkAlignY.GetCheck() != 0;
if (bAlignX || bAlignY)
{
if (bAlignX && bAlignY)
m_pPage->AppendEntry("BillboardAlign", "X,Y");
else if (bAlignX)
m_pPage->AppendEntry("BillboardAlign", "X");
else if (bAlignY)
m_pPage->AppendEntry("BillboardAlign", "Y");
}
}
CDialog::OnOK();
}
void CEditBatch::OnButtonLod0()
{
CString str;
this->GetDlgItemText(IDC_EDIT_LOD0,str);
CFileDialog dlg(true,NULL,str);
if (IDOK == dlg.DoModal())
{
str = dlg.GetPathName();
this->SetDlgItemText(IDC_EDIT_LOD0,str);
}
}
void CEditBatch::OnButtonLod1()
{
CString str;
this->GetDlgItemText(IDC_EDIT_LOD1,str);
CFileDialog dlg(true,NULL,str);
if (IDOK == dlg.DoModal())
{
str = dlg.GetPathName();
this->SetDlgItemText(IDC_EDIT_LOD1,str);
}
}
void CEditBatch::OnButtonLod2()
{
CString str;
this->GetDlgItemText(IDC_EDIT_LOD2,str);
CFileDialog dlg(true,NULL,str);
if (IDOK == dlg.DoModal())
{
str = dlg.GetPathName();
this->SetDlgItemText(IDC_EDIT_LOD2,str);
}
}
void CEditBatch::OnButtonLod3()
{
CString str;
this->GetDlgItemText(IDC_EDIT_LOD3,str);
CFileDialog dlg(true,NULL,str);
if (IDOK == dlg.DoModal())
{
str = dlg.GetPathName();
this->SetDlgItemText(IDC_EDIT_LOD3,str);
}
}
void CEditBatch::OnButtonLod4()
{
CString str;
this->GetDlgItemText(IDC_EDIT_LOD4,str);
CFileDialog dlg(true,NULL,str);
if (IDOK == dlg.DoModal())
{
str = dlg.GetPathName();
this->SetDlgItemText(IDC_EDIT_LOD4,str);
}
}
void CEditBatch::OnButtonLod5()
{
CString str;
this->GetDlgItemText(IDC_EDIT_LOD5,str);
CFileDialog dlg(true,NULL,str);
if (IDOK == dlg.DoModal())
{
str = dlg.GetPathName();
this->SetDlgItemText(IDC_EDIT_LOD5,str);
}
}
void CEditBatch::OnButtonLoddam0()
{
CString str;
this->GetDlgItemText(IDC_EDIT_DAM0,str);
CFileDialog dlg(true,NULL,str);
if (IDOK == dlg.DoModal())
{
str = dlg.GetPathName();
this->SetDlgItemText(IDC_EDIT_DAM0,str);
}
}
void CEditBatch::OnButtonLoddam1()
{
CString str;
this->GetDlgItemText(IDC_EDIT_DAM1,str);
CFileDialog dlg(true,NULL,str);
if (IDOK == dlg.DoModal())
{
str = dlg.GetPathName();
this->SetDlgItemText(IDC_EDIT_DAM1,str);
}
}
void CEditBatch::OnButtonLoddam2()
{
CString str;
this->GetDlgItemText(IDC_EDIT_DAM2,str);
CFileDialog dlg(true,NULL,str);
if (IDOK == dlg.DoModal())
{
str = dlg.GetPathName();
this->SetDlgItemText(IDC_EDIT_DAM2,str);
}
}
void CEditBatch::OnButtonLoddam3()
{
CString str;
this->GetDlgItemText(IDC_EDIT_DAM3,str);
CFileDialog dlg(true,NULL,str);
if (IDOK == dlg.DoModal())
{
str = dlg.GetPathName();
this->SetDlgItemText(IDC_EDIT_DAM3,str);
}
}
void CEditBatch::OnButtonLoddam4()
{
CString str;
this->GetDlgItemText(IDC_EDIT_DAM4,str);
CFileDialog dlg(true,NULL,str);
if (IDOK == dlg.DoModal())
{
str = dlg.GetPathName();
this->SetDlgItemText(IDC_EDIT_DAM4,str);
}
}
void CEditBatch::OnButtonLoddam5()
{
CString str;
this->GetDlgItemText(IDC_EDIT_DAM5,str);
CFileDialog dlg(true,NULL,str);
if (IDOK == dlg.DoModal())
{
str = dlg.GetPathName();
this->SetDlgItemText(IDC_EDIT_DAM5,str);
}
}
void CEditBatch::OnCheckAnim()
{
if (this->m_checkAnim.GetCheck())
{
this->m_Anim.EnableWindow(true);
}
else
{
this->m_Anim.EnableWindow(false);
}
}
void CEditBatch::OnCheckObb()
{
if (this->m_checkOBB.GetCheck())
{
this->m_Obb.EnableWindow(true);
}
else
{
this->m_Obb.EnableWindow(false);
}
}
void CEditBatch::OnBrowsePath()
{
CString str;
this->m_Path.GetWindowText(str);
CString newstr = BrowseDirectory(str,this);
if (newstr.GetLength())
{
m_Path.SetWindowText(newstr);
}
}
void CEditBatch::OnBrowseSkel()
{
CString str;
this->m_Skel.GetWindowText(str);
CFileDialog dlg(true,NULL,str);
if (IDOK == dlg.DoModal())
{
str = dlg.GetPathName();
m_Skel.SetWindowText(str);
}
}
void CEditBatch::OnBrowseAnim()
{
CString str;
this->m_Anim.GetWindowText(str);
CString newstr = BrowseDirectory(str,this);
if (newstr.GetLength())
{
m_Anim.SetWindowText(newstr);
}
}
void CEditBatch::OnBrowseObb()
{
CString str;
this->m_Obb.GetWindowText(str);
CFileDialog dlg(true,NULL,str);
if (IDOK == dlg.DoModal())
{
str = dlg.GetPathName();
m_Obb.SetWindowText(str);
}
}
void CEditBatch::OnBrowseCage()
{
CString str;
this->m_Cage.GetWindowText(str);
CFileDialog dlg(true,NULL,str);
if (IDOK == dlg.DoModal())
{
str = dlg.GetPathName();
m_Cage.SetWindowText(str);
}
}
void CEditBatch::OnCheckCage()
{
if (this->m_checkCage.GetCheck())
{
this->m_Cage.EnableWindow(true);
}
else
{
this->m_Cage.EnableWindow(false);
}
}
void CEditBatch::OnRadioChar()
{
m_Skel.EnableWindow(true);
}
void CEditBatch::OnRadioShape()
{
m_Skel.EnableWindow(false);
}
void CEditBatch::OnCheckCrossfade()
{
bool bActive = m_checkFade.GetCheck() != 0;
int iLodDistNear = 0;
int iLodDistFar = 0;
const char *lodDist[6];
for (int x=0;x<6;x++)
{
CWnd *pWnd = GetDlgItem(IDC_EDIT_DIST0+x);
pWnd->EnableWindow(!bActive);
pWnd = GetDlgItem(IDC_EDIT_FADIN0+2*x);
pWnd->EnableWindow(bActive);
pWnd = GetDlgItem(IDC_EDIT_FADOUT0+2*x);
pWnd->EnableWindow(bActive);
pWnd = GetDlgItem(IDC_EDIT_NEAR0+x);
pWnd->EnableWindow(bActive);
pWnd = GetDlgItem(IDC_EDIT_FAR0+x);
pWnd->EnableWindow(bActive);
CString str;
str.Format("LodDist%d",x);
if (m_pPage->GetEntry(str,&lodDist[x]))
{
char dist[6][4][MAX_PATH];
::memset(dist, 0, 6*4*MAX_PATH);
int count = sscanf(lodDist[x],"%s %s %s %s",dist[x][0],dist[x][1],dist[x][2],dist[x][3]);
if (count == 1) {
this->SetDlgItemText(IDC_EDIT_DIST0+x,dist[x][0]);
if (x!=0)
iLodDistNear = this->GetDlgItemInt(IDC_EDIT_DIST0+x-1);
iLodDistFar = this->GetDlgItemInt(IDC_EDIT_DIST0+x);
if (iLodDistFar) {
this->SetDlgItemInt(IDC_EDIT_NEAR0+x, (iLodDistNear-5>0)?iLodDistNear-5:0);
this->SetDlgItemInt(IDC_EDIT_FADIN0+2*x, iLodDistNear+5);
this->SetDlgItemInt(IDC_EDIT_FADOUT0+2*x, (iLodDistFar-5>0)?iLodDistFar-5:0);
this->SetDlgItemInt(IDC_EDIT_FAR0+x, iLodDistFar+5);
}
else{
this->SetDlgItemText(IDC_EDIT_NEAR0+x, "");
this->SetDlgItemText(IDC_EDIT_FAR0 +x, "");
this->SetDlgItemText(IDC_EDIT_FADIN0 +2*x, "");
this->SetDlgItemText(IDC_EDIT_FADOUT0+2*x, "");
}
}
else {
this->SetDlgItemText(IDC_EDIT_NEAR0+x,dist[x][0]);
this->SetDlgItemText(IDC_EDIT_FADIN0+2*x,dist[x][1]);
this->SetDlgItemText(IDC_EDIT_FADOUT0+2*x,dist[x][2]);
this->SetDlgItemText(IDC_EDIT_FAR0+x,dist[x][3]);
}
}
}
const char *billBoardFrom = NULL;
if (m_pPage->GetEntry("BillBoardFrom", &billBoardFrom)) {
m_comboStartLOD.SelectString(0, billBoardFrom);
// Get Align axis for billboarding
const char *billBoardAlign = NULL;
if (m_pPage->GetEntry("BillboardAlign",&billBoardAlign)) {
CString strAlign = billBoardAlign;
strAlign.MakeLower();
if (strAlign.Find("x")>=0)
m_checkAlignX.SetCheck(1);
if (strAlign.Find("y")>=0)
m_checkAlignY.SetCheck(1);
}
}
else {
m_comboStartLOD.SelectString(0, "None");
}
m_comboStartLOD.EnableWindow(bActive);
OnSelectStartLOD();
}
void CEditBatch::OnBrowseHint()
{
CString str;
this->m_Hint.GetWindowText(str);
CFileDialog dlg(true,NULL,str);
if (IDOK == dlg.DoModal())
{
str = dlg.GetPathName();
m_Hint.SetWindowText(str);
}
}
void CEditBatch::OnSelectMeganames()
{
CString hintfile;
m_Hint.GetWindowText(hintfile);
CDlgSelectMegatextures dlg;
m_MegaNames.GetWindowText(dlg.m_strMegaTextures);
dlg.m_strHintFile = hintfile;
if (IDOK == dlg.DoModal())
{
m_MegaNames.SetWindowText(dlg.m_strMegaTextures);
}
}
void CEditBatch::OnSelectStartLOD()
{
CString startLOD;
m_comboStartLOD.GetLBText(m_comboStartLOD.GetCurSel(), startLOD);
m_checkAlignX.EnableWindow(startLOD!="None" && m_comboStartLOD.IsWindowEnabled());
m_checkAlignY.EnableWindow(startLOD!="None" && m_comboStartLOD.IsWindowEnabled());
}
@@ -0,0 +1,88 @@
#if !defined(AFX_EDITBATCH_H__A2C66456_A937_4488_8582_E385894BC5BD__INCLUDED_)
#define AFX_EDITBATCH_H__A2C66456_A937_4488_8582_E385894BC5BD__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// EditBatch.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CEditBatch dialog
class CEditBatch : public CDialog
{
// Construction
public:
CEditBatch(Page *,CWnd* pParent = NULL); // standard constructor
Page *m_pPage;
// Dialog Data
//{{AFX_DATA(CEditBatch)
enum { IDD = IDD_EDIT_BATCHPAGE };
CEdit m_MegaNames;
CEdit m_Hint;
CButton m_checkFade;
CButton m_checkCage;
CEdit m_Cage;
CButton m_checkAnim;
CButton m_checkOBB;
CEdit m_Obb;
CEdit m_Skel;
CEdit m_Anim;
CEdit m_Path;
CListBox m_listclass;
CButton m_checkAlignX;
CButton m_checkAlignY;
CComboBox m_comboStartLOD;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CEditBatch)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CEditBatch)
virtual BOOL OnInitDialog();
virtual void OnOK();
afx_msg void OnButtonLod0();
afx_msg void OnButtonLod1();
afx_msg void OnButtonLod2();
afx_msg void OnButtonLod4();
afx_msg void OnButtonLod5();
afx_msg void OnButtonLoddam0();
afx_msg void OnButtonLoddam1();
afx_msg void OnButtonLoddam2();
afx_msg void OnButtonLoddam3();
afx_msg void OnButtonLoddam4();
afx_msg void OnButtonLoddam5();
afx_msg void OnButtonLod3();
afx_msg void OnCheckAnim();
afx_msg void OnCheckObb();
afx_msg void OnBrowsePath();
afx_msg void OnBrowseSkel();
afx_msg void OnBrowseAnim();
afx_msg void OnBrowseObb();
afx_msg void OnBrowseCage();
afx_msg void OnCheckCage();
afx_msg void OnRadioChar();
afx_msg void OnRadioShape();
afx_msg void OnCheckCrossfade();
afx_msg void OnBrowseHint();
afx_msg void OnSelectMeganames();
afx_msg void OnSelectStartLOD();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_EDITBATCH_H__A2C66456_A937_4488_8582_E385894BC5BD__INCLUDED_)
@@ -0,0 +1,58 @@
//===========================================================================//
// File: ErfExport.cpp
// Project: MechWarrior 4
// Contents: Plugin to adjust height of max anmiations
//---------------------------------------------------------------------------//
// Date Who Modification //
// -------- --- ---------------------------------------------------------- //
// 04/28/99 JSE Initial coding,
//---------------------------------------------------------------------------//
// Copyright (C) 1998, Fasa Interactive, Inc.
// All Rights reserved worldwide
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL
//===========================================================================//
#include "stdafx.h"
#ifdef STRICT // Already defined by stdafx,
#undef STRICT // so we avoid warning linking msg
#endif
#ifdef _MBCS // The same as above
#undef _MBCS
#endif
#include "ErfExport.h"
#include <GameOs\TooLOS.hpp>
#include <DLLPlatform\DLLPlatform.hpp>
//undef Verify
#ifndef _DEBUG //This is a hack To make it link in Release
#undef Spew
//void Spew() {}
#endif
//===========================================================================//
int ErfExp::DoExport(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts)
{
int return_value;
__try
{
return_value = m_Expt.DoExportWrap(name, ei, i, suppressPrompts);
//return_value = true;
GetSystemSetting(SYSSET_CLEAR_UNDO);
Verify(!theHold.Holding());
}
__except(ProcessException(GetExceptionInformation()))
{
}
return return_value;
}
@@ -0,0 +1,73 @@
//===========================================================================//
// File: ErfExport.h
// Project: MechWarrior 4
// Contents: Plugin to adjust height of max anmiations
//---------------------------------------------------------------------------//
// Date Who Modification //
// -------- --- ---------------------------------------------------------- //
// 04/28/99 TAS Initial coding,
//---------------------------------------------------------------------------//
// Copyright (C) 1999, Microsoft
// All Rights reserved worldwide
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL
//===========================================================================//
#if !defined(AFX_ERFEXPORT_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_)
#define AFX_ERFEXPORT_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
class ErfExp;
#include "AnimationSuite.h"
#include "GeoExport.h"
class ErfExp : public SceneExport
{
protected:
GeoExporter m_Expt;
public:
ErfExp(): m_Expt("") {}
~ErfExp() {}
int ExtCount() { return 1; }
const TCHAR * Ext(int n) {
switch(n) {
case 0:
// This cause a static string buffer overwrite
// return GetString(IDS_EXTENSION1);
return _T("Erf");
}
return _T("");
}
const TCHAR * LongDesc() { return GetString(IDS_LONGDESC); }
const TCHAR * ShortDesc() { return _T("MW4 Erf"); }
const TCHAR * AuthorName() { return _T("Jerry Edsall,Thomas Steinke"); }
const TCHAR * CopyrightMessage() { return GetString(IDS_COPYRIGHT); }
const TCHAR * OtherMessage1() { return _T(""); }
const TCHAR * OtherMessage2() { return _T(""); }
unsigned int Version() { return 100; }
void ErfExp::ShowAbout(HWND hWnd) {
CAbout dlg;
dlg.DoModal();
}
int DoExport(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts=FALSE);
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_ANIMEXPORT_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_)
@@ -0,0 +1,151 @@
//===========================================================================//
// File: ErfImport.cpp
// Project: MechWarrior 4
// Contents: Plugin to export Collision Volume objects
//---------------------------------------------------------------------------//
// Date Who Modification //
// -------- --- ---------------------------------------------------------- //
// 07/29/99 jkyle
//---------------------------------------------------------------------------//
// Copyright (C) 1998, Fasa Interactive, Inc.
// All Rights reserved worldwide
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL
//===========================================================================//
#include "stdafx.h"
#ifdef STRICT // Already defined by stdafx,
#undef STRICT // so we avoid warning linking msg
#endif
#ifdef _MBCS // The same as above
#undef _MBCS
#endif
#include "ErfImport.h"
#include <GameOS\ToolOS.hpp>
#include <Stuff\StuffHeaders.hpp>
#include <DLLPlatform\DLLPlatform.hpp>
#include <mlr\mlrheaders.hpp>
#include "MaxProxies\MaxProxyHeaders.hpp"
#include <ElementProxies\ElementProxies.hpp>
#include "proxies\burnlights.hpp"
#include "ExportUtil.h"
//#include "nodeobject.h"
#include "cvobject.h"
#include "mw4.hpp"
//undef Verify
#ifndef _DEBUG //This is a hack To make it link in Release
#undef Spew
//void Spew() {}
#endif
//===========================================================================//
int ErfImp::DoImport(const TCHAR *name, ImpInterface *ii,Interface *i, BOOL suppressPrompts)
{
int return_value;
__try
{
return_value = DoImportWrap(name, ii, i, suppressPrompts);
//return_value = true;
GetSystemSetting(SYSSET_CLEAR_UNDO);
Verify(!theHold.Holding());
}
__except(ProcessException(GetExceptionInformation()))
{
}
return return_value;
}
extern int g_bConvertMeshes;
int ErfImp::DoImportWrap(const TCHAR *name,ImpInterface *ei,Interface *ip, BOOL suppressPrompts)
{
g_bConvertMeshes = 0;
AFX_MANAGE_STATE(AfxGetStaticModuleState());
CString gameDir = GetGamePath(ip);
TurnOnExceptions();
//Create the texture pool
{
gos_PushCurrentHeap(MidLevelRenderer::TexturePoolHeap);
MidLevelRenderer::TGAFilePool *pool = new MidLevelRenderer::TGAFilePool(gameDir+"\\content\\textures\\");
Check_Object(pool);
MidLevelRenderer::MLRTexturePool::Instance = new MidLevelRenderer::MLRTexturePool(pool);
Check_Object(MidLevelRenderer::MLRTexturePool::Instance);
Check_Object(MidLevelRenderer::MLRTexturePool::Instance);
gos_PopCurrentHeap();
}
// Load the .ERF
Stuff::FileStream erf_file;
Stuff::FileStream temp_erf_file;
erf_file.Open(name);
// Create the element_scene
ElementRenderer::GroupElement *element_scene = new ElementRenderer::GroupElement;
Check_Object(element_scene);
element_scene->SetRootMode();
element_scene->LockBounds();
ElementRenderer::Element *erf_element=NULL;
int version = ElementRenderer::ReadERFVersion(&erf_file);
while(erf_file.GetBytesRemaining() > 0)
{
erf_element =
ElementRenderer::Element::Create(
&erf_file,
version
);
erf_element->LockBounds();
element_scene->AttachChild(erf_element);
erf_element->ClearAlignX();
erf_element->SetNeverCullMode();
erf_element->SetLocalToParent(Stuff::LinearMatrix4D::Identity);
element_scene->Sync();
}
ElementProxies::ElementSceneProxy *element_scene_proxy = ElementProxies::ElementSceneProxy::MakeProxy(element_scene);
// Create the MAX interface
MAXProxies::MAXScene *max_scene = MAXProxies::MAXScene::MakeProxy(ip,"");
Check_Object(max_scene);
// copy the mesh from the element to the mesh in max
Proxies::CopyProcess copy_process;
max_scene->Copy(&copy_process,element_scene_proxy);
if (erf_element)
{
delete erf_element;
}
char dir[MAX_PATH],path[MAX_PATH],fname[MAX_PATH],ext[MAX_PATH];
_splitpath(name,dir,path,fname,ext);
int count = max_scene->rootList.Count();
for (int x=0;x<count;x++)
{
INode *pNode = max_scene->rootList.GetNode(x);
pNode->SetName((char *)fname);
}
if (ElementProxies::MLRTexturePoolProxy::Instance)
{
// ElementProxies::MLRTexturePoolProxy::Instance->CloseLibrary(true);
}
TurnOffExceptions();
g_bConvertMeshes = 1;
return true;
}
@@ -0,0 +1,69 @@
//===========================================================================//
// File: ErfImport.h
// Project: MechWarrior 4
// Contents: Plugin to adjust height of max anmiations
//---------------------------------------------------------------------------//
// Date Who Modification //
// -------- --- ---------------------------------------------------------- //
// 04/28/99 JSE Initial coding,
//---------------------------------------------------------------------------//
// Copyright (C) 1998, Fasa Interactive, Inc.
// All Rights reserved worldwide
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL
//===========================================================================//
#if !defined(AFX_ERFIMPORT_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_)
#define AFX_ERFIMPORT_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
class ErfImp;
#include "AnimationSuite.h"
class ErfImp : public SceneImport
{
public:
ErfImp() {}
~ErfImp() {}
int ExtCount() { return 1;}
const TCHAR * Ext(int n) {
switch(n) {
case 0:
// This cause a static string buffer overwrite
// return GetString(IDS_EXTENSION1);
return _T("erf");
}
return _T("");
}
const TCHAR * LongDesc() { return GetString(IDS_LONGDESC); }
const TCHAR * ShortDesc() { return _T("MW4 ERF"); }
const TCHAR * AuthorName() { return _T("Jonthan Kyle"); }
const TCHAR * CopyrightMessage() { return GetString(IDS_COPYRIGHT); }
const TCHAR * OtherMessage1() { return _T(""); }
const TCHAR * OtherMessage2() { return _T(""); }
unsigned int Version() { return 100; }
void ShowAbout(HWND hWnd) {
CAbout dlg;
dlg.DoModal();
}
int DoImport(const TCHAR *name, ImpInterface *ii,Interface *i, BOOL suppressPrompts=FALSE);
int DoImportWrap(const TCHAR *name,ImpInterface *ii,Interface *i, BOOL suppressPrompts=FALSE);
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_ANIMEXPORT_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_)
@@ -0,0 +1,56 @@
// ErrorDlg.cpp : implementation file
//
#include "stdafx.h"
#include "animationsuite.h"
#include "ErrorDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CErrorDlg dialog
CErrorDlg::CErrorDlg(CWnd* pParent /*=NULL*/)
: CDialog(CErrorDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CErrorDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CErrorDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CErrorDlg)
DDX_Control(pDX, IDC_LIGHT, m_btnLight);
DDX_Control(pDX, IDC_GEOMETRY, m_btnGeom);
DDX_Control(pDX, IDC_CV, m_btnCv);
DDX_Control(pDX, IDC_BATCH, m_btnBatch);
DDX_Control(pDX, IDC_ANIMATION, m_btnAnim);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CErrorDlg, CDialog)
//{{AFX_MSG_MAP(CErrorDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CErrorDlg message handlers
void CErrorDlg::OnOK()
{
m_bErf = m_btnGeom.GetCheck() != 0;
m_bBatch = m_btnBatch.GetCheck() != 0;
m_bObb = m_btnCv.GetCheck() != 0;
m_bLights = m_btnLight.GetCheck() != 0;
m_bAnim = m_btnAnim.GetCheck() != 0;
CDialog::OnOK();
}
@@ -0,0 +1,55 @@
#if !defined(AFX_ERRORDLG_H__FB5EC424_DB5E_440F_A4B8_D4FED38144B9__INCLUDED_)
#define AFX_ERRORDLG_H__FB5EC424_DB5E_440F_A4B8_D4FED38144B9__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ErrorDlg.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CErrorDlg dialog
class CErrorDlg : public CDialog
{
// Construction
public:
CErrorDlg(CWnd* pParent = NULL); // standard constructor
bool m_bErf;
bool m_bBatch;
bool m_bObb;
bool m_bLights;
bool m_bAnim;
// Dialog Data
//{{AFX_DATA(CErrorDlg)
enum { IDD = IDD_ERRORCHECK };
CButton m_btnLight;
CButton m_btnGeom;
CButton m_btnCv;
CButton m_btnBatch;
CButton m_btnAnim;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CErrorDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CErrorDlg)
virtual void OnOK();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_ERRORDLG_H__FB5EC424_DB5E_440F_A4B8_D4FED38144B9__INCLUDED_)
@@ -0,0 +1,730 @@
//===========================================================================//
// File: ExportUntil.cpp
// Project: MechWarrior 4
// Contents: helper function for exporters
//---------------------------------------------------------------------------//
// Date Who Modification //
// -------- --- ---------------------------------------------------------- //
// 05/10/00 fwang Initial coding,
//---------------------------------------------------------------------------//
// Copyright (C) 1998, Fasa Interactive, Inc.
// All Rights reserved worldwide
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL
//===========================================================================//
#include "stdafx.h"
#ifdef STRICT // Already defined by stdafx,
#undef STRICT // so we avoid warning linking msg
#endif
#ifdef _MBCS // The same as above
#undef _MBCS
#endif
#include "AnimationSuite.h"
#include "ArmatureExport.h"
#include "ExportUtil.h"
//undef Verify
#ifndef _DEBUG //This is a hack To make it link in Release
#undef Spew
void Spew() {}
#endif
// Helper functions
/*******************************************************************************
/* function name: ClearDirectory
/* description: Recursively clear all files in a directory
/*******************************************************************************/
void ClearDirectory(CString dir)
{
HANDLE hfl;
WIN32_FIND_DATA fd;
if(dir[dir.GetLength()-1]=='\\')
{
dir=dir.Left(dir.GetLength()-1);
}
fd.dwFileAttributes=NULL;
hfl=FindFirstFile(dir+"\\*.*",&fd);
if(INVALID_HANDLE_VALUE!=hfl)
{
do
{
if(fd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)
{
if(strcmp(fd.cFileName,".") && strcmp(fd.cFileName,"..") )
{
ClearDirectory(dir+"\\"+fd.cFileName);
RemoveDirectory(dir+"\\"+fd.cFileName);
}
}
else
{
DeleteFile(dir+"\\"+fd.cFileName);
}
} while(FindNextFile(hfl,&fd));
}
}
/*******************************************************************************
/* function name: MakeElementRoot
/* description:
/*******************************************************************************/
ElementRenderer::GroupElement *MakeElementRoot()
{
ElementRenderer::GroupElement *root = new ElementRenderer::GroupElement;
Check_Object(root);
return root;
}
/*******************************************************************************
/* function name: MakeElementScene
/* description:
/*******************************************************************************/
ElementProxies::ElementSceneProxy *MakeElementScene(ElementRenderer::GroupElement *pRoot,CString TexturePath)
{
ElementProxies::ElementSceneProxy *element_scene =
ElementProxies::ElementSceneProxy::MakeProxy(
pRoot,
TexturePath
);
Check_Object(element_scene);
return element_scene;
}
/*******************************************************************************
/* function name: InitElementScene
/* description:
/*******************************************************************************/
ElementProxies::ElementSceneProxy *InitElementScene(CString texturepath)
{
ElementRenderer::GroupElement *pRoot = MakeElementRoot();
ElementProxies::ElementSceneProxy *element_scene = MakeElementScene(pRoot,texturepath);
return element_scene;
}
/*******************************************************************************
/* function name: DestroyElementScene
/* description:
/*******************************************************************************/
int DestroyElementScene(ElementProxies::ElementSceneProxy *element_scene)
{
Verify(element_scene->GetReferenceCount() == 1);
element_scene->Destroy();
return 0;
}
/*******************************************************************************
/* function name: MakeMaxScene
/* description:
/*******************************************************************************/
MAXProxies::MAXScene *MakeMaxScene(Interface *i,CString strHintFile)
{
MAXProxies::MAXScene *max_scene = MAXProxies::MAXScene::MakeProxy(i,strHintFile);
Check_Object(max_scene);
return max_scene;
}
/*******************************************************************************
/* function name: CopySceneMaxToElement
/* description: Copy a MAXScene proxy into a ElementSceneProxy
/*******************************************************************************/
int CopySceneMaxToElement(ElementProxies::ElementSceneProxy *element_scene,
MAXProxies::MAXScene *max_scene,
bool bFlatShading,Interface *ip,int& progress,bool suppress)
{
CString ini_file = ip->GetDir(APP_PLUGCFG_DIR);
ini_file += "\\Plugins.ini";
Stuff::NotationFile config_file(ini_file);
MAXProxies::MAXCopyProcess copy_process(&config_file,ip,progress,suppress,(LPVOID)&ReportError);
element_scene->Copy(&copy_process, max_scene);
int ref_count = element_scene->GetReferenceCount();
MAXProxies::MAXFlattenHierarchyProcess flatten_hierarchy(&config_file,ip,progress,suppress);
element_scene->FlattenHierarchy(&flatten_hierarchy);
Verify(element_scene->GetReferenceCount() == ref_count);
MAXProxies::MAXSplitByStateProcess split_process(&config_file,ip,progress,suppress);
element_scene->SplitByState(&split_process);
Verify(element_scene->GetReferenceCount() == ref_count);
Proxies::MakeSingleSidedProcess sided_process(&config_file);
element_scene->MakeSingleSided(&sided_process);
Verify(element_scene->GetReferenceCount() == ref_count);
if (bFlatShading) {
Proxies::OptimizeFlatShadingProcess shading_process(&config_file);
element_scene->OptimizeFlatShading(&shading_process);
Verify(element_scene->GetReferenceCount() == ref_count);
}
return 0;
}
/*******************************************************************************
/* function name: CopyPolygonMeshProxyToElement
/* description: Copy a MAXPolygonMesh into a ElementSceneProxy
/*******************************************************************************/
int CopyPolygonMeshProxyToElement(ElementProxies::ElementSceneProxy *element_scene,
MAXProxies::MAXPolygonMesh *max_mesh,
bool bFlatShading,
Interface *ip,int& progress,bool suppress)
{
ElementProxies::ElementPolygonMeshProxy *element_mesh =
Cast_Object(ElementProxies::ElementPolygonMeshProxy *,
element_scene->AppendNewPolygonMeshProxy());
CString ini_file = ip->GetDir(APP_PLUGCFG_DIR);
ini_file += "\\Plugins.ini";
Stuff::NotationFile config_file(ini_file);
MAXProxies::MAXCopyProcess copy_process(&config_file,ip,progress,suppress,(LPVOID)&ReportError);
element_mesh->Copy(&copy_process,max_mesh);
element_mesh->SetLocalToParent(Stuff::LinearMatrix4D::Identity);
element_mesh->DetachReference();
int ref_count = element_scene->GetReferenceCount();
MAXProxies::MAXFlattenHierarchyProcess flatten_hierarchy(&config_file,ip,progress,suppress);
element_scene->FlattenHierarchy(&flatten_hierarchy);
Verify(element_scene->GetReferenceCount() == ref_count);
MAXProxies::MAXSplitByStateProcess split_process(&config_file,ip,progress,suppress);
element_scene->SplitByState(&split_process);
Verify(element_scene->GetReferenceCount() == ref_count);
Proxies::MakeSingleSidedProcess sided_process(&config_file);
element_scene->MakeSingleSided(&sided_process);
Verify(element_scene->GetReferenceCount() == ref_count);
if (bFlatShading) {
Proxies::OptimizeFlatShadingProcess shading_process(&config_file);
element_scene->OptimizeFlatShading(&shading_process);
Verify(element_scene->GetReferenceCount() == ref_count);
}
return 0;
}
/*******************************************************************************
/* function name: CopyGroupProxyToElement
/* description: Copy a MAXGroup into a ElementSceneProxy
/*******************************************************************************/
int CopyGroupProxyToElement(ElementProxies::ElementSceneProxy *element_scene,
MAXProxies::MAXGroup *proxy,bool bFlatShading,
Interface *ip,int& progress,bool suppress)
{
int err = 0;
Proxies::GroupProxy *group = Cast_Object(Proxies::GroupProxy *,proxy);
Proxies::ChildProxy *child = group->UseFirstChildProxy();
while (child)
{
Check_Object(child);
Proxies::ChildProxy *next = child->UseNextSiblingProxy();
Stuff::MString mstr;
child->GetName(&mstr);
CString name(mstr);
name.MakeLower();
// Do not copy lights and keep nodes
if (name.Find("light") < 0 && name.Find("keep_") < 0 &&
child->IsDerivedFrom(Proxies::PolygonMeshProxy::DefaultData)) {
MAXProxies::MAXPolygonMesh *max_mesh =
Cast_Object(MAXProxies::MAXPolygonMesh *,child);
err = CopyPolygonMeshProxyToElement(
element_scene, max_mesh, bFlatShading, ip, progress, suppress);
}
child->DetachReference();
if (err)
return err;
child = next;
}
return err;
}
/*******************************************************************************
/* function name: FusePolygonMeshProxy
/* description: Go through all sibling ElementPolygonMeshProxy
/* and fuse polygons meshes with identical states
/*******************************************************************************/
int FusePolygonMeshProxy(ElementProxies::ElementPolygonMeshProxy *mesh,
int child_count, Interface *ip,int& progress,bool suppress)
{
ElementProxies::ElementPolygonMeshProxy *next_mesh =
static_cast<ElementProxies::ElementPolygonMeshProxy*>(
mesh->UseNextSiblingProxy()
);
//
// First count up the number of children and make an array for the meshes
//
//if (next_mesh)
{
Verify(child_count > 0);
Stuff::DynamicArrayOf<ElementProxies::ElementPolygonMeshProxy *>
fused_children(child_count-1);
Stuff::DynamicArrayOf<Stuff::DynamicArrayOf<Proxies::PolygonProxy *> >
polys_array(child_count-1);
//
// Make the array for the polygons to add, then start spinning through
// the children
//
Stuff::DynamicArrayOf<Proxies::PolygonProxy *> new_polys;
unsigned poly_count = 0;
child_count = 0;
while (next_mesh) {
Check_Object(next_mesh);
ElementProxies::ElementPolygonMeshProxy *next =
static_cast<ElementProxies::ElementPolygonMeshProxy*>(
next_mesh->UseNextSiblingProxy()
);
fused_children[child_count] = next_mesh;
//
// Get its polys and copy them into the large array
//
unsigned start = poly_count;
unsigned len = next_mesh->UsePolygonArray(&polys_array[child_count]);
poly_count += len;
new_polys.SetLength(poly_count);
for (unsigned i=0; i<len; ++i)
new_polys[start++] = polys_array[child_count][i];
next_mesh = next;
++child_count;
}
CString ini_file = ip->GetDir(APP_PLUGCFG_DIR);
ini_file += "\\Plugins.ini";
Stuff::NotationFile config_file(ini_file);
MAXProxies::MAXCopyProcess copy_process(&config_file,ip,progress,suppress,(LPVOID)&ReportError);
mesh->AddPolygons(&copy_process, new_polys);
//
// Now destroy the old meshes
//
for (child_count=0; child_count<fused_children.GetLength(); ++child_count)
{
next_mesh = fused_children[child_count];
Check_Object(next_mesh);
next_mesh->DetachArrayReferences(&polys_array[child_count]);
Verify(next_mesh->GetReferenceCount() == 1);
next_mesh->Destroy();
}
}
return 0;
}
/*******************************************************************************
/* function name: FuseElementScene
/* description: Go through all children ElementPolygonMeshProxy
/* and fuse polygons meshes with identical states
/*******************************************************************************/
int FuseElementScene(ElementProxies::ElementSceneProxy *element_scene,
Interface *ip,int& progress,bool suppress)
{
Proxies::ChildProxy *first_child = element_scene->UseFirstChildProxy();
ElementProxies::ElementPolygonMeshProxy *first_mesh =
Cast_Object(ElementProxies::ElementPolygonMeshProxy*, first_child);
int err = FusePolygonMeshProxy(first_mesh, element_scene->GetChildCount(),
ip, progress, suppress);
first_child->DetachReference();
return err;
}
/*******************************************************************************
/* function name: OptimizeElementScene
/* description: Computing bounding spheres for all children ElementPolygonMeshProxy
/*******************************************************************************/
int OptimizeElementScene(ElementProxies::ElementSceneProxy *element_scene)
{
Proxies::ChildProxy *first_child = element_scene->UseFirstChildProxy();
ElementProxies::ElementPolygonMeshProxy *first_mesh =
Cast_Object(ElementProxies::ElementPolygonMeshProxy*, first_child);
ElementProxies::OptimizeSyncProcess optimize;
if (optimize.OptimizeSync(first_mesh))
first_mesh->DetachReference();
return 0;
}
/*******************************************************************************
/* function name: SetExplicitAlphaMode
/* description:
/*******************************************************************************/
int SetExplicitAlphaMode(ElementProxies::ElementSceneProxy *element_scene, MidLevelRenderer::MLRState::AlphaMode newAlphaMode)
{
Proxies::ChildProxy *first_child = element_scene->UseFirstChildProxy();
ElementProxies::ElementPolygonMeshProxy * first_mesh =
Cast_Object(ElementProxies::ElementPolygonMeshProxy*, first_child);
ElementProxies::SetExplicitAlphaModeProcess setAlphaMode;
if (setAlphaMode.SetExplicitAlphaMode(first_mesh, newAlphaMode))
first_mesh->DetachReference();
return 0;
}
/*******************************************************************************
/* function name: SetExplicitLightingMode
/* description:
/*******************************************************************************/
int SetExplicitLightingMode(ElementProxies::ElementSceneProxy *element_scene, MidLevelRenderer::MLRState::LightingMode newLightingMode)
{
Proxies::ChildProxy *first_child = element_scene->UseFirstChildProxy();
ElementProxies::ElementPolygonMeshProxy * first_mesh =
Cast_Object(ElementProxies::ElementPolygonMeshProxy*, first_child);
ElementProxies::SetExplicitLightingModeProcess setLightingMode;
if (setLightingMode.SetExplicitLightingMode(first_mesh, newLightingMode))
first_mesh->DetachReference();
return 0;
}
/*******************************************************************************
/* function name: SetExplicitFogMode
/* description:
/*******************************************************************************/
int SetExplicitFogMode(ElementProxies::ElementSceneProxy *element_scene, int newFogMode)
{
Proxies::ChildProxy *first_child = element_scene->UseFirstChildProxy();
ElementProxies::ElementPolygonMeshProxy * first_mesh =
Cast_Object(ElementProxies::ElementPolygonMeshProxy*, first_child);
ElementProxies::SetExplicitFogModeProcess setFogMode;
if (setFogMode.SetExplicitFogMode(first_mesh, newFogMode))
first_mesh->DetachReference();
return 0;
}
/*******************************************************************************
/* function name: GetElementShape
/* description:
/*******************************************************************************/
ElementRenderer::Element *GetElementShape(ElementProxies::ElementSceneProxy *element_scene)
{
Proxies::ChildProxy *first_child = element_scene->UseFirstChildProxy();
ElementProxies::ElementPolygonMeshProxy *first_mesh =
Cast_Object(ElementProxies::ElementPolygonMeshProxy*, first_child);
ElementRenderer::Element *element_shape = first_mesh->GetProxiedShape();
first_mesh->DetachReference();
return element_shape;
}
/*******************************************************************************
/* function name: SaveElementShape
/* description:
/*******************************************************************************/
int SaveElementShape(ElementRenderer::Element *element_shape,CString filename)
{
Check_Object(Stuff::FileStreamManager::Instance);
Stuff::FileStream element_stream;
element_stream.Open(filename, Stuff::FileStream::WriteOnly);
ElementRenderer::WriteERFVersion(&element_stream);
element_shape->SetRootMode();
element_shape->Save(&element_stream);
return 0;
}
/*******************************************************************************
/* function name: SaveElementScene
/* description:
/*******************************************************************************/
int SaveElementScene(ElementProxies::ElementSceneProxy *element_scene,CString filename)
{
ElementRenderer::Element *pShape = GetElementShape(element_scene);
return SaveElementShape(pShape,filename);
}
/*******************************************************************************
/* function name: GetMeshMatrices
/* description:
/*******************************************************************************/
int GetMeshMatrices(Proxies::GenericProxy *proxy,CMapStringToPtr *pTransInfo)
{
if(proxy->IsDerivedFrom(Proxies::SceneProxy::DefaultData))
{
Proxies::SceneProxy *scene=Cast_Object(Proxies::SceneProxy *,proxy);
Proxies::ChildProxy *child = scene->UseFirstChildProxy();
while (child)
{
Check_Object(child);
GetMeshMatrices(child,pTransInfo);
Proxies::ChildProxy *next = child->UseNextSiblingProxy();
child->DetachReference();
child = next;
}
}
else
if(proxy->IsDerivedFrom(Proxies::GroupProxy::DefaultData))
{
Proxies::GroupProxy *group=Cast_Object(Proxies::GroupProxy *,proxy);
Proxies::ChildProxy *child = group->UseFirstChildProxy();
while (child)
{
Check_Object(child);
GetMeshMatrices(child,pTransInfo);
Proxies::ChildProxy *next = child->UseNextSiblingProxy();
child->DetachReference();
child = next;
}
}
else
if(proxy->IsDerivedFrom(Proxies::PolygonMeshProxy::DefaultData))
{
Proxies::PolygonMeshProxy *mesh=Cast_Object(Proxies::PolygonMeshProxy *,proxy);
Stuff::MString mstr;
CString myname,myprefix;
mesh->GetName(&mstr);
mstr.RemoveSpaces();
mstr.ToLower();
myname=(char *)mstr;
myprefix=myname.Left(myname.Find("_",0));
if (mesh->GetParentGroupProxy())
{
MString tmstr;
mesh->GetParentGroupProxy()->GetName(&tmstr);
tmstr.RemoveSpaces();
tmstr.ToLower();
CString prefix,parent_name((char *)tmstr);
prefix=parent_name.Left(parent_name.Find("_",0));
if(myprefix.CompareNoCase("cv"))
{
if(prefix.CompareNoCase("joint"))
{
ReportError(CString(myname)+" :(Hierarchy error)Mesh is not attached to a joint");
return 1;
}
Stuff::LinearMatrix4D *pObjectToWorld = new Stuff::LinearMatrix4D;
mesh->GetParentGroupProxy()->GetLocalToWorld(pObjectToWorld);
(*pTransInfo)[mstr] = pObjectToWorld;
}
else
{
if(prefix.CompareNoCase("joint"))
{
ReportError(CString(myname)+" :(Hierarchy error)CV is not attached to a joint");
return 1;
}
}
}
}
return 0;
}
/*******************************************************************************
/* function name: FindNodeByName
/* description: helper function, find a node by node in the tree
/*******************************************************************************/
INode *FindNodeByName(INode *nde,CString &str)
{
{
CString str2(nde->GetName());
if(str2.CompareNoCase(str)==0)
return nde;
}
for(int i=0;i<nde->NumberOfChildren();i++)
{
INode *tnde;
tnde=FindNodeByName(nde->GetChildNode(i),str);
if(tnde!=NULL) return tnde;
}
return NULL;
}
/*******************************************************************************
/* function name: FindNodeByNames
/* description: helper function, find a node by node in the tree
/*******************************************************************************/
INode *FindNodeByNames(INode *nde, CString strs[])
{
INode *result = NULL;
for (int i=0; strs[i]!= ""; i++) {
if (result = FindNodeByName(nde, strs[i]))
return result;
}
return NULL;
}
/*******************************************************************************
/* function name: GetGamePath
/* description:
/*******************************************************************************/
CString GetGamePath(Interface *ip)
{
CString game_path;
TSTR ini_file = ip->GetDir(APP_PLUGCFG_DIR);
ini_file += "\\Plugins.ini";
Check_Pointer(Stuff::FileStreamManager::Instance);
Stuff::FileStream file_stream(ini_file);
if (!file_stream.IsFileOpened())
{
//AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
//AfxMessageBox(CString("ERROR: Must have the PlugIns.ini file in : ") + ini_file, MB_OK);
ReportError(CString(ip->GetCurFileName())+": ERROR: Must have the PlugIns.ini file in "+ini_file);
}
Stuff::NotationFile data_file(ini_file);
const char* read_dir;
Stuff::Page *page = data_file.FindPage("BRBData");
if (page && page->GetEntry("GameDir", &read_dir))
{
game_path = read_dir;
}
return game_path+"\\";
}
/*******************************************************************************
/* function name: IsNodeCamera
/* description:
/*******************************************************************************/
bool IsNodeCamera(INode *node)
{
if (node == NULL) return false;
ObjectState os = node->EvalWorldState(0);
if (os.obj)
{
if (os.obj->SuperClassID() == CAMERA_CLASS_ID)
{
return true;
}
}
return false;
}
/*******************************************************************************
/* function name: IsNodeGeometry
/* description:
/*******************************************************************************/
bool IsNodeGeometry(INode *node)
{
if (node == NULL) return false;
ObjectState os = node->EvalWorldState(0);
if (os.obj)
{
if (os.obj->SuperClassID() == GEOMOBJECT_CLASS_ID)
{
if (os.obj->CanConvertToType(Class_ID(TRIOBJ_CLASS_ID, 0)))
{
return true;
}
}
}
return false;
}
/*******************************************************************************
/* function name: IsNodePartOfGroupGeometry
/* description:
/*******************************************************************************/
bool IsNodePartOfGroupGeometry(INode *node)
{
// Is it a geometry?
if (!IsNodeGeometry(node))
return false;
// Does it have a parent?
INode *group= node->GetParentNode();
if (!group)
return false;
// Is it the first non-light geometry child node of its parent?
Stuff::MString name = node->GetName();
for (int x=0;x<group->NumberOfChildren();x++)
{
INode *child = group->GetChildNode(x);
Stuff::MString childName = child->GetName();
CString strChildName(childName);
strChildName.MakeLower();
if (IsNodeGeometry(child) &&
strChildName.Find("light")<0 &&
strChildName.Find("keep_")<0) {
if (strcmp(childName,name))
return true;
else
return false;
}
}
return false;
}
/*******************************************************************************
/* function name: GetLightNode
/* description:
/*******************************************************************************/
INode *GetLightNode(INode *node)
{
// Is it a geometry?
if (!IsNodeGeometry(node))
return NULL;
// Does it have a parent?
INode *group= node->GetParentNode();
if (!group)
return NULL;
for (int x=0;x<group->NumberOfChildren();x++)
{
INode *child = group->GetChildNode(x);
CString name = child->GetName();
name.MakeLower();
if (IsNodeGeometry(child) && name.Find("light")>=0)
return child;
}
return NULL;
}
// Global Error Reporting
CString g_strLogFile("C:\\export.log");
int g_bCleanupErrors = 0;
/*******************************************************************************
/* function name: ReportError
/* description:
/*******************************************************************************/
int ReportError(const char * str,bool bSupress)
{
if (!bSupress)
{
MessageBox(NULL,str,"Animation Suite Error",MB_OK);
}
FILE *f = fopen(g_strLogFile,"a");
fprintf(f,"%s\n", (const char *)str);
fclose(f);
return 0;
}
@@ -0,0 +1,71 @@
//===========================================================================//
// File: ExportUntil.h
// Project: MechWarrior 4
// Contents: helper function for exporters
//---------------------------------------------------------------------------//
// Date Who Modification //
// -------- --- ---------------------------------------------------------- //
// 05/10/00 fwang Initial coding,
//---------------------------------------------------------------------------//
// Copyright (C) 1998, Fasa Interactive, Inc.
// All Rights reserved worldwide
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL
//===========================================================================//
#if !defined(_EXPORTUTIL__INCLUDED_)
#define _EXPORTUTIL__INCLUDED_
#include "stdafx.h"
#ifdef STRICT // Already defined by stdafx,
#undef STRICT // so we avoid warning linking msg
#endif
#ifdef _MBCS // The same as above
#undef _MBCS
#endif
#include <Stuff\StuffHeaders.hpp>
#include <ElementProxies\ElementProxies.hpp>
#include "MaxProxies\MaxProxyHeaders.hpp"
#include "Proxies\ProxyHeaders.hpp"
#include <proxies\optimizeflatshading.hpp>
void ClearDirectory(CString dir);
ElementProxies::ElementSceneProxy *InitElementScene(CString texturepath);
int DestroyElementScene(ElementProxies::ElementSceneProxy *element_scene);
MAXProxies::MAXScene *MakeMaxScene(Interface *i,CString strHintFile);
int CopyPolygonMeshProxyToElement(
ElementProxies::ElementSceneProxy *element_scene,
MAXProxies::MAXPolygonMesh *max_mesh,bool bFlatShading,
Interface *ip,int& progress,bool suppress);
int CopyGroupProxyToElement(
ElementProxies::ElementSceneProxy *element_scene,
MAXProxies::MAXGroup *max_proxy,bool bFlatShading,
Interface *ip,int& progress,bool suppress);
int CopySceneMaxToElement(
ElementProxies::ElementSceneProxy *element_scene,
MAXProxies::MAXScene *max_scene,bool bFlatShading,
Interface *ip,int& progress,bool suppress);
int FusePolygonMeshProxy(
ElementProxies::ElementPolygonMeshProxy *mesh, int child_count,
Interface *ip,int& progress,bool suppress);
int FuseElementScene(
ElementProxies::ElementSceneProxy *element_scene,
Interface *ip,int& progress,bool suppress);
int OptimizeElementScene(ElementProxies::ElementSceneProxy *element_scene);
int SetExplicitFogMode(ElementProxies::ElementSceneProxy *element_scene, int newFogMode);
int SetExplicitLightingMode(ElementProxies::ElementSceneProxy *element_scene, MidLevelRenderer::MLRState::LightingMode newLightingMode);
int SetExplicitAlphaMode(ElementProxies::ElementSceneProxy *element_scene, MidLevelRenderer::MLRState::AlphaMode newAlphaMode);
int SaveElementScene(ElementProxies::ElementSceneProxy *element_scene,CString filename);
int SaveElementShape(ElementRenderer::Element *element_shape,CString filename);
int GetMeshMatrices(Proxies::GenericProxy *proxy,CMapStringToPtr *pTransInfo);
bool IsNodeCamera(INode *node);
bool IsNodeGeometry(INode *node);
bool IsNodePartOfGroupGeometry(INode *node);
INode *FindNodeByName(INode *nde,CString &str);
INode *FindNodeByNames(INode *nde,CString strs[]);
CString GetGamePath(Interface *ip);
INode *GetLightNode(INode *node);
int ReportError(const char *,bool bSuppress=false);
#endif
@@ -0,0 +1,535 @@
//===========================================================================//
// File: falltool.cpp
// Project: MechWarrior 4
// Contents: Plugin to modify mech falling animations
//---------------------------------------------------------------------------//
// Date Who Modification //
// -------- --- ---------------------------------------------------------- //
// 05/26/99 jkyle Initial coding,
//---------------------------------------------------------------------------//
// Copyright (C) 1999, Fasa Interactive, Inc.
// All Rights reserved worldwide
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL
//===========================================================================//
#include "stdafx.h"
#ifdef STRICT // Already defined by stdafx,
#undef STRICT // so we avoid warning linking msg
#endif
#ifdef _MBCS // The same as above
#undef _MBCS
#endif
#include "FallTool.hpp"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
//////////////////////////////////////////////////////////////////////
// ProtoTypes
int NegateKeys(Control *pControl,int key_number = 0);
int SwapKeys(Control *pCtrl1,Control *pCtrl2,int key_number = 0);
//////////////////////////////////////////////////////////////////////
// Global Variables
FallToolPanel g_fallToolPanel;
////////////////////////////////////////////////////////////////////////////////
// FallToolPanel Dialog Procedure to handle User and System Interactions
static BOOL CALLBACK FallToolPanelProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
switch (msg) {
case WM_INITDIALOG: //Panel's extra initialization
g_fallToolPanel.Init(hWnd);
break;
case WM_DESTROY: //Panel's extra destruction
g_fallToolPanel.Destroy(hWnd);
break;
case WM_COMMAND :
switch (LOWORD(wParam)) { //Handle Panel's controls
case IDC_ABOUT: {
CAbout dlg;
dlg.DoModal();
break;}
case IDC_FALLTOOL_FALLLEFT:
{
// Spec is reversed
g_fallToolPanel.m_iFallType = FallToolPanel::FALL_RIGHT;
break;
}
case IDC_FALLTOOL_FALLRIGHT:
{
g_fallToolPanel.m_iFallType = FallToolPanel::FALL_LEFT;
break;
}
case IDC_FALLTOOL_FALLBACK:
{
g_fallToolPanel.m_iFallType = FallToolPanel::FALL_BACK;
break;
}
case IDC_FALLTOOL_EXECUTE:
{
g_fallToolPanel.ExecuteFallTool();
break;
}
}
break;
////////////////////////////////////////////////////////////////////////
//The following lines are not necessary for MAX2 Plugins
case WM_LBUTTONDOWN:
case WM_LBUTTONUP:
case WM_MOUSEMOVE:
g_fallToolPanel.m_ip->RollupMouseMessage(hWnd, msg, wParam, lParam);
break;
////////////////////////////////////////////////////////////////////////
default:
return FALSE;
}
return TRUE;
}
////////////////////////////////////////////////////////////////////////////////
// Display the Plugin's Panel
void FallToolPanel::BeginEditParams(Interface* ip, IUtil* iu)
{
m_ip = ip; //Get the Plugin's Interface
m_iu = iu; //Get the Utility Plugin's Interface
//Display the plugin's Rollup Dialog
AFX_MANAGE_STATE(AfxGetStaticModuleState());
HINSTANCE loc_hInstance = AfxGetResourceHandle ();
m_hPanel = m_ip->AddRollupPage(loc_hInstance, MAKEINTRESOURCE(IDD_FALLTOOL_PANEL),
FallToolPanelProc, GetString(IDS_FALLTOOL_NAME),0);
}
////////////////////////////////////////////////////////////////////////////////
// Free the Plugins' Panel
void FallToolPanel::EndEditParams(Interface *ip, IUtil *iu)
{
m_iu = NULL;
m_ip = NULL;
//Remove the Rollup Dialog
ip->DeleteRollupPage(m_hPanel);
m_hPanel = NULL;
}
////////////////////////////////////////////////////////////////////////////////
// Panel Initialization callback
void FallToolPanel::Init(HWND hWnd)
{
SendDlgItemMessage(hWnd, IDC_FALLTOOL_FALLLEFT, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
}
////////////////////////////////////////////////////////////////////////////////
// Panel Destruction callback
void FallToolPanel::Destroy(HWND hWnd)
{
}
////////////////////////////////////////////////////////////////////////////////
// Execute the fall tool
int FallToolPanel::ExecuteFallTool()
{
INode *pjoint_VEL = m_ip->GetINodeByName("joint_VEL");
INode *pjoint_ROOT = m_ip->GetINodeByName("joint_ROOT");
INode *phandle_lfoot = m_ip->GetINodeByName("handle_lfoot");
INode *phandle_rfoot = m_ip->GetINodeByName("handle_rfoot");
// Make sure we have all of these nodes, or else the model will mess up pretty bad
if (pjoint_VEL && pjoint_ROOT && phandle_lfoot && phandle_rfoot)
{
// Adjust pjoint_VEL
if (TRUE)
{
// Adjust the joint_VEL node
if (Control *pControl = pjoint_VEL->GetTMController())
{
// Adjust the position controllers
if (Control *pPosControl = pControl->GetPositionController())
{
// Adjust the XPosition Controller
Control *pXControl = NULL;
if (pXControl = pPosControl->GetXController())
{
if (IKeyControl *pKeyControl = GetKeyControlInterface(pXControl))
{
if (pKeyControl->GetNumKeys()<1)
return -1;
switch (m_iFallType)
{
case FALL_LEFT:
{
break;
}
case FALL_RIGHT:
{
break;
}
case FALL_BACK:
{
NegateKeys(pXControl);
break;
}
}
}
}
// Adjust the YPosition Controller
if (Control *pYControl = pPosControl->GetYController())
{
if (IKeyControl *pKeyControl = GetKeyControlInterface(pYControl))
{
switch (m_iFallType)
{
case FALL_RIGHT:
{
SwapKeys(pYControl,pXControl);
NegateKeys(pXControl);
NegateKeys(pYControl);
break;
}
case FALL_LEFT:
{
SwapKeys(pYControl,pXControl);
// Fall through to negate key
}
case FALL_BACK:
{
NegateKeys(pYControl);
break;
}
}
}
}
}
// Adjust the rotation controllers
if (Control *pRotControl = pControl->GetRotationController())
{
// Adjust the ZRotation Controller
if (Control *pZControl = pRotControl->GetZController())
{
if (IKeyControl *pKeyControl = GetKeyControlInterface(pZControl))
{
float rot = (float)M_PI;
switch (m_iFallType)
{
case FALL_RIGHT:
{
rot *= -1.0;
}
case FALL_LEFT:
{
rot /= -2.0;
// Fall through to FALL_BACK
}
case FALL_BACK:
{
IBezFloatKey key;
key.time = 0;
//key.flags = IKEY_ZSEL;
key.val = 0;
key.intan = 0;
key.outtan = 0;
pKeyControl->AppendKey(&key);
Interval iv = m_ip->GetAnimRange();
key.time = iv.End();
key.val = rot;
pKeyControl->AppendKey(&key);
pKeyControl->SortKeys();
break;
}
}
}
}
}
}
}
// Adjust the foot nodes - same for both feet
if (TRUE)
{
int foot = 2;
do
{
foot--;
Control *pControl= NULL;
if (1==foot)
pControl = phandle_lfoot->GetTMController();
else
pControl = phandle_rfoot->GetTMController();
if (pControl)
{
if (Control *pPosControl = pControl->GetPositionController())
{
//Adjust the XPosition
Control *pXControl;
if (pXControl = pPosControl->GetXController())
{
if (IKeyControl *pKeyControl = GetKeyControlInterface(pXControl))
{
switch (m_iFallType)
{
case FALL_LEFT:
{
break;
}
case FALL_RIGHT:
{
break;
}
case FALL_BACK:
{
NegateKeys(pXControl,1);
break;
}
}
}
}
//Adjust the YPosition
if (Control *pYControl = pPosControl->GetYController())
{
if (IKeyControl *pKeyControl = GetKeyControlInterface(pYControl))
{
switch (m_iFallType)
{
case FALL_RIGHT:
{
NegateKeys(pYControl,1);
}
case FALL_LEFT:
{
// Fall through to negate Y in FALL_BACK
SwapKeys(pYControl,pXControl,1);
}
case FALL_BACK:
{
if (m_iFallType != FALL_RIGHT)
NegateKeys(pYControl,1);
break;
}
}
}
}
}
if (Control *pRotControl = pControl->GetRotationController())
{
//Adjust the ZRotation Controller
if (Control *pZControl = pRotControl->GetZController())
{
if (IKeyControl *pKeyControl = GetKeyControlInterface(pZControl))
{
float rot = (float)M_PI;
switch (m_iFallType)
{
case FALL_LEFT:
{
rot *= -1.0;
}
case FALL_RIGHT:
{
rot /= 2.0;
// Fall through to FALL_BACK
}
case FALL_BACK:
{
IBezFloatKey key;
int i;
pKeyControl->GetKey(i = (pKeyControl->GetNumKeys()-1),&key);
key.val += rot;
pKeyControl->SetKey(i,&key);
break;
}
}
}
}
}
}
} while (foot);
}
return 0;
}
return -1;
}
int NegateKeys(Control *pControl,int key_number)
{
int MaxKeys;
IKeyControl *ikc = GetKeyControlInterface(pControl);
Class_ID id = pControl->ClassID();
MaxKeys=ikc->GetNumKeys();
for(;key_number<MaxKeys;key_number++)
{
if (id == Class_ID(LININTERP_FLOAT_CLASS_ID,0))
{
ILinFloatKey key;
ikc->GetKey(key_number, &key);
key.val=key.val*-1;
ikc->SetKey(key_number, &key);
}
else if (id == Class_ID(HYBRIDINTERP_FLOAT_CLASS_ID,0))
{
IBezFloatKey key;
ikc->GetKey(key_number, &key);
key.val*=-1;
key.intan*=-1;
key.outtan*=-1;
ikc->SetKey(key_number, &key);
}
else if (id == Class_ID(TCBINTERP_FLOAT_CLASS_ID,0))
{
ITCBFloatKey key;
ikc->GetKey(key_number, &key);
key.val*=-1;
ikc->SetKey(key_number, &key);
}
else if (id == Class_ID(LININTERP_POSITION_CLASS_ID,0))
{
ILinPoint3Key key;
ikc->GetKey(key_number, &key);
key.val.x*=-1;
key.val.y*=-1;
key.val.z*=-1;
ikc->SetKey(key_number, &key);
}
else if (id == Class_ID(HYBRIDINTERP_POSITION_CLASS_ID,0))
{
IBezPoint3Key key;
ikc->GetKey(key_number, &key);
key.val.x*=-1;
key.intan.x*=-1;
key.outtan.x*=-1;
key.val.y*=-1;
key.intan.y*=-1;
key.outtan.y*=-1;
key.val.z*=-1;
key.intan.z*=-1;
key.outtan.z*=-1;
ikc->SetKey(key_number, &key);
}
else if (id == Class_ID(TCBINTERP_POSITION_CLASS_ID,0))
{
ITCBPoint3Key key;
ikc->GetKey(key_number, &key);
key.val.x*=-1;
key.val.y*=-1;
key.val.z*=-1;
ikc->SetKey(key_number, &key);
}
else if (id == Class_ID(LININTERP_ROTATION_CLASS_ID,0))
{
ILinRotKey key;
ikc->GetKey(key_number, &key);
key.val.w*=-1;
ikc->SetKey(key_number, &key);
}
else if (id == Class_ID(HYBRIDINTERP_ROTATION_CLASS_ID,0))
{
IBezQuatKey key;
ikc->GetKey(key_number, &key);
key.val.w*=-1;
ikc->SetKey(key_number, &key);
}
else if (id == Class_ID(TCBINTERP_ROTATION_CLASS_ID,0))
{
ITCBRotKey key;
ikc->GetKey(key_number, &key);
key.val.angle*=-1;
ikc->SetKey(key_number, &key);
}
else if (id == Class_ID(HYBRIDINTERP_POINT3_CLASS_ID,0))
{
IBezPoint3Key key;
ikc->GetKey(key_number, &key);
key.val.x*=-1;
key.val.y*=-1;
key.val.z*=-1;
ikc->SetKey(key_number, &key);
}
else if (id == Class_ID(TCBINTERP_POINT3_CLASS_ID,0))
{
ITCBPoint3Key key;
ikc->GetKey(key_number, &key);
key.val.x*=-1;
key.val.y*=-1;
key.val.z*=-1;
ikc->SetKey(key_number, &key);
}
} // end of for i
return MaxKeys;
}
static int SwapKeys(Control *pCtrl1,Control *pCtrl2,int key_number)
{
if (!(pCtrl1 && pCtrl2))
{
return 0;
}
// Only swap same IDs
Class_ID id;
if ((id = pCtrl1->ClassID()) != pCtrl2->ClassID())
return 1;
IKeyControl *pKey1 = GetKeyControlInterface(pCtrl1);
IKeyControl *pKey2 = GetKeyControlInterface(pCtrl2);
int MaxKeys1 = pKey1->GetNumKeys();
int MaxKeys2 = pKey2->GetNumKeys();
// First copy all the keys, then delete them from both controls, then append them back
if (id == Class_ID(HYBRIDINTERP_FLOAT_CLASS_ID,0))
{
IBezFloatKey *keyarr = new IBezFloatKey[MaxKeys1-key_number];
for (int i=key_number;i<MaxKeys1;i++)
{
IBezFloatKey key;
pKey1->GetKey(i,&keyarr[i-key_number]);
}
pKey1->SetNumKeys(key_number);
for (i=key_number;i<MaxKeys2;i++)
{
IBezFloatKey key;
pKey2->GetKey(i,&key);
pKey1->AppendKey(&key);
}
pKey2->SetNumKeys(key_number);
for (i=0;i<(MaxKeys1-key_number);i++)
{
IBezFloatKey key;
pKey2->AppendKey(&keyarr[i]);
}
delete keyarr;
pKey1->SortKeys();
pKey2->SortKeys();
}
return 0;
}
@@ -0,0 +1,64 @@
// FallTool.hpp: interface for the FallToolPanel class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_FALLTOOL_HPP__083B9FC6_1396_11D3_915D_00609712FBEF__INCLUDED_)
#define AFX_FALLTOOL_HPP__083B9FC6_1396_11D3_915D_00609712FBEF__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#ifdef STRICT // Already defined by stdafx,
#undef STRICT // so we avoid warning linking msg
#endif
#ifdef _MBCS // The same as above
#undef _MBCS
#endif
class FallToolPanel;
#include "AnimationSuite.h"
#ifndef __FALLTOOL__
#define __FALLTOOL__
class FallToolPanel : public UtilityObj
{
protected:
HINSTANCE m_hInstance;
IUtil* m_iu;
HWND m_hPanel;
public:
enum {FALL_LEFT,FALL_RIGHT,FALL_BACK};
Interface* m_ip;
int m_iFallType;
FallToolPanel() : m_iFallType(FALL_RIGHT) {}
virtual ~FallToolPanel() {}
// Overides of the UtilityObj class
void BeginEditParams(Interface* ip, IUtil* iu);
void EndEditParams(Interface* ip, IUtil* iu);
void DeleteThis() {}
void Init(HWND hWnd);
void Destroy(HWND hWnd);
// Specific functions
int ExecuteFallTool();
};
#endif
#endif // !defined(AFX_FALLTOOL_HPP__083B9FC6_1396_11D3_915D_00609712FBEF__INCLUDED_)
/////////////////////////////////////////////////////////////////////////////
// FallToolPanel dialog
@@ -0,0 +1,304 @@
#include "stdafx.h"
#include "GeoExport.h"
#include <GameOS\GameOS.hpp>
#include <GameOS\ToolOS.hpp>
#include <proxies\makesinglesided.hpp>
#include <proxies\optimizeflatshading.hpp>
#include "MaxProxies\MaxProxyHeaders.hpp"
#include "ExportUtil.h"
#if !defined(DLLPLATFORM_DLLPLATFORM_HPP)
#include "DLLPlatform\DLLPlatform.hpp"
#endif
//===========================================================================//
int GeoExporter::DoExportWrap(const TCHAR *name,ExpInterface *ei,Interface *ip, BOOL suppressPrompts)
{
StartExport(ip, CString("Exporting ERF data."), suppressPrompts?true:false);
//
// fill in all the directories
//
if (!LoadPlugCfg(ip))
return false;
MAXProxies::MAXScene *max_scene = MakeMaxScene(ip,m_strHintFile);
Check_Object(max_scene);
// Check for errors
if (!CheckForErrors(max_scene,ip))
{
return false;
}
ExportMaxScene(max_scene, ip, name);
EndExport(ip);
return true;
}
/*******************************************************************************
/* function name: WriteOutGeometry_Video_Data_Files
/* description: write out .video file for specified geometries
/*******************************************************************************/
int GeoExporter::WriteOutGeometry_Video_Data_Files(
const CString& path,const CString& fileName, const CString& strCageName,
const CString &lightFileName, RootGeo rootGeos[], int numOfRootGeos, bool bSetUniqueYes)
{
CString videoFileName = fileName+".video";
NotationFile videofile;
// Is there a light node
if (lightFileName != "")
{
// NotationFile videofile;
Page *vidpage = videofile.AddPage("LightLOD");
Check_Object(vidpage);
vidpage->SetEntry("Type","ShapeComponent");
vidpage->SetEntry("Geometry",lightFileName);
if (bSetUniqueYes)
{
vidpage->SetEntry("Unique", true);
}
vidpage = videofile.AddPage("LightWatcher");
Check_Object(vidpage);
vidpage->SetEntry("Type","AttributeWatcherOfInt");
vidpage->SetEntry("Attribute","IsDark");
vidpage->SetEntry("SimulationShouldExecute","1");
vidpage = videofile.AddPage("LightSwitch");
Check_Object(vidpage);
vidpage->SetEntry("Type","SwitchComponent");
vidpage->SetEntry("Input","LightWatcher");
vidpage->SetEntry("Child","LightLOD");
}
bool fDamLodsPresent = false;
bool fLodsPresent = false;
// There should be at least one root geometry
Verify(numOfRootGeos>=1);
// If there is more than one root geometry
// each one will need a ShapeComponent/SlidingShapeComponent,
// and we need a GroupComponent to get all the shape compoments
if (numOfRootGeos > 1)
{
for (int i=0; i<numOfRootGeos; i++) {
CString erf_filename = rootGeos[i].name;
erf_filename += ".erf";
if (gos_DoesFileExist(path+erf_filename))
{
Page *page = videofile.SetPage(rootGeos[i].name);
Check_Object(page);
page->SetEntry("Type",rootGeos[i].type);
page->SetEntry("Geometry",erf_filename);
if (bSetUniqueYes)
{
page->SetEntry("Unique", true);
}
if (rootGeos[i].type == "SlidingShapeComponent") {
page->SetEntry("Transform",rootGeos[i].transform);
page->SetEntry("SimulationShouldExecute", "yes");
page->SetEntry("Unique", true);
}
}
}
Page* vidpage = videofile.SetPage("Group");
Check_Object(vidpage);
vidpage->SetEntry("Type", "GroupComponent");
for (i=0; i<numOfRootGeos; i++) {
CString erf_filename = rootGeos[i].name;
erf_filename += ".erf";
if (gos_DoesFileExist(path+erf_filename))
vidpage->AppendEntry("Child", rootGeos[i].name);
}
vidpage = videofile.SetPage("Watcher");
Check_Object(vidpage);
vidpage->SetEntry("Type","AttributeWatcherOfInt");
vidpage->SetEntry("Attribute","VisualRepresentation");
vidpage->SetEntry("SimulationShouldExecute","1");
vidpage = videofile.SetPage("DamageAppearance");
Check_Object(vidpage);
vidpage->SetEntry("Type","SwitchComponent");
vidpage->SetEntry("Input","Watcher");
vidpage->SetEntry("Child", "Group");
}
// If there is only one root geometry
else if (numOfRootGeos == 1)
{
bool bDoCage = false;
CString name_ext = rootGeos[0].name;
name_ext = name_ext.Right(4);
if ((0==stricmp("cage",name_ext)) && strCageName.GetLength())
bDoCage = true;
// Cage need some special entries
if (bDoCage)
{
Page *vidpage = videofile.SetPage("Fake1");
Check_Object(vidpage);
vidpage->SetEntry("Type","GroupComponent");
vidpage = videofile.SetPage("Fake2");
Check_Object(vidpage);
vidpage->SetEntry("Type","GroupComponent");
vidpage = videofile.SetPage("Cage");
Check_Object(vidpage);
vidpage->SetEntry("Type","ShapeComponent");
vidpage->SetEntry("Geometry",strCageName);
if (bSetUniqueYes)
{
vidpage->SetEntry("Unique", true);
}
vidpage->SetEntry("DisableShadow","true");
vidpage = videofile.SetPage("DestroyedCage");
Check_Object(vidpage);
vidpage->SetEntry("Type","ShapeComponent");
vidpage->SetEntry("Geometry",strCageName);
if (bSetUniqueYes)
{
vidpage->SetEntry("Unique", true);
}
vidpage->SetEntry("DisableShadow","true");
}
CString erf_filename = rootGeos[0].name;
erf_filename += ".erf";
if (gos_DoesFileExist(path+erf_filename))
{
fLodsPresent = true; // at least one present
Page *page = videofile.SetPage("LOD");
Check_Object(page);
page->SetEntry("Type",rootGeos[0].type);
page->SetEntry("Geometry",erf_filename);
if (bSetUniqueYes)
{
page->SetEntry("Unique", true);
}
if (rootGeos[0].type == "SlidingShapeComponent") {
page->SetEntry("Transform",rootGeos[0].transform);
page->SetEntry("SimulationShouldExecute", "yes");
}
}
CString erf_DAM_filename = rootGeos[0].name;;
erf_DAM_filename += "_DAM.erf";
if (gos_DoesFileExist(path+erf_DAM_filename))
{
fDamLodsPresent = true; // at least one present
Page *page = videofile.SetPage("DAMLOD");
page->SetEntry("Type","ShapeComponent");
page->SetEntry("Geometry",erf_DAM_filename);
if (bSetUniqueYes)
{
page->SetEntry("Unique", true);
}
}
Page* vidpage = videofile.SetPage("Watcher");
Check_Object(vidpage);
vidpage->SetEntry("Type","AttributeWatcherOfInt");
vidpage->SetEntry("Attribute","VisualRepresentation");
vidpage->SetEntry("SimulationShouldExecute","1");
vidpage = videofile.SetPage("DamageAppearance");
Check_Object(vidpage);
vidpage->SetEntry("Type","SwitchComponent");
vidpage->SetEntry("Input","Watcher");
if (fLodsPresent)
vidpage->AppendEntry("Child","LOD");
if (fDamLodsPresent)
vidpage->AppendEntry("Child","DAMLOD");
if (bDoCage) {
vidpage->AppendEntry("Child","Fake1");
vidpage->AppendEntry("Child","Fake2");
vidpage->AppendEntry("Child","Cage");
vidpage->AppendEntry("Child","DestroyedCage");
}
}
//
// HACKHACK - Locator has to be last no matter what so add any pages we need from above in case we get here first..
//
if (lightFileName != "")
{
Page* vidpage = videofile.SetPage("Locator");
Check_Object(vidpage);
vidpage->AppendEntry("Child","LightSwitch");
vidpage->AppendEntry("Child","DamageAppearance");
}
else {
Page* vidpage = videofile.SetPage("Locator");
vidpage->AppendEntry("Child","DamageAppearance");
}
videofile.SaveAs(path+videoFileName);
return 0;
}
/*******************************************************************************
/* function name: GetRootGeos
/* description: Traverse the max node to determine which geometries are going into
/* the .video file
/*******************************************************************************/
int GeoExporter::GetRootGeos(CString path, RootGeo rootGeos[], int* numOfRootGeos, INode *node)
{
TurnOffExceptions();
for (int x=node->NumberOfChildren()-1;x>=0;x--)
{
GetRootGeos(path, rootGeos, numOfRootGeos, node->GetChildNode(x));
TSTR value;
INode *pChild = node->GetChildNode(x);
CString name = pChild->GetName();
name.MakeLower();
// Does its name contains "KEEP_"
if (name.Find("keep_")>=0 &&
gos_DoesFileExist(path+name+".erf")) {
rootGeos[*numOfRootGeos].name = name;
if (pChild->GetUserPropString("ANIMATE",value))
{
// Use SlidingShapeComponent for animated textures
rootGeos[*numOfRootGeos].type = "SlidingShapeComponent";
CString str(value);
int index = str.Find(",",0);
if (index>=0)
str = str.Left(index);
str.MakeUpper();
if (str == "LTREAD")
rootGeos[*numOfRootGeos].transform = "LTread";
else if (str == "RTREAD")
rootGeos[*numOfRootGeos].transform = "RTread";
}
else
rootGeos[*numOfRootGeos].type = "ShapeComponent";
(*numOfRootGeos)++;
}
TurnOnExceptions();
}
return 0;
}
@@ -0,0 +1,49 @@
//===========================================================================//
// File: GeoExport.h
// Project: MechWarrior 4
// Contents: Base Class for exporting plugins
//---------------------------------------------------------------------------//
// Date Who Modification //
// -------- --- ---------------------------------------------------------- //
// 04/28/99 TAS Initial coding,
//---------------------------------------------------------------------------//
// Copyright (C) 1999, Microsoft
// All Rights reserved worldwide
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL
//===========================================================================//
#ifndef __GEOEXPORT__
#define __GEOEXPORT__
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#include "BaseGeoExport.h"
#include "AnimationSuite.h"
typedef struct {
CString name;
CString type;
CString transform;
}RootGeo;
//Exports Erfs
class GeoExporter: public BaseGeoExporter
{
public:
GeoExporter(const char *str) : BaseGeoExporter(str) {}
int DoExportWrap(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts=FALSE);
int WriteOutGeometry_Video_Data_Files(
const CString& path,const CString& fileName, const CString& strCageName,
const CString &lightFileName, RootGeo rootGeos[], int numOfRootGeos, bool bSetUniqueYes);
int GetRootGeos(CString path, RootGeo rootGeos[], int* numRootGeos, INode *node);
};
/////////////////////////////////////////////////////////////////////////////
#endif
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,172 @@
//===========================================================================//
// File: HilAdjust.cpp
// Project: MechWarrior 4
// Contents: Plugin to adjust height of max anmiations
//---------------------------------------------------------------------------//
// Date Who Modification //
// -------- --- ---------------------------------------------------------- //
// 04/28/99 JSE Initial coding,
//---------------------------------------------------------------------------//
// Copyright (C) 1998, Fasa Interactive, Inc.
// All Rights reserved worldwide
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL
//===========================================================================//
#if !defined(AFX_HILLADJUST_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_)
#define AFX_HILLADJUST_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#ifdef STRICT // Already defined by stdafx,
#undef STRICT // so we avoid warning linking msg
#endif
#ifdef _MBCS // The same as above
#undef _MBCS
#endif
class HillAdjustPanel;
#include "AnimationSuite.h"
#ifndef __HILLADJUST__
#define __HILLADJUST__
#define TIME_TO_FRAME(time, frame) \
if (GetTicksPerFrame() != 0 || time != 0) \
{ \
frame = (int)((float)time / (float)GetTicksPerFrame()); \
} \
else \
{ \
frame = 0; \
}
class HillAdjustPanel : public UtilityObj {
protected:
HINSTANCE m_hInstance;
IUtil* m_iu;
enum {
UpAngleType,
DownAngleType,
LeftAngleType,
RightAngleType
};
public:
Interface* m_ip;
HWND m_hPanel, m_hQuickFile;
int m_angleEnum;
int m_leaveOriginalCurves;
int m_leaveOriginalTangents;
int m_scaleInPlace;
ISpinnerControl *m_angleSpinner;
Stuff::Scalar m_angleSlope;
ISpinnerControl *m_rootScalePosXControl;
ISpinnerControl *m_rootScalePosYControl;
ISpinnerControl *m_rootScalePosZControl;
ISpinnerControl *m_rootScaleRotXControl;
ISpinnerControl *m_rootScaleRotYControl;
ISpinnerControl *m_rootScaleRotZControl;
ISpinnerControl *m_rootMovePosXControl;
ISpinnerControl *m_rootMovePosYControl;
ISpinnerControl *m_rootMovePosZControl;
ISpinnerControl *m_rootMoveRotXControl;
ISpinnerControl *m_rootMoveRotYControl;
ISpinnerControl *m_rootMoveRotZControl;
ISpinnerControl *m_hipScaleControl;
ISpinnerControl *m_hipMoveControl;
ISpinnerControl *m_torsoScaleXControl;
ISpinnerControl *m_torsoScaleYControl;
ISpinnerControl *m_torsoScaleZControl;
ISpinnerControl *m_leftFootScaleCloseControl;
ISpinnerControl *m_rightFootScaleCloseControl;
Stuff::Point3D m_rootPosScale;
Stuff::Point3D m_rootRotScale;
Stuff::Point3D m_rootPosMove;
Stuff::Point3D m_rootRotMove;
Stuff::Point3D m_hipScale;
Stuff::Point3D m_hipMove;
Stuff::Point3D m_torsoScale;
Stuff::Point3D m_leftFootPosScale;
Stuff::Point3D m_rightFootPosScale;
// Constructor & Destructor
HillAdjustPanel() :m_angleEnum(-1) {}
virtual ~HillAdjustPanel() {}
// Overides of the UtilityObj class
void BeginEditParams(Interface* ip, IUtil* iu);
void EndEditParams(Interface* ip, IUtil* iu);
void DeleteThis() {}
void Init(HWND hWnd);
void Destroy(HWND hWnd);
//Specific Methods
void AdjustToHill();
void ConvertTM(Control *c);
void Convert(Control *parent_c, Control *c, int location);
void SampleController(Control *parent_c, Control *c, int location);
void AdjustGeneral(void);
void AdjustUpHill(void);
void AdjustDownHill(void);
void AdjustLeftHill(void);
void AdjustRightHill(void);
void ScaleNodePosition(INode *node, Stuff::Point3D scale);
void ScaleNodeRotation(INode *node, Stuff::Point3D scale);
void MoveNodePosition(INode *node, Stuff::Point3D scale);
void MoveNodeRotation(INode *node, Stuff::Point3D scale);
void ScaleNodeAll(Control *c, float scale);
void MoveNodeAll(Control *c, float scale);
INode* FindNode(INode* node, const char *name_of_joint);
Stuff::Scalar GetKeyValue(Control *c, IKeyControl *ikeys, int key_number);
int GetKeyTime(Control *c, IKeyControl *ikeys, int key_number);
void MoveKey(Control *c, IKeyControl *ikeys, Stuff::Scalar amount, int key_number);
void ScaleKey(Control *c, IKeyControl *ikeys, Stuff::Scalar amount, Stuff::Scalar median,int key_number);
//void RotateTangents(Control *c, IKeyControl *ikeys, Stuff::Scalar intan_amount, Stuff::Scalar outttan_amount, int key_number);
void RotateTangents(Control *c, IKeyControl *ikeys, Stuff::Scalar height, int key_number);
void LoadValues(HWND);
void SaveValues();
};
/////////////////////////////////////////////////////////////////////////////
#endif
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_HILLADJUST_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_)
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,172 @@
#if !defined(AFX_JOINTEDITDIALOG_H__8D9FD983_FEC9_11D1_854E_00A0C9B4E907__INCLUDED_)
#define AFX_JOINTEDITDIALOG_H__8D9FD983_FEC9_11D1_854E_00A0C9B4E907__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// JointEditDialog.h : header file
//
class JointEditDialog;
#include "AnimationSuite.h"
#define TIME_TO_FRAME(time, frame) \
if (GetTicksPerFrame() != 0 || time != 0) \
{ \
frame = (int)((float)time / (float)GetTicksPerFrame()); \
} \
else \
{ \
frame = 0; \
}
/////////////////////////////////////////////////////////////////////////////
// JointEditDialog dialog
#define JOINTPREFS_SAVE_CLASS_ID Class_ID(0xe835e35, 0x7e1e3fd1)
#define JOINT_SAVE_SUPER_CLASS_ID UTILITY_CLASS_ID
#define TEMP_DATA_ID 1
#define PERM_DATA_ID 0
struct JointPreference
{
public:
bool m_forceExclude;
int m_excludeJoint;
enum {
ExcludeJoint = 0,
IncludeJoint,
AutoJoint
};
bool m_decodeWithVelocity;
enum {
LinearKeyframeType,EulerXYZKeyframeType,PositionXYZKeyframeType
};
bool m_forceConvertRotation;
bool m_convertRotationJoint;
int m_rotationConvertType;
bool m_forceConvertTranslation;
bool m_convertTranslationJoint;
int m_translationConvertType;
bool m_optimizeRotation;
Stuff::Radian m_rotationThreshold;
bool m_rotationRange;
int m_rotationSampleStartFrame;
int m_rotationSampleEndFrame;
bool m_optimizeTranslation;
Stuff::Scalar m_translationThreshold;
bool m_translationRange;
int m_translationSampleStartFrame;
int m_translationSampleEndFrame;
};
class JointEditDialog : public CDialog
{
// Construction
public:
JointEditDialog(INode *root_node, Interface *ip, CWnd* pParent = NULL); // standard constructor
static void DeleteAllJointPrefrence(INode* node);
static int CountChildren(INode *node);
static JointPreference * GetJointPrefrence(INode* node);
static void CopyJointPrefrence(INode* source_node, INode* target_node);
void AddJointPreference(INode* node);
void CountNodes(INode* node, int& node_count);
bool NodeAnimated(INode* node);
// Dialog Data
//{{AFX_DATA(JointEditDialog)
enum { IDD = IDD_JOINT_EDIT };
CComboBox m_tranConvertCombo;
CComboBox m_rotConvertCombo;
CComboBox m_includeCombo;
BOOL m_rotOptCheck;
BOOL m_tranOptCheck;
BOOL m_rotRangeCheck;
BOOL m_tranRangeCheck;
BOOL m_encodeVelocityCheck;
float m_rotThresholdEdit;
float m_tranThresholdEdit;
int m_rotMaxRange;
int m_rotMinRange;
int m_tranMaxRange;
int m_tranMinRange;
BOOL m_rotConvertCheck;
BOOL m_tranConvertCheck;
//}}AFX_DATA
protected:
bool m_forceExclude;
bool m_forceConvertRotation;
bool m_forceConvertTranslation;
Interface *m_max_interface;
INode *m_rootNode;
bool m_firstDataSave;
private:
HTREEITEM AddToTree(CTreeCtrl *tree, INode *node, HTREEITEM parent);
void LoadPrefs(INode* node, JointPreference *prefs);
bool NodeIsRoot(INode* node);
bool KnownNode(INode* node);
bool HasKnownControler(INode *node);
bool IsKnownControlerType(Control *c);
void ClearControls();
void SaveControls(JointPreference *j_pref);
void InitControls(JointPreference *j_pref);
void AcceptTempData(INode *node);
void CancelTempData(INode *node);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(JointEditDialog)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(JointEditDialog)
virtual BOOL OnInitDialog();
virtual void OnOK();
virtual void OnCancel();
afx_msg void OnRevertJoint();
afx_msg void OnSelchangedNodeTree(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnCheckRotOpt();
afx_msg void OnConvertRotCheck();
afx_msg void OnCheckRotRange();
afx_msg void OnConvertTranCheck();
afx_msg void OnCheckTranOpt();
afx_msg void OnCheckTranRange();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_JOINTEDITDIALOG_H__8D9FD983_FEC9_11D1_854E_00A0C9B4E907__INCLUDED_)
@@ -0,0 +1,159 @@
/***************************************************************************
* *
* 3DS Max Test Plugin *
* *
***************************************************************************
* *
* Version : 1.0ß, March 11th, 1998 *
* *
* Written By Loic Baumann from Fatal Design, specially for Gamasutra *
* *
***************************************************************************
* *
* This Plugin demonstrates how to write a simple 3DS MAX Plugin, using MFCs *
* *
***************************************************************************/
#include "stdafx.h"
#ifdef STRICT // Already defined by stdafx,
#undef STRICT // so we avoid warning linking msg
#endif
#ifdef _MBCS // The same as above
#undef _MBCS
#endif
#include "JointPrefrence.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
JointPreferencePanel g_jointPreferencePanel;
////////////////////////////////////////////////////////////////////////////////
// JointPrefrencePanel Dialog Procedure to handle User and System Interactions
static BOOL CALLBACK JointPrefPanelProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
switch (msg) {
case WM_INITDIALOG: //Panel's extra initialization
g_jointPreferencePanel.Init(hWnd);
break;
case WM_DESTROY: //Panel's extra destruction
g_jointPreferencePanel.Destroy(hWnd);
break;
case WM_COMMAND :
switch (LOWORD(wParam)) { //Handle Panel's controls
case IDC_ABOUT: {
CAbout dlg;
dlg.DoModal();
break;
}
case IDC_EDIT_JOINT: {
g_jointPreferencePanel.EditPrefs();
break;
}
case IDC_DELETE_ALL: {
g_jointPreferencePanel.DeletePrefs();
break;
}
}
break;
////////////////////////////////////////////////////////////////////////
//The following lines are not necessary for MAX2 Plugins
case WM_LBUTTONDOWN:
case WM_LBUTTONUP:
case WM_MOUSEMOVE:
g_jointPreferencePanel.m_ip->RollupMouseMessage(hWnd, msg, wParam, lParam);
break;
////////////////////////////////////////////////////////////////////////
default:
return FALSE;
}
return TRUE;
}
////////////////////////////////////////////////////////////////////////////////
// Display the Plugin's Panel
void JointPreferencePanel::BeginEditParams(Interface* ip, IUtil* iu)
{
m_ip = ip; //Get the Plugin's Interface
m_iu = iu; //Get the Utility Plugin's Interface
//Display the plugin's Rollup Dialog
AFX_MANAGE_STATE(AfxGetStaticModuleState());
HINSTANCE loc_hInstance = AfxGetResourceHandle ();
m_hPanel = ip->AddRollupPage(loc_hInstance, MAKEINTRESOURCE(IDD_JOINT_PREF_PANEL),
JointPrefPanelProc, GetString(IDS_JOINTPREF_NAME),0);
}
////////////////////////////////////////////////////////////////////////////////
// Free the Plugins' Panel
void JointPreferencePanel::EndEditParams(Interface *ip, IUtil *iu)
{
m_iu = NULL;
m_ip = NULL;
//Remove the Rollup Dialog
ip->DeleteRollupPage(m_hPanel);
m_hPanel = NULL;
}
////////////////////////////////////////////////////////////////////////////////
// Panel Initialization callback
void JointPreferencePanel::Init(HWND hWnd)
{
}
////////////////////////////////////////////////////////////////////////////////
// Panel Destruction callback
void JointPreferencePanel::Destroy(HWND hWnd)
{
}
////////////////////////////////////////////////////////////////////////////////
// Called when the Pick Button is pushed
void JointPreferencePanel::EditPrefs()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
HINSTANCE loc_hInstance = AfxGetResourceHandle ();
JointEditDialog dialog(g_jointPreferencePanel.m_ip->GetRootNode(), m_ip);
dialog.DoModal();
}
////////////////////////////////////////////////////////////////////////////////
// Called when the delete Button is pushed
void JointPreferencePanel::DeletePrefs()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
HINSTANCE loc_hInstance = AfxGetResourceHandle ();
if (::MessageBox(m_hPanel, "DELETE ALL MW4 Prefrences?", "Are you sure?", MB_OKCANCEL) == IDOK)
{
JointEditDialog::DeleteAllJointPrefrence(g_jointPreferencePanel.m_ip->GetRootNode());
}
}
@@ -0,0 +1,74 @@
// PlugTest.h : main header file for the PLUGTEST DLL
//
#if !defined(AFX_JOINTPREF_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_)
#define AFX_JOINTPREF_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#ifdef STRICT // Already defined by stdafx,
#undef STRICT // so we avoid warning linking msg
#endif
#ifdef _MBCS // The same as above
#undef _MBCS
#endif
class JointPrefrencePanel;
#include "AnimationSuite.h"
/////////////////////////////////////////////////////////////////////////////
// JointPrefrenceApp
// See PlugTest.cpp for the implementation of this class
//
#ifndef __JOINTPREF__
#define __JOINTPREF__
/////////////////////////////////////////////////////////////////////////////
// PlugPanel, manage the Plugins' display panel
class JointPreferencePanel : public UtilityObj {
protected:
HINSTANCE m_hInstance;
IUtil* m_iu;
HWND m_hPanel;
public:
Interface* m_ip;
// Constructor & Destructor
JointPreferencePanel() {};
virtual ~JointPreferencePanel() {};
// Overides of the UtilityObj class
void BeginEditParams(Interface* ip, IUtil* iu);
void EndEditParams(Interface* ip, IUtil* iu);
void DeleteThis() {}
void Init(HWND hWnd);
void Destroy(HWND hWnd);
//Specific Methods
void EditPrefs();
void DeletePrefs();
};
/////////////////////////////////////////////////////////////////////////////
#endif
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_JOINTPREF_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_)
@@ -0,0 +1,890 @@
/***************************************************************************
* *
* 3DS Max Test Plugin *
* *
***************************************************************************
* *
* Version : 1.0ß, March 11th, 1998 *
* *
* Written By Loic Baumann from Fatal Design, specially for Gamasutra *
* *
***************************************************************************
* *
* This Plugin demonstrates how to write a simple 3DS MAX Plugin, using MFCs *
* *
***************************************************************************/
#include "stdafx.h"
#ifdef STRICT // Already defined by stdafx,
#undef STRICT // so we avoid warning linking msg
#endif
#ifdef _MBCS // The same as above
#undef _MBCS
#endif
#include "LegMirrorPanel.h"
#include "HillAdjust.hpp"
//#ifdef _DEBUG
//#define new DEBUG_NEW
//#undef THIS_FILE
//static char THIS_FILE[] = __FILE__;
//#endif
#include <direct.h>
#include "MissionImp.h"
#include "ExportUtil.h"
//#include "mapsizedlg.h"
LegMirrorPanel g_legmirrorPanel;
////////////////////////////////////////////////////////////////////////////////
// JointPrefrencePanel Dialog Procedure to handle User and System Interactions
static BOOL CALLBACK LegMirrorPanelProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
switch (msg) {
case WM_INITDIALOG: //Panel's extra initialization
g_legmirrorPanel.Init(hWnd);
break;
case WM_DESTROY: //Panel's extra destruction
g_legmirrorPanel.Destroy(hWnd);
break;
case WM_COMMAND :
switch (LOWORD(wParam)) { //Handle Panel's controls
case IDC_ABOUT: {
CAbout dlg;
dlg.DoModal();
break;}
case IDC_MIRRORLEG: {
g_legmirrorPanel.DoMirror();
break;}
case IDC_REVERSEANIM:
{
g_legmirrorPanel.DoReverse();
break;}
case IDC_REVSITES:
{
g_legmirrorPanel.RevSites();
break;}
case IDC_FIXEXP:
{
g_legmirrorPanel.DoFixExp();
break;}
case IDC_EXPORTANIM:
{
g_legmirrorPanel.DoExportAnims();
break;}
case IDC_FIXSCALE:
{
g_legmirrorPanel.FixScale();
break;
}
case IDC_EXPORTLIGHTS:
{
g_legmirrorPanel.ExportLights();
break;
}
case IDC_IMPORTCONTENTS:
{
g_legmirrorPanel.ImportMission();
break;
}
}
break;
////////////////////////////////////////////////////////////////////////
//The following lines are not necessary for MAX2 Plugins
case WM_LBUTTONDOWN:
case WM_LBUTTONUP:
case WM_MOUSEMOVE:
g_legmirrorPanel.m_ip->RollupMouseMessage(hWnd, msg, wParam, lParam);
break;
////////////////////////////////////////////////////////////////////////
default:
return FALSE;
}
return TRUE;
}
////////////////////////////////////////////////////////////////////////////////
// Display the Plugin's Panel
void LegMirrorPanel::BeginEditParams(Interface* ip, IUtil* iu)
{
m_ip = ip; //Get the Plugin's Interface
m_iu = iu; //Get the Utility Plugin's Interface
//Display the plugin's Rollup Dialog
AFX_MANAGE_STATE(AfxGetStaticModuleState());
HINSTANCE loc_hInstance = AfxGetResourceHandle ();
m_hPanel = ip->AddRollupPage(loc_hInstance, MAKEINTRESOURCE(IDD_LEGMIRROR_PANEL),
LegMirrorPanelProc, GetString(IDS_LEGMIRROR_NAME),0);
}
////////////////////////////////////////////////////////////////////////////////
// Free the Plugins' Panel
void LegMirrorPanel::EndEditParams(Interface *ip, IUtil *iu)
{
m_iu = NULL;
m_ip = NULL;
//Remove the Rollup Dialog
ip->DeleteRollupPage(m_hPanel);
m_hPanel = NULL;
}
////////////////////////////////////////////////////////////////////////////////
// Called when the Pick Button is pushed
LegMirrorPanel::LRFLAG LegMirrorPanel::TellSide(INode *nde)
{
CString nname(nde->GetName());
int cpos;
cpos=nname.FindOneOf("_");
if(cpos==-1)
return ISNEITHER;
else
if(nname[cpos+1]=='l' || nname[cpos+1]=='L')
if(FindCorespondingNode(nde))
return ISLEFT;
else
return ISNEITHER;
else
if(nname[cpos+1]=='r' || nname[cpos+1]=='R' )
if(FindCorespondingNode(nde))
return ISRIGHT;
else
return ISNEITHER;
return ISNEITHER;
}
INode *LegMirrorPanel::FindCorespondingNode(INode *nde)
{
if(nde==NULL) return NULL;
CString nname(nde->GetName());
int cpos;
cpos=nname.FindOneOf("_");
if(cpos==-1) return NULL;
if(nname[cpos+1]=='l' || nname[cpos+1]=='L')
nname.SetAt(cpos+1,'r');
else
if(nname[cpos+1]=='r' || nname[cpos+1]=='R')
nname.SetAt(cpos+1,'l');
else
return NULL;
return FindNodeByName(m_ip->GetRootNode(),nname);
}
void LegMirrorPanel::RevSites()
{
RevSiteOnNode(m_ip->GetRootNode());
m_ip->ForceCompleteRedraw();
}
void LegMirrorPanel::RevSiteOnNode(INode *nde)
{
CString str(nde->GetName());
if(IsSite(str))
{
AngAxis rot(Point3(0.0f,0.0f,1.0f),PI);
Matrix3 axis(MAT_IDENT);
nde->Rotate(0, nde->GetObjectTM(0,NULL), rot,TRUE,FALSE);
}
for(int i=0;i<nde->NumberOfChildren();i++)
{
RevSiteOnNode(nde->GetChildNode(i));
}
}
bool LegMirrorPanel::IsExprControl(Control *ctrl)
{
Class_ID id;
id=ctrl->ClassID();
return (id==Class_ID(EXPR_POS_CONTROL_CLASS_ID,0)||
id==Class_ID(EXPR_P3_CONTROL_CLASS_ID,0) ||
id==Class_ID(EXPR_FLOAT_CONTROL_CLASS_ID,0) ||
id==Class_ID(EXPR_SCALE_CONTROL_CLASS_ID,0) ||
id==Class_ID(EXPR_ROT_CONTROL_CLASS_ID,0) );
}
Control *LegMirrorPanel::GetControlByName(Animatable *nde,CString &cnme,int *subanim)
{
int i;
Control *cpt;
for(i=0;i<nde->NumSubs();i++)
{
CString ccn(nde->SubAnimName(i));
if(!ccn.CompareNoCase(cnme))
{
*subanim=i;
return (Control *)nde;
}
else
{
cpt=GetControlByName(nde->SubAnim(i),cnme,subanim);
if(cpt) return cpt;
}
}
return NULL;
}
void LegMirrorPanel::PlaceZeroKeys(INode *nde)
{
CString str(nde->GetName());
if(!IsSite(str))
{
Control *tm_con,*pos_con,*rot_con,*xp_con,*yp_con,*zp_con,*xr_con,*yr_con,*zr_con;
IKeyControl *ikc;
tm_con = nde->GetTMController();
if(tm_con!=NULL)
{
pos_con = tm_con->GetPositionController();
rot_con = tm_con->GetRotationController();
if(rot_con)
{
xr_con=rot_con->GetXController();
if(xr_con!=NULL)
{
}
yr_con=rot_con->GetYController();
if(yr_con!=NULL)
{
ikc = GetKeyControlInterface(yr_con);
if(ikc && !ikc->GetNumKeys())
{
AnimateOn();
nde->Rotate(1,IdentityTM(),Quat(0.0,0.0,0.0,0.0));
AnimateOff();
}
}
zr_con=rot_con->GetZController();
if(zr_con!=NULL)
{
ikc = GetKeyControlInterface(zr_con);
if(ikc && !ikc->GetNumKeys())
{
AnimateOn();
nde->Rotate(1,IdentityTM(),Quat(0.0,0.0,0.0,0.0));
AnimateOff();
}
}
}
if( !IsJoint(str) || ( IsJoint(str) && TellSide(nde)==ISNEITHER ) )
if(pos_con)
{
xp_con=pos_con->GetXController();
if(xp_con!=NULL)
{
ikc = GetKeyControlInterface(xp_con);
if(ikc && !ikc->GetNumKeys())
{
{
AnimateOn();
nde->Move(1,IdentityTM(),Point3(0,0,0));
AnimateOff();
}
}
}
yp_con=pos_con->GetYController();
if(yp_con!=NULL)
{
}
zp_con=pos_con->GetZController();
if(zp_con!=NULL)
{
}
}
}
}
for(int i=0;i<nde->NumberOfChildren();i++)
{
PlaceZeroKeys(nde->GetChildNode(i));
}
}
bool LegMirrorPanel::HasCircularReference(INode *nde, ExprControl *expc)
{
int i,slot;
TSTR nname;
CString str(nde->GetName()),ndename;
for(i=0;i<expc->getVarCount(VECTOR_EXPR);i++)
{
slot=expc->vVars[i].refID;
expc->refTab[slot].client->NotifyDependents(FOREVER,(PartID)&nname,REFMSG_GET_NODE_NAME);
ndename=nname;
if(!str.CompareNoCase(ndename)) return true;
}
for(i=0;i<expc->getVarCount(SCALAR_VAR);i++)
{
slot=expc->sVars[i].refID;
expc->refTab[slot].client->NotifyDependents(FOREVER,(PartID)&nname,REFMSG_GET_NODE_NAME);
ndename=nname;
if(!str.CompareNoCase(ndename)) return true;
}
return false;
}
void LegMirrorPanel::FixExpressions(INode *nde)
{
for(int i=0;i<nde->NumberOfChildren();i++)
{
FixExpressions(nde->GetChildNode(i));
}
CString str(nde->GetName());
Control *tm_con,*pos_con,*rot_con,*xp_con,*yp_con,*zp_con,*xr_con,*yr_con,*zr_con;
tm_con = nde->GetTMController();
if(tm_con!=NULL)
{
pos_con = tm_con->GetPositionController();
rot_con = tm_con->GetRotationController();
if(rot_con)
{
xr_con=rot_con->GetXController();
if(xr_con!=NULL)
{
if(!GetKeyControlInterface(xr_con) &&
IsExprControl(xr_con) &&
HasCircularReference(nde,(ExprControl *)xr_con))
{
FixExpControl(nde,(ExprControl *)xr_con,0);
}
}
yr_con=rot_con->GetYController();
if(yr_con!=NULL)
{
if(!GetKeyControlInterface(yr_con)
&& IsExprControl(yr_con)&&
HasCircularReference(nde,(ExprControl *)yr_con))
{
FixExpControl(nde,(ExprControl *)yr_con,1);
}
}
zr_con=rot_con->GetZController();
if(zr_con!=NULL)
{
if(!GetKeyControlInterface(zr_con)
&& IsExprControl(zr_con)&&
HasCircularReference(nde,(ExprControl *)zr_con))
{
FixExpControl(nde,(ExprControl *)zr_con,2);
}
}
}
if(pos_con)
{
xp_con=pos_con->GetXController();
if(xp_con!=NULL)
{
if(!GetKeyControlInterface(xp_con)
&& IsExprControl(xp_con)&&
HasCircularReference(nde,(ExprControl *)xp_con))
{
FixExpControl(nde,(ExprControl *)xp_con,0);
}
}
yp_con=pos_con->GetYController();
if(yp_con!=NULL)
{
if(!GetKeyControlInterface(yp_con)
&& IsExprControl(yp_con)&&
HasCircularReference(nde,(ExprControl *)yp_con))
{
FixExpControl(nde,(ExprControl *)yp_con,1);
}
}
zp_con=pos_con->GetZController();
if(zp_con!=NULL)
{
if(!GetKeyControlInterface(zp_con)
&& IsExprControl(zp_con)&&
HasCircularReference(nde,(ExprControl *)zp_con))
{
FixExpControl(nde,(ExprControl *)zp_con,2);
}
}
}
}
}
void LegMirrorPanel::FixExpControl(INode *mynde, ExprControl *expc,int axis)
{
int i,slot;
TSTR nname;
INode *nde,*tnde=0;
Control *cpt;
CString str(mynde->GetName());
for(i=0;i<expc->getVarCount(VECTOR_EXPR);i++)
{
slot=expc->vVars[i].refID;
expc->refTab[slot].client->NotifyDependents(FOREVER,(PartID)&nname,REFMSG_GET_NODE_NAME);
tnde=NULL;
if( IsTorsoJoint(str) )
{
if(axis==0)
tnde=FindNodeByName(m_ip->GetRootNode(),CString("joint_hip"));
else
tnde=FindNodeByName(m_ip->GetRootNode(),CString("joint_ROOT"));
}
else
if(TellSide(mynde)!=ISNEITHER)
{
nde=m_ip->GetINodeByName(nname);
tnde=FindCorespondingNode(nde);
}
else
{
// Circular Reference on node cannot be handled
}
if(tnde!=NULL)
{
int sanim;
CString conname(expc->refTab[slot].client->SubAnimName(expc->vVars[i].subNum));
if(tnde->GetTMController())
{
cpt=GetControlByName(tnde->GetTMController(),conname,&sanim);
ASSERT(cpt);
expc->assignController(VECTOR_EXPR,i,cpt,sanim);
}
}
}
for(i=0;i<expc->getVarCount(SCALAR_VAR);i++)
{
slot=expc->sVars[i].refID;
expc->refTab[slot].client->NotifyDependents(FOREVER,(PartID)&nname,REFMSG_GET_NODE_NAME);
if( IsTorsoJoint(str) )
{
if(axis==0)
tnde=FindNodeByName(m_ip->GetRootNode(),CString("joint_hip"));
else
tnde=FindNodeByName(m_ip->GetRootNode(),CString("joint_ROOT"));
}
else
if(TellSide(mynde)!=ISNEITHER)
{
nde=m_ip->GetINodeByName(nname);
tnde=FindCorespondingNode(nde);
}
else
{
// Circular Reference on node cannot be handled
}
if(tnde!=NULL)
{
int sanim;
CString conname(expc->refTab[slot].client->SubAnimName(expc->sVars[i].subNum));
cpt=GetControlByName(tnde->GetTMController(),conname,&sanim);
ASSERT(cpt);
expc->assignController(SCALAR_VAR,i,cpt,sanim);
}
}
}
void LegMirrorPanel::DoFixExp()
{
FixExpressions(m_ip->GetRootNode());
}
void LegMirrorPanel::DoExportAnims()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
HINSTANCE loc_hInstance = AfxGetResourceHandle ();
CString tdir;
CFileDialog fdiag(TRUE,NULL,NULL,OFN_ALLOWMULTISELECT,"Max Files (*.max)|*.max||",NULL);
char *filebuf=new char[MAX_PATH*200];
filebuf[0]=0;
fdiag.m_ofn.lpstrFile=filebuf;
fdiag.m_ofn.nMaxFile=MAX_PATH*200;
if(fdiag.DoModal()==IDOK)
{
char pname[MAX_PATH];
BROWSEINFO bi;
bi.hwndOwner =NULL;
bi.pidlRoot = NULL;
bi.pszDisplayName = NULL;
bi.lpszTitle = "Choose Destination Path...";
bi.ulFlags = BIF_RETURNONLYFSDIRS;
bi.lpfn = NULL;
bi.lParam = (LPARAM)loc_hInstance;
LPITEMIDLIST pidl = SHBrowseForFolder(&bi);
if (SHGetPathFromIDList(pidl,pname))
{
tdir=pname;
}
if (bi.pidlRoot)
{
ILFree( const_cast< ITEMIDLIST* >( bi.pidlRoot ) );
}
POSITION pos;
pos=fdiag.GetStartPosition();
CString finalname,fname;
while(pos!=NULL)
{
fname=fdiag.GetNextPathName(pos);
m_ip->LoadFromFile(fname,TRUE);
finalname=fname.Left(fname.GetLength()-4);
finalname=finalname.Right(finalname.GetLength()-finalname.ReverseFind('\\'));
finalname=tdir+finalname+".MW4ANIM";
m_ip->ExportToFile(finalname,TRUE);
}
/* finalname=fname.Left(fname.GetLength()-4);
finalname=finalname.Right(finalname.GetLength()-finalname.ReverseFind('\\'));
finalname=tdir+finalname+".armature";
m_ip->ExportToFile(finalname,FALSE);
*/
}
//delete filebuf;
}
void LegMirrorPanel::FixScale()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
HINSTANCE loc_hInstance = AfxGetResourceHandle ();
CString tdir;
CFileDialog fdiag(TRUE,NULL,NULL,OFN_ALLOWMULTISELECT,"Max Files (*.max)|*.max||",NULL);
char *filebuf=new char[MAX_PATH*200];
filebuf[0]=0;
fdiag.m_ofn.lpstrFile=filebuf;
fdiag.m_ofn.nMaxFile=MAX_PATH*200;
if(fdiag.DoModal()==IDOK)
{
POSITION pos;
pos=fdiag.GetStartPosition();
CString finalname,fname;
while(pos!=NULL)
{
fname=fdiag.GetNextPathName(pos);
m_ip->LoadFromFile(fname,TRUE);
INode *vel_node = g_hillAdjustPanel.FindNode(m_ip->GetRootNode(), "joint_VEL");
Check_Pointer(vel_node);
INode *root_node = g_hillAdjustPanel.FindNode(m_ip->GetRootNode(), "joint_ROOT");
Check_Pointer(vel_node);
Stuff::Point3D scale_factor;
Matrix3 axis(MAT_IDENT);
SuspendAnimate();
AnimateOff();
ScaleValue orig_value;
Control *scale = vel_node->GetTMController()->GetScaleController();
Quat quat;
quat.Identity();
ScaleValue scale_value(Point3(1.0f,1.0f,1.0f), quat);
scale->GetValue(0, &orig_value, FOREVER, CTRL_ABSOLUTE);
scale->SetValue(0, &scale_value, 1, CTRL_ABSOLUTE);
scale_factor.x = orig_value.s.x;
scale_factor.y = orig_value.s.y;
scale_factor.z = orig_value.s.z;
scale = root_node->GetTMController()->GetScaleController();
scale->SetValue(0, &scale_value, 1, CTRL_ABSOLUTE);
ScaleNodePosition(root_node, scale_factor);
ResumeAnimate();
m_ip->FileSave();
}
//finalname=fname.Left(fname.GetLength()-4);
//finalname=finalname.Right(finalname.GetLength()-finalname.ReverseFind('\\'));
//finalname=tdir+finalname+".armature";
//m_ip->ExportToFile(finalname,FALSE);
}
m_ip->RedrawViews(m_ip->GetTime(),REDRAW_BEGIN);
m_ip->RedrawViews(m_ip->GetTime(),REDRAW_NORMAL);
m_ip->RedrawViews(m_ip->GetTime(),REDRAW_END);
//delete filebuf;
}
// This actually only scales the tangents
void LegMirrorPanel::ScaleKey(Control *c, IKeyControl *ikeys, Stuff::Scalar amount,float median,int key_number)
{
{
if (c->ClassID() == Class_ID(LININTERP_FLOAT_CLASS_ID,0))
{
return;
}
else if (c->ClassID() == Class_ID(TCBINTERP_FLOAT_CLASS_ID,0))
{
return;
}
else if(c->ClassID() == Class_ID(HYBRIDINTERP_FLOAT_CLASS_ID,0))
{
IBezFloatKey key;
ikeys->GetKey(key_number, &key);
key.val = ((key.val-median)*amount)+median;
if (GetOutTanType(key.flags) == BEZKEY_USER && key_number < ikeys->GetNumKeys()-1)
{
key.outtan *= amount;
}
if (GetInTanType(key.flags) == BEZKEY_USER && key_number > 0)
{
key.intan *= amount;
}
ikeys->SetKey(key_number, &key);
}
return;
}
}
//===========================================================================//
void LegMirrorPanel::ScaleNodeAll(Control *c, float scale)
{
if (_isnan(scale))
return;
IKeyControl *keys = GetKeyControlInterface(c);
if (keys == NULL)
{
//SPEW(("jerryeds", "FUCKED UP"));
ScaleKey(c, keys, scale,0.0, -1);
return;
}
float min = 0.0,max = 0.0;
/*for (int i = 0; i < keys->GetNumKeys(); ++i)
{
int time = GetKeyTime(c, keys, i);
float value;
c->GetValue(time,&value,FOREVER,CTRL_ABSOLUTE);
if (value < min)
min = value;
if (value > max)
max = value;
}*/
if (keys->GetNumKeys() >= 0)
{
for (int i= 0; i < keys->GetNumKeys(); ++i)
{
ScaleKey(c, keys, scale, min+(max-min)/2,i);
}
}
}
//===========================================================================//
void LegMirrorPanel::ScaleNodePosition(INode *node, Stuff::Point3D scale)
{
Control *tm_control = node->GetTMController();
Check_Pointer(tm_control);
Control *position_controler = tm_control->GetPositionController();
Check_Pointer(position_controler);
Control *x_controler = position_controler->GetXController();
Check_Pointer(x_controler);
Control *y_controler = position_controler->GetYController();
Check_Pointer(y_controler);
Control *z_controler = position_controler->GetZController();
Check_Pointer(z_controler);
ScaleNodeAll(x_controler, scale.x);
ScaleNodeAll(y_controler, scale.y);
ScaleNodeAll(z_controler, scale.z);
}
//===========================================================================//
/*
int LegMirrorPanel::GetKeyTime(Control *c, IKeyControl *ikeys, int key_number)
{
int value = 0;
if (c->ClassID() == Class_ID(LININTERP_FLOAT_CLASS_ID,0))
{
ILinFloatKey key;
ikeys->GetKey(key_number, &key);
value = key.time;
}
else if (c->ClassID() == Class_ID(TCBINTERP_FLOAT_CLASS_ID,0))
{
ITCBFloatKey key;
ikeys->GetKey(key_number, &key);
value = key.time;
}
else if(c->ClassID() == Class_ID(HYBRIDINTERP_FLOAT_CLASS_ID,0))
{
IBezFloatKey key;
ikeys->GetKey(key_number, &key);
value = key.time;
}
return value;
}
*/
void LegMirrorPanel::ILFree(LPITEMIDLIST pidl)
{
LPMALLOC pMalloc;
if (pidl)
{
#ifdef DEBUG
UINT cbSize = ILGetSize(pidl);
VALIDATE_PIDL(pidl);
// Fill the memory with some bad value...
_fmemset(pidl, 0xE5, cbSize);
// If large enough try to save the call return address of who
// freed us in the 3-6 byte of the structure.
if (cbSize >= 6)
*((UINT*)((LPSTR)pidl + 2)) = *(((UINT*)&pidl) - 1);
#endif
SHGetMalloc(&pMalloc);
pMalloc->Free( pidl);
pMalloc->Release();
}
}
void LegMirrorPanel::ExportLights()
{
MessageBox(NULL,"Disabled. Use the File | Export menu option to export lights.","Animation Suite",MB_OK);
}
void LegMirrorPanel::ImportMission()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
HINSTANCE loc_hInstance = AfxGetResourceHandle ();
CString tdir;
CFileDialog fdiag(TRUE,NULL,NULL,0,"Contents Files (*.contents)|*.contents||",NULL);
//char *filebuf=new char[MAX_PATH*200];
//filebuf[0]=0;
//fdiag.m_ofn.lpstrFile=filebuf;
//fdiag.m_ofn.nMaxFile=MAX_PATH*200;
CString gamepath = GetGamePath(m_ip);
fdiag.m_ofn.lpstrInitialDir = gamepath+"content\\missions";
if(fdiag.DoModal()==IDOK)
{
m_ip->ImportFromFile(fdiag.GetPathName(), TRUE);
}
}
@@ -0,0 +1,141 @@
// PlugTest.h : main header file for the PLUGTEST DLL
//
#if !defined(AFX_LEGMIRROR_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_)
#define AFX_LEGMIRROR_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#ifdef STRICT // Already defined by stdafx,
#undef STRICT // so we avoid warning linking msg
#endif
#ifdef _MBCS // The same as above
#undef _MBCS
#endif
class LegMirrorPanel;
#include "AnimationSuite.h"
#include <Stuff\StuffHeaders.hpp>
#pragma pack(push,8)
#include "..\\MaxControls\\ExpCtrl.h"
#pragma pack(pop)
/////////////////////////////////////////////////////////////////////////////
// JointPrefrenceApp
// See PlugTest.cpp for the implementation of this class
//
#ifndef __LEGMIRROR__
#define __LEGMIRROR__
// Hold pointers to all the nodes that an expression a control uses.
class ExpControlDep
{
public:
INode *ndes[6];
ExpControlDep() {Clear();}
void Clear() {for(int i=0;i<6;i++) ndes[i]=NULL;}
};
/////////////////////////////////////////////////////////////////////////////
// PlugPanel, manage the Plugins' display panel
class LegMirrorPanel : public UtilityObj {
protected:
HINSTANCE m_hInstance;
IUtil* m_iu;
HWND m_hPanel;
enum LRFLAG {ISLEFT,ISRIGHT,ISNEITHER} ;
public:
Interface* m_ip;
// Constructor & Destructor
LegMirrorPanel() {};
virtual ~LegMirrorPanel() {};
void DoFixExp();
void GetExpDeps(INode *nde,ExpControlDep *dep);
void AssignExpressions(INode *nde,ExpControlDep *dep);
void AssignExpCtrl(ExprControl *expc,INode *nde);
void FixExpressions(INode *nde);
bool HasCircularReference(INode *,ExprControl *);
void ReverseExpControl(ExprControl *expc);
// Overides of the UtilityObj class
void BeginEditParams(Interface* ip, IUtil* iu);
void EndEditParams(Interface* ip, IUtil* iu);
void DeleteThis() {}
void Init(HWND hWnd) {}
void Destroy(HWND hWnd) {}
//Specific Methods
void DoMirror();
void DoReverse();
void DoExportAnims();
void RevSites();
void FixScale();
void ScaleNodeAll(Control *c, float scale);
void ScaleKey(Control *c, IKeyControl *ikeys, Stuff::Scalar amount, float median,int key_number);
void ScaleNodePosition(INode *node, Stuff::Point3D scale);
void ExportLights();
void ImportMission();
private:
void ReverseAnimation(INode *nde);
void ReverseExpressions(INode *nde);
void ReverseKeys(INode *nde);
void ReverseControl(IKeyControl *ikc,Class_ID id);
void RevSiteOnNode(INode *nde);
bool IsExprControl(Control *ctrl);
void FixExpControl(INode *mynde,ExprControl *expc,int axis=0);
void MirrorExpControl(ExprControl *expc);
INode *GetDepNode(ExprControl *expc);
void MirrorAnimation(INode *nde);
void SwapAnimations(INode *nde1,INode *nde2);
void SwapProperties(INode *nde1,INode *nde2);
int NegateKey(IKeyControl *ikc,Class_ID id);
INode *FindCorespondingNode(INode *nde);
void MirrorNode(INode *nde);
LRFLAG TellSide(INode *nde);
bool IsReversable(INode *nde);
void SwapRotations(INode *nde1,INode *nde2);
Control *GetControlByName(Animatable *nde,CString &cnme,int *subanim);
void PlaceZeroKeys(INode *nde);
void SwapExpressions(INode *nde);
bool IsJoint(CString &str) { return !str.Left(5).CompareNoCase("JOINT"); }
bool IsSite(CString &str) { return !str.Left(4).CompareNoCase("SITE"); }
bool IsHandle(CString &str) { return !str.Left(6).CompareNoCase("HANDLE"); }
bool IsTorsoJoint(CString &str) { return !str.CompareNoCase("JOINT_TORSO"); }
bool IsRootJoint(CString &str) { return !str.CompareNoCase("JOINT_ROOT"); }
void ILFree(LPITEMIDLIST pidl);
};
/////////////////////////////////////////////////////////////////////////////
#endif
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_LEGMIRROR_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_)
@@ -0,0 +1,198 @@
//===========================================================================//
// File: LightExport.cpp
// Project: MechWarrior 4
// Contents: Plugin to export Collision Volume objects
//---------------------------------------------------------------------------//
// Date Who Modification //
// -------- --- ---------------------------------------------------------- //
// 07/29/99 jkyle
//---------------------------------------------------------------------------//
// Copyright (C) 1998, Fasa Interactive, Inc.
// All Rights reserved worldwide
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL
//===========================================================================//
#include "stdafx.h"
#ifdef STRICT // Already defined by stdafx,
#undef STRICT // so we avoid warning linking msg
#endif
#ifdef _MBCS // The same as above
#undef _MBCS
#endif
#include "LightExport.h"
#include <GameOS\ToolOS.hpp>
#include <Stuff\StuffHeaders.hpp>
#include <DLLPlatform\DLLPlatform.hpp>
#include <mlr\mlrheaders.hpp>
#include "MaxProxies\MaxProxyHeaders.hpp"
#include "proxies\burnlights.hpp"
#include "cvobject.h"
#include "mw4.hpp"
#include "exportUtil.h"
extern HGOSHEAP AnimSuiteHeap;
//undef Verify
#ifndef _DEBUG //This is a hack To make it link in Release
#undef Spew
//void Spew() {}
#endif
//===========================================================================//
int LightExp::DoExport(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts)
{
int return_value;
__try
{
return_value = DoExportWrap(name, ei, i, suppressPrompts);
//return_value = true;
GetSystemSetting(SYSSET_CLEAR_UNDO);
Verify(!theHold.Holding());
}
__except(ProcessException(GetExceptionInformation()))
{
}
return return_value;
}
int LightExp::DoExportWrap(const TCHAR *name,ExpInterface *ei,Interface *ip, BOOL suppressPrompts)
{
TurnOnExceptions();
AFX_MANAGE_STATE(AfxGetStaticModuleState());
MAXProxies::MAXScene *scene = MAXProxies::MAXScene::MakeProxy(ip,"");
Check_Object(scene);
Proxies::BurnLightsProcess process;
scene->FindLights(&process);
ChainIteratorOf<Proxies::LightProxy*> light_itr(&process.lightsToBurn);
Proxies::LightProxy* light;
int light_count = 0;
gos_PushCurrentHeap(AnimSuiteHeap);
//open this notefile on up...
Stuff::NotationFile note_file;
//FileStream f(name, FileStream::WriteOnly);
while ((light = light_itr.ReadAndNext()) != NULL)
{
Check_Object(light);
++light_count;
MAXProxies::MAXLight *maxlight = (MAXProxies::MAXLight *)light;
LightState *lightState = maxlight->GetLightState();
if (lightState)
{
MidLevelRenderer::MLRLight *mlrlight = NULL;
switch (lightState->type)
{
case OMNI_LGT:
{
MidLevelRenderer::MLRPointLight *pointlight;
mlrlight = pointlight = new MidLevelRenderer::MLRPointLight();
if (lightState->useAtten)
pointlight->SetFalloffDistance(0,lightState->attenEnd);
//lightState->SetLightMap();
break;
}
case SPOT_LGT:
{
MidLevelRenderer::MLRSpotLight *spotlight;
mlrlight = spotlight = new MidLevelRenderer::MLRSpotLight();
if (lightState->useAtten)
spotlight->SetFalloffDistance(0,lightState->attenEnd);
spotlight->SetSpreadAngle((Stuff::Radian)lightState->fallsize);
//lightState->SetLightMap();
break;
}
case DIRECT_LGT:
{
MidLevelRenderer::MLRInfiniteLight *inflight;
mlrlight = inflight = new MidLevelRenderer::MLRInfiniteLight();
break;
}
case AMBIENT_LGT:
{
MidLevelRenderer::MLRAmbientLight *amblight;
mlrlight = amblight = new MidLevelRenderer::MLRAmbientLight();
break;
}
default:
{
ReportError(CString(name)+" Contains invalid light type.",suppressPrompts!=0);
//STOP(("INVALID LIGHT TYPE"));
}
}
Verify(NULL != mlrlight);
Stuff::RGBColor color;
maxlight->GetColor(&color);
mlrlight->SetColor(color);
//mlrlight->SetDynamicLight();
//mlrlight->SetStaticLight();
mlrlight->SetIntensity(lightState->intens);
{
// Local matrix already converted
Stuff::LinearMatrix4D mat;
maxlight->GetLocalToParent(&mat);
mlrlight->SetLightToShapeMatrix(mat);
}
{
/* Matrix3 parentTM = maxlight->GetProxiedLight()->GetObjTMAfterWSM(maxlight->GetSceneProxy()->GetTime(),NULL);
Matrix3 myTM = maxlight->GetProxiedLight()->GetObjTMAfterWSM(maxlight->GetSceneProxy()->GetTime(), NULL);
Matrix3 mat = Inverse(parentTM) * myTM;
AffineParts parts;
decomp_affine(mat, &parts);
Point3D translation;
translation=ConvertMaxToMW(parts.t);
UnitQuaternion rotation;
rotation=ConvertMaxToMW(parts.q);
matrix->BuildRotation(rotation);
matrix->BuildTranslation(translation);
*/
Stuff::LinearMatrix4D mat;
maxlight->GetLocalToWorld(&mat);
mlrlight->SetLightToWorldMatrix(mat);
}
// Write the data to the notefile
Stuff::MString section_name;
if (maxlight->GetName(&section_name))
mlrlight->Write(note_file.SetPage(section_name));
// Write the file
}
}
// Write the file
note_file.SaveAs(name);
// Clean up
gos_PopCurrentHeap();
// Unregister_Pointer(scene);
// scene->Destroy();
TurnOffExceptions();
return true;
}
@@ -0,0 +1,69 @@
//===========================================================================//
// File: CvExport.h
// Project: MechWarrior 4
// Contents: Plugin to adjust height of max anmiations
//---------------------------------------------------------------------------//
// Date Who Modification //
// -------- --- ---------------------------------------------------------- //
// 04/28/99 JSE Initial coding,
//---------------------------------------------------------------------------//
// Copyright (C) 1998, Fasa Interactive, Inc.
// All Rights reserved worldwide
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL
//===========================================================================//
#if !defined(AFX_LIGHTEXPORT_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_)
#define AFX_LIGHTEXPORT_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
class LightExp;
#include "AnimationSuite.h"
class LightExp : public SceneExport
{
public:
LightExp() {}
~LightExp() {}
int ExtCount() { return 1; }
const TCHAR * Ext(int n) {
switch(n) {
case 0:
// This cause a static string buffer overwrite
// return GetString(IDS_EXTENSION1);
return _T("lights");
}
return _T("");
}
const TCHAR * LongDesc() { return GetString(IDS_LONGDESC); }
const TCHAR * ShortDesc() { return _T("MW4 Light"); }
const TCHAR * AuthorName() { return _T("Jonthan Kyle"); }
const TCHAR * CopyrightMessage() { return GetString(IDS_COPYRIGHT); }
const TCHAR * OtherMessage1() { return _T(""); }
const TCHAR * OtherMessage2() { return _T(""); }
unsigned int Version() { return 100; }
void ShowAbout(HWND hWnd) {
CAbout dlg;
dlg.DoModal();
}
int DoExport(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts=FALSE);
int DoExportWrap(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts=FALSE);
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_ANIMEXPORT_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_)
@@ -0,0 +1,285 @@
// MLRExporter.cpp: implementation of the MLRExporter class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "MLRExport.h"
#include "ExportUtil.h"
#include <GameOS\GameOS.hpp>
#include <GameOS\ToolOS.hpp>
#include <MaxProxies\MaxProxyHeaders.hpp>
#include <MLR\MLRShape.hpp>
#if !defined(DLLPLATFORM_DLLPLATFORM_HPP)
#include "DLLPlatform\DLLPlatform.hpp"
#endif
//===========================================================================//
int MLRExporter::DoExportWrap(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts)
{
StartExport(i, CString("Exporting MLR data."), suppressPrompts?true:false);
MAXProxies::MAXScene *scene = MAXProxies::MAXScene::MakeProxy(i,m_strHintFile);
Register_Object(scene);
//
// fill in all the directories
//
if (!LoadPlugCfg(i))
return false;
// Check for errors
if (!CheckForErrors(scene,i))
{
return false;
}
// Load settings
m_exportInfo.exportType = EXPORT_SHAPE;
m_exportInfo.outputAmatureFile = false;
m_exportInfo.overwriteTextures = true;
SaveExportInfo(scene->GetProxiedScene());
//
// set up some name and path stuff
//
TSTR filename, extension;
TSTR fullpath = _T(name);
TSTR directoryPath;
SplitFilename(fullpath,&directoryPath,&filename,&extension);
directoryPath += "\\";
//
// see if the erf file already exists
//
CString erf_file_name = directoryPath + m_erfPath + filename + ".mlr";
bool file_exists = gos_DoesFileExist(erf_file_name);
if (file_exists)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
gos_DeleteFile(erf_file_name);
/*
int ret = AfxMessageBox("Overwrite " + filename + ".erf" + " ?", MB_YESNO);
if (ret == IDYES)
{
gos_DeleteFile(erf_file_name);
}
else
{
return false;
}
*/
}
//
// if we are exporting the character do the following
// or fall threw and export a fused mesh called a shape
//
CString shape_filename = filename + extension;
CString set_filename = directoryPath + filename;
CString path = directoryPath;
ExportShape(scene,i, path, shape_filename,suppressPrompts);
TurnOffExceptions();
return true;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// method exports the character mesh ie. a file for each group
//
int MLRExporter::ExportShape(MAXProxies::MAXScene *scene,
Interface *i,
const CString& path,
const CString& name,
BOOL suppressPrompts)
{
//
// create an empty scene
//
UpdateProgress(i,++m_progress,CString("Preparing to copy."));
#undef new
ElementRenderer::GroupElement *root = new ElementRenderer::GroupElement;
#if defined (_DEBUG)
#define new DEBUG_NEW
#endif
Register_Object(root);
Check_Object(Stuff::FileStreamManager::Instance);
// Make sure that texture and erf paths exist
bool texture_dir_exists = gos_CreateDirectory(m_texturePath);
bool erf_dir_exists = gos_CreateDirectory(path + m_erfPath);
ElementProxies::ElementSceneProxy *element_scene =
ElementProxies::ElementSceneProxy::MakeProxy(
root,
m_texturePath
);
Register_Object(element_scene);
Stuff::NotationFile config_file(Stuff::MString(m_maxDataPath)+"\\PlugIns.ini");
MAXProxies::MAXCopyProcess copy_process(&config_file,i,m_progress,m_suppress,(LPVOID)&ReportError);
element_scene->Copy(&copy_process, scene);
int ref_count = element_scene->GetReferenceCount();
if (!suppressPrompts)
{
m_progress = 20;
}
MAXProxies::MAXFlattenHierarchyProcess flatten_hierarchy(&config_file,i, m_progress, m_suppress);
element_scene->FlattenHierarchy(&flatten_hierarchy);
Verify(element_scene->GetReferenceCount() == ref_count);
UpdateProgress(i,30,CString("Hierarchy flattened."));
//
// See if there are any meshes to fuse. If there are no meshes, don't save
// anything
//
Proxies::ChildProxy *first_child = element_scene->UseFirstChildProxy();
if (!first_child)
{
Verify(element_scene->GetReferenceCount() == 1);
EndExport(i);
TurnOnExceptions();
element_scene->Destroy();
return 1;
}
UpdateProgress(i,40,CString("Preparing to fuse meshes."));
//
// Look for any meshes after the first. These will be merged with the
// first one
//
ElementProxies::ElementPolygonMeshProxy *first_mesh =
Cast_Object(ElementProxies::ElementPolygonMeshProxy*, first_child);
ElementProxies::ElementPolygonMeshProxy *mesh =
static_cast<ElementProxies::ElementPolygonMeshProxy*>(
first_mesh->UseNextSiblingProxy()
);
//
// First count up the number of children and make an array for the meshes
//
if (mesh)
{
unsigned child_count = element_scene->GetChildCount() - 1;
Verify(child_count > 0);
Stuff::DynamicArrayOf<ElementProxies::ElementPolygonMeshProxy *>
fused_children(child_count);
Stuff::DynamicArrayOf<Stuff::DynamicArrayOf<Proxies::PolygonProxy *> >
polys_array(child_count);
//
// Make the array for the polygons to add, then start spinning through
// the children
//
Stuff::DynamicArrayOf<Proxies::PolygonProxy *> new_polys;
unsigned poly_count = 0;
child_count = 0;
do {
UpdateProgress(i,++m_progress,CString("Fusing meshes."));
Check_Object(mesh);
ElementProxies::ElementPolygonMeshProxy *next =
static_cast<ElementProxies::ElementPolygonMeshProxy*>(
mesh->UseNextSiblingProxy()
);
fused_children[child_count] = mesh;
//
// Get its polys and copy them into the large array
//
unsigned start = poly_count;
unsigned len = mesh->UsePolygonArray(&polys_array[child_count]);
poly_count += len;
new_polys.SetLength(poly_count);
for (unsigned i=0; i<len; ++i)
new_polys[start++] = polys_array[child_count][i];
mesh = next;
++child_count;
} while (mesh);
first_mesh->AddPolygons(&copy_process, new_polys);
//
// Now destroy the old meshes
//
for (child_count=0; child_count<fused_children.GetLength(); ++child_count)
{
mesh = fused_children[child_count];
Check_Object(mesh);
mesh->DetachArrayReferences(&polys_array[child_count]);
Verify(mesh->GetReferenceCount() == 1);
mesh->Destroy();
}
}
UpdateProgress(i,65,CString("Building bounding sphere"));
//
// Build the bounding sphere around the now only child
//
ElementRenderer::Element *element = first_mesh->GetProxiedShape();
ElementProxies::OptimizeSyncProcess optimize;
if (optimize.OptimizeSync(first_mesh))
first_mesh->DetachReference();
UpdateProgress(i,75,CString("Preparing to save."));
//
// Open up the file to save the shape into, then save the child as the
// root
//
Check_Object(Stuff::FileStreamManager::Instance);
Stuff::FileStream element_stream;
UpdateProgress(i,85,CString("File open."));
element_stream.Open(path + m_erfPath + name, Stuff::FileStream::WriteOnly);
MidLevelRenderer::WriteMLRVersion(&element_stream);
UpdateProgress(i,95,CString("Saving out MLR file."));
ElementRenderer::ShapeElement *ElmShape=Cast_Object(ElementRenderer::ShapeElement *,element);
element_stream << ElmShape->m_localOBB;
ElmShape->GetMLRShape()->Save(&element_stream);
//
// Clean up
//
EndExport(i);
TurnOnExceptions();
Verify(element_scene->GetReferenceCount() == 1);
element_scene->Destroy();
return 1;
}
//===========================================================================//
int MLRExp::DoExport(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts)
{
int return_value;
__try
{
return_value = m_Expt.DoExportWrap(name, ei, i, suppressPrompts);
//return_value = true;
GetSystemSetting(SYSSET_CLEAR_UNDO);
Verify(!theHold.Holding());
}
__except(ProcessException(GetExceptionInformation()))
{
}
return return_value;
}
@@ -0,0 +1,63 @@
// MLRExporter.h: interface for the MLRExporter class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_MLREXPORTER_H__EEBAD983_7025_11D3_8B36_00902712C9AE__INCLUDED_)
#define AFX_MLREXPORTER_H__EEBAD983_7025_11D3_8B36_00902712C9AE__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "BaseGeoExport.h"
class MLRExporter :public BaseGeoExporter
{
public:
MLRExporter(const char *str):BaseGeoExporter(str) {}
MLRExporter::~MLRExporter() {}
int DoExportWrap(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts=FALSE);
private:
int ExportShape(MAXProxies::MAXScene *scene,
Interface *i,
const CString& path,
const CString& name,
BOOL suppressPrompts);
};
class MLRExp : public SceneExport
{
protected:
MLRExporter m_Expt;
public:
MLRExp() : m_Expt("") {}
~MLRExp() {}
int ExtCount() { return 1; }
const TCHAR * Ext(int n) {
switch(n) {
case 0:
// This cause a static string buffer overwrite
// return GetString(IDS_EXTENSION1);
return _T("MLR");
}
return _T("");
}
const TCHAR * LongDesc() { return GetString(IDS_LONGDESC); }
const TCHAR * ShortDesc() { return _T("MW4 MLR"); }
const TCHAR * AuthorName() { return _T("Thomas Steinke"); }
const TCHAR * CopyrightMessage() { return GetString(IDS_COPYRIGHT); }
const TCHAR * OtherMessage1() { return _T(""); }
const TCHAR * OtherMessage2() { return _T(""); }
unsigned int Version() { return 100; }
void ShowAbout(HWND hWnd) {
CAbout dlg;
dlg.DoModal();
}
int DoExport(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts=FALSE);
};
#endif // !defined(AFX_MLREXPORTER_H__EEBAD983_7025_11D3_8B36_00902712C9AE__INCLUDED_)
@@ -0,0 +1,75 @@
// MapSizeDlg.cpp : implementation file
//
#include "stdafx.h"
#include "animationsuite.h"
#include "MapSizeDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMapSizeDlg dialog
CMapSizeDlg::CMapSizeDlg(CWnd* pParent /*=NULL*/)
: CDialog(CMapSizeDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CMapSizeDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
m_iSize = 0;
}
void CMapSizeDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CMapSizeDlg)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CMapSizeDlg, CDialog)
//{{AFX_MSG_MAP(CMapSizeDlg)
ON_BN_CLICKED(IDC_RADIO1, OnRadio1)
ON_BN_CLICKED(IDC_RADIO2, OnRadio2)
ON_BN_CLICKED(IDC_RADIO3, OnRadio3)
ON_BN_CLICKED(IDC_RADIO4, OnRadio4)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMapSizeDlg message handlers
void CMapSizeDlg::OnRadio1()
{
m_iSize = 1;
}
void CMapSizeDlg::OnRadio2()
{
m_iSize = 2;
}
void CMapSizeDlg::OnRadio3()
{
m_iSize = 4;
}
void CMapSizeDlg::OnRadio4()
{
m_iSize = 0;
}
BOOL CMapSizeDlg::OnInitDialog()
{
CDialog::OnInitDialog();
((CButton *)GetDlgItem(IDC_RADIO4))->SetCheck(true);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
@@ -0,0 +1,51 @@
#if !defined(AFX_MAPSIZEDLG_H__60DC33AC_5787_46BF_9554_D6D246A18737__INCLUDED_)
#define AFX_MAPSIZEDLG_H__60DC33AC_5787_46BF_9554_D6D246A18737__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// MapSizeDlg.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CMapSizeDlg dialog
class CMapSizeDlg : public CDialog
{
// Construction
public:
int m_iSize;
CMapSizeDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CMapSizeDlg)
enum { IDD = IDD_DIALOG_MAPSIZE };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMapSizeDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CMapSizeDlg)
afx_msg void OnRadio1();
afx_msg void OnRadio2();
afx_msg void OnRadio3();
afx_msg void OnRadio4();
virtual BOOL OnInitDialog();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MAPSIZEDLG_H__60DC33AC_5787_46BF_9554_D6D246A18737__INCLUDED_)
@@ -0,0 +1,810 @@
#include "stdafx.h"
#ifdef STRICT // Already defined by stdafx,
#undef STRICT // so we avoid warning linking msg
#endif
#ifdef _MBCS // The same as above
#undef _MBCS
#endif
#include "LegMirrorPanel.h"
#pragma pack(push,8)
#include "..\\MaxControls\\IKSlaveClipObject.h"
#include <IKCTRL.h>
#include <IKCTRL.h>
#pragma pack(pop)
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
void LegMirrorPanel::DoMirror()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
HINSTANCE loc_hInstance = AfxGetResourceHandle ();
PlaceZeroKeys(m_ip->GetRootNode());
MirrorAnimation(m_ip->GetRootNode());
SwapExpressions(m_ip->GetRootNode());
m_ip->ForceCompleteRedraw();
}
void LegMirrorPanel::MirrorExpControl(ExprControl *expc)
{
int i,slot;
TSTR nname;
INode *nde,*tnde;
Control *cpt;
for(i=0;i<expc->getVarCount(VECTOR_EXPR);i++)
{
slot=expc->vVars[i].refID;
expc->refTab[slot].client->NotifyDependents(FOREVER,(PartID)&nname,REFMSG_GET_NODE_NAME);
nde=m_ip->GetINodeByName(nname);
tnde=FindCorespondingNode(nde);
if(tnde!=NULL)
{
int sanim;
CString conname(expc->refTab[slot].client->SubAnimName(expc->vVars[i].subNum));
cpt=GetControlByName(tnde->GetTMController(),conname,&sanim);
ASSERT(cpt);
expc->assignController(VECTOR_EXPR,i,cpt,sanim);
}
}
for(i=0;i<expc->getVarCount(SCALAR_VAR);i++)
{
slot=expc->sVars[i].refID;
expc->refTab[slot].client->NotifyDependents(FOREVER,(PartID)&nname,REFMSG_GET_NODE_NAME);
nde=m_ip->GetINodeByName(nname);
tnde=FindCorespondingNode(nde);
if(tnde!=NULL)
{
int sanim;
CString conname(expc->refTab[slot].client->SubAnimName(expc->sVars[i].subNum));
cpt=GetControlByName(tnde->GetTMController(),conname,&sanim);
ASSERT(cpt);
expc->assignController(SCALAR_EXPR,i,cpt,sanim);
}
}
}
void LegMirrorPanel::SwapAnimations(INode *nde1,INode *nde2)
{
Control *tcon;
ExpControlDep d1,d2;
// INode *tnd;
/*
GetExpDeps(nde1,&d1);
GetExpDeps(nde2,&d2);
for(int i=0;i<6;i++)
{
if(d1.ndes[i])
{
tnd=FindCorespondingNode(d1.ndes[i]);
if(tnd) d1.ndes[i]=tnd;
}
if(d2.ndes[i])
{
tnd=FindCorespondingNode(d2.ndes[i]);
if(tnd) d2.ndes[i]=tnd;
}
}
*/
tcon=(Control *)nde1->GetTMController()->Clone();
nde1->SetTMController(nde2->GetTMController());
nde2->SetTMController(tcon);
/*
AssignExpressions(nde2,&d1);
AssignExpressions(nde1,&d2);
*/
}
void LegMirrorPanel::SwapProperties(INode *nde1,INode *nde2)
{
IKClipObject *cobj;
IKSlaveClipObject *jtmp;
cobj=nde1->GetTMController()->CopyIKParams(COPYPASTE_IKROT);
if(cobj && cobj->ClassID()==IKSLAVE_CLASSID)
{
float mins[6],maxs[6];
jtmp=(IKSlaveClipObject *)cobj;
mins[4]=jtmp->min[4];
maxs[4]=jtmp->max[4];
mins[5]=jtmp->min[5];
maxs[5]=jtmp->max[5];
cobj=nde2->GetTMController()->CopyIKParams(COPYPASTE_IKROT);
jtmp=(IKSlaveClipObject *)cobj;
jtmp->min[4]=-jtmp->min[4];
jtmp->max[4]=-jtmp->max[4];
jtmp->min[5]=-jtmp->min[5];
jtmp->max[5]=-jtmp->max[5];
nde1->GetTMController()->PasteIKParams(cobj,COPYPASTE_IKROT);
jtmp->min[4]=-mins[4];
jtmp->max[4]=-maxs[4];
jtmp->min[5]=-mins[5];
jtmp->max[5]=-maxs[5];
nde2->GetTMController()->PasteIKParams(cobj,COPYPASTE_IKROT);
}
}
void LegMirrorPanel::SwapRotations(INode *nde1,INode *nde2)
{
Control *tcon;
ExpControlDep d1,d2;
// INode *tnd;
/*
GetExpDeps(nde1,&d1);
GetExpDeps(nde2,&d2);
for(int i=0;i<6;i++)
{
if(d1.ndes[i])
{
tnd=FindCorespondingNode(d1.ndes[i]);
if(tnd) d1.ndes[i]=tnd;
}
if(d2.ndes[i])
{
tnd=FindCorespondingNode(d2.ndes[i]);
if(tnd) d2.ndes[i]=tnd;
}
}
*/
if(!nde1->GetTMController()->GetRotationController()) return;
tcon=(Control *)nde1->GetTMController()->GetRotationController()->Clone();
nde1->GetTMController()->SetRotationController(nde2->GetTMController()->GetRotationController());
nde2->GetTMController()->SetRotationController(tcon);
/*
AssignExpressions(nde2,&d1);
AssignExpressions(nde1,&d2);
*/
}
void LegMirrorPanel::MirrorNode(INode *nde)
{
CString str(nde->GetName());
if( IsJoint(str) || IsHandle(str) )
{
Control *tm_con,*pos_con,*rot_con,*xp_con,*yp_con,*zp_con,*xr_con,*yr_con,*zr_con;
IKeyControl *ikc;
tm_con = nde->GetTMController();
if(tm_con!=NULL)
{
pos_con = tm_con->GetPositionController();
rot_con = tm_con->GetRotationController();
if(rot_con)
{
ikc = GetKeyControlInterface(rot_con);
if(ikc)
{
NegateKey(ikc,rot_con->ClassID());
}
xr_con=rot_con->GetXController();
if(xr_con!=NULL)
{
}
yr_con=rot_con->GetYController();
if(yr_con!=NULL)
{
ikc = GetKeyControlInterface(yr_con);
if(ikc)
{
NegateKey(ikc,yr_con->ClassID());
}
}
zr_con=rot_con->GetZController();
if(zr_con!=NULL)
{
ikc = GetKeyControlInterface(zr_con);
if(ikc)
{
NegateKey(ikc,zr_con->ClassID());
}
}
}
if( !IsJoint(str) || ( IsJoint(str) && TellSide(nde)==ISNEITHER ) )
if(pos_con)
{
ikc = GetKeyControlInterface(pos_con);
if(ikc)
{
NegateKey(ikc,pos_con->ClassID());
}
xp_con=pos_con->GetXController();
if(xp_con!=NULL)
{
ikc = GetKeyControlInterface(xp_con);
if(ikc)
{
NegateKey(ikc,xp_con->ClassID());
}
}
yp_con=pos_con->GetYController();
if(yp_con!=NULL)
{
}
zp_con=pos_con->GetZController();
if(zp_con!=NULL)
{
}
}
}
}
}
void LegMirrorPanel::MirrorAnimation(INode *nde)
{
LRFLAG flg;
flg=TellSide(nde);
CString str(nde->GetName());
if(flg==ISLEFT) //only swap lefts to avoid double swaps
{
INode *tnde;
tnde=FindCorespondingNode(nde);
if(tnde!=NULL)
{
if(!str.Left(8).CompareNoCase("HANDLE_L") )
{
if(IsReversable(tnde)) //if the corespondant really exists and can be reversed
{
MirrorNode(tnde);
MirrorNode(nde);
SwapAnimations(tnde,nde);
}
}
else
if(IsJoint(str))
{
MirrorNode(tnde);
MirrorNode(nde);
SwapRotations(tnde,nde);
if(!str.CompareNoCase("joint_luleg") ) SwapProperties(tnde,nde);
}
}
}
else //if it has no correspondant just mirror it
if(flg==ISNEITHER) //only swap lefts to avoid double swaps
if(IsReversable(nde))
{
MirrorNode(nde);
}
for(int i=0;i<nde->NumberOfChildren();i++)
{
MirrorAnimation(nde->GetChildNode(i));
}
}
void LegMirrorPanel::SwapExpressions(INode *nde)
{
for(int i=0;i<nde->NumberOfChildren();i++)
{
SwapExpressions(nde->GetChildNode(i));
}
CString str(nde->GetName());
if(TellSide(nde)==ISNEITHER) return;
Control *tm_con,*pos_con,*rot_con,*xp_con,*yp_con,*zp_con,*xr_con,*yr_con,*zr_con;
tm_con = nde->GetTMController();
if(tm_con!=NULL)
{
pos_con = tm_con->GetPositionController();
rot_con = tm_con->GetRotationController();
if(rot_con)
{
if(!GetKeyControlInterface(rot_con)
&& IsExprControl(rot_con)&&
HasCircularReference(nde,(ExprControl *)rot_con))
{
MirrorExpControl((ExprControl *)rot_con);
}
xr_con=rot_con->GetXController();
if(xr_con!=NULL)
{
if(!GetKeyControlInterface(xr_con) &&
IsExprControl(xr_con) &&
HasCircularReference(nde,(ExprControl *)xr_con))
{
MirrorExpControl((ExprControl *)xr_con);
}
}
yr_con=rot_con->GetYController();
if(yr_con!=NULL)
{
if(!GetKeyControlInterface(yr_con)
&& IsExprControl(yr_con)&&
HasCircularReference(nde,(ExprControl *)yr_con))
{
MirrorExpControl((ExprControl *)yr_con);
}
}
zr_con=rot_con->GetZController();
if(zr_con!=NULL)
{
if(!GetKeyControlInterface(zr_con)
&& IsExprControl(zr_con)&&
HasCircularReference(nde,(ExprControl *)zr_con))
{
MirrorExpControl((ExprControl *)zr_con);
}
}
}
if(!IsJoint(str))
if(pos_con)
{
if(!GetKeyControlInterface(pos_con)
&& IsExprControl(pos_con)&&
HasCircularReference(nde,(ExprControl *)pos_con))
{
MirrorExpControl((ExprControl *)pos_con);
}
xp_con=pos_con->GetXController();
if(xp_con!=NULL)
{
if(!GetKeyControlInterface(xp_con)
&& IsExprControl(xp_con)&&
HasCircularReference(nde,(ExprControl *)xp_con))
{
MirrorExpControl((ExprControl *)xp_con);
}
}
yp_con=pos_con->GetYController();
if(yp_con!=NULL)
{
if(!GetKeyControlInterface(yp_con)
&& IsExprControl(yp_con)&&
HasCircularReference(nde,(ExprControl *)yp_con))
{
MirrorExpControl((ExprControl *)yp_con);
}
}
zp_con=pos_con->GetZController();
if(zp_con!=NULL)
{
if(!GetKeyControlInterface(zp_con)
&& IsExprControl(zp_con)&&
HasCircularReference(nde,(ExprControl *)zp_con))
{
MirrorExpControl((ExprControl *)zp_con);
}
}
}
}
}
int LegMirrorPanel::NegateKey(IKeyControl *ikc,Class_ID id)
{
int key_number,MaxKeys;
MaxKeys=ikc->GetNumKeys();
for(key_number=0;key_number<MaxKeys;key_number++)
{
if (id == Class_ID(LININTERP_FLOAT_CLASS_ID,0))
{
ILinFloatKey key;
ikc->GetKey(key_number, &key);
key.val=key.val*-1;
ikc->SetKey(key_number, &key);
}
else if (id == Class_ID(HYBRIDINTERP_FLOAT_CLASS_ID,0))
{
IBezFloatKey key;
ikc->GetKey(key_number, &key);
key.val*=-1;
key.intan*=-1;
key.outtan*=-1;
ikc->SetKey(key_number, &key);
}
else if (id == Class_ID(TCBINTERP_FLOAT_CLASS_ID,0))
{
ITCBFloatKey key;
ikc->GetKey(key_number, &key);
key.val*=-1;
ikc->SetKey(key_number, &key);
}
else if (id == Class_ID(LININTERP_POSITION_CLASS_ID,0))
{
ILinPoint3Key key;
ikc->GetKey(key_number, &key);
key.val.x*=-1;
key.val.y*=-1;
key.val.z*=-1;
ikc->SetKey(key_number, &key);
}
else if (id == Class_ID(HYBRIDINTERP_POSITION_CLASS_ID,0))
{
IBezPoint3Key key;
ikc->GetKey(key_number, &key);
key.val.x*=-1;
key.intan.x*=-1;
key.outtan.x*=-1;
key.val.y*=-1;
key.intan.y*=-1;
key.outtan.y*=-1;
key.val.z*=-1;
key.intan.z*=-1;
key.outtan.z*=-1;
ikc->SetKey(key_number, &key);
}
else if (id == Class_ID(TCBINTERP_POSITION_CLASS_ID,0))
{
ITCBPoint3Key key;
ikc->GetKey(key_number, &key);
key.val.x*=-1;
key.val.y*=-1;
key.val.z*=-1;
ikc->SetKey(key_number, &key);
}
else if (id == Class_ID(LININTERP_ROTATION_CLASS_ID,0))
{
ILinRotKey key;
ikc->GetKey(key_number, &key);
key.val.w*=-1;
ikc->SetKey(key_number, &key);
}
else if (id == Class_ID(HYBRIDINTERP_ROTATION_CLASS_ID,0))
{
IBezQuatKey key;
ikc->GetKey(key_number, &key);
key.val.w*=-1;
ikc->SetKey(key_number, &key);
}
else if (id == Class_ID(TCBINTERP_ROTATION_CLASS_ID,0))
{
ITCBRotKey key;
ikc->GetKey(key_number, &key);
key.val.angle*=-1;
ikc->SetKey(key_number, &key);
}
else if (id == Class_ID(HYBRIDINTERP_POINT3_CLASS_ID,0))
{
IBezPoint3Key key;
ikc->GetKey(key_number, &key);
key.val.x*=-1;
key.val.y*=-1;
key.val.z*=-1;
ikc->SetKey(key_number, &key);
}
else if (id == Class_ID(TCBINTERP_POINT3_CLASS_ID,0))
{
ITCBPoint3Key key;
ikc->GetKey(key_number, &key);
key.val.x*=-1;
key.val.y*=-1;
key.val.z*=-1;
ikc->SetKey(key_number, &key);
}
} // end of for i
return MaxKeys;
}
void LegMirrorPanel::GetExpDeps(INode *nde,ExpControlDep *dep)
{
Control *tm_con,*pos_con,*rot_con,*xp_con,*yp_con,*zp_con,*xr_con,*yr_con,*zr_con;
dep->Clear();
tm_con = nde->GetTMController();
if(tm_con!=NULL)
{
pos_con = tm_con->GetPositionController();
rot_con = tm_con->GetRotationController();
if(rot_con)
{
if(!GetKeyControlInterface(rot_con) &&
IsExprControl(rot_con) )
{
dep->ndes[0]=GetDepNode((ExprControl *)rot_con);
}
xr_con=rot_con->GetXController();
if(xr_con!=NULL)
{
if(!GetKeyControlInterface(xr_con) &&
IsExprControl(xr_con) )
{
dep->ndes[0]=GetDepNode((ExprControl *)xr_con);
}
}
yr_con=rot_con->GetYController();
if(yr_con!=NULL)
{
if(!GetKeyControlInterface(yr_con)
&& IsExprControl(yr_con))
{
dep->ndes[1]=GetDepNode((ExprControl *)yr_con);
}
}
zr_con=rot_con->GetZController();
if(zr_con!=NULL)
{
if(!GetKeyControlInterface(zr_con)
&& IsExprControl(zr_con))
{
dep->ndes[2]=GetDepNode((ExprControl *)zr_con);
}
}
}
if(pos_con)
{
if(!GetKeyControlInterface(pos_con)
&& IsExprControl(pos_con))
{
dep->ndes[3]=GetDepNode((ExprControl *)pos_con);
}
xp_con=pos_con->GetXController();
if(xp_con!=NULL)
{
if(!GetKeyControlInterface(xp_con)
&& IsExprControl(xp_con))
{
dep->ndes[3]=GetDepNode((ExprControl *)xp_con);
}
}
yp_con=pos_con->GetYController();
if(yp_con!=NULL)
{
if(!GetKeyControlInterface(yp_con)
&& IsExprControl(yp_con))
{
dep->ndes[4]=GetDepNode((ExprControl *)yp_con);
}
}
zp_con=pos_con->GetZController();
if(zp_con!=NULL)
{
if(!GetKeyControlInterface(zp_con)
&& IsExprControl(zp_con))
{
dep->ndes[5]=GetDepNode((ExprControl *)zp_con);
}
}
}
}
}
INode *LegMirrorPanel::GetDepNode(ExprControl *expc)
{
int i,slot;
TSTR nname;
for(i=0;i<expc->getVarCount(VECTOR_EXPR);i++)
{
slot=expc->vVars[i].refID;
expc->refTab[slot].client->NotifyDependents(FOREVER,(PartID)&nname,REFMSG_GET_NODE_NAME);
return m_ip->GetINodeByName(nname);
}
for(i=0;i<expc->getVarCount(SCALAR_VAR);i++)
{
slot=expc->sVars[i].refID;
expc->refTab[slot].client->NotifyDependents(FOREVER,(PartID)&nname,REFMSG_GET_NODE_NAME);
return m_ip->GetINodeByName(nname);
}
return NULL;
}
void LegMirrorPanel::AssignExpressions(INode *nde,ExpControlDep *dep)
{
Control *tm_con,*pos_con,*rot_con,*xp_con,*yp_con,*zp_con,*xr_con,*yr_con,*zr_con;
tm_con = nde->GetTMController();
if(tm_con!=NULL)
{
pos_con = tm_con->GetPositionController();
rot_con = tm_con->GetRotationController();
if(rot_con)
{
if(!GetKeyControlInterface(rot_con) &&
IsExprControl(rot_con) )
{
AssignExpCtrl((ExprControl *)rot_con,dep->ndes[0]);
}
xr_con=rot_con->GetXController();
if(xr_con!=NULL)
{
if(!GetKeyControlInterface(xr_con) &&
IsExprControl(xr_con) )
{
AssignExpCtrl((ExprControl *)xr_con,dep->ndes[0]);
}
}
yr_con=rot_con->GetYController();
if(yr_con!=NULL)
{
if(!GetKeyControlInterface(yr_con)
&& IsExprControl(yr_con))
{
AssignExpCtrl((ExprControl *)yr_con,dep->ndes[1]);
}
}
zr_con=rot_con->GetZController();
if(zr_con!=NULL)
{
if(!GetKeyControlInterface(zr_con)
&& IsExprControl(zr_con))
{
AssignExpCtrl((ExprControl *)zr_con,dep->ndes[2]);
}
}
}
if(pos_con)
{
if(!GetKeyControlInterface(pos_con)
&& IsExprControl(pos_con))
{
AssignExpCtrl((ExprControl *)pos_con,dep->ndes[3]);
}
xp_con=pos_con->GetXController();
if(xp_con!=NULL)
{
if(!GetKeyControlInterface(xp_con)
&& IsExprControl(xp_con))
{
AssignExpCtrl((ExprControl *)xp_con,dep->ndes[3]);
}
}
yp_con=pos_con->GetYController();
if(yp_con!=NULL)
{
if(!GetKeyControlInterface(yp_con)
&& IsExprControl(yp_con))
{
AssignExpCtrl((ExprControl *)yp_con,dep->ndes[4]);
}
}
zp_con=pos_con->GetZController();
if(zp_con!=NULL)
{
if(!GetKeyControlInterface(zp_con)
&& IsExprControl(zp_con))
{
AssignExpCtrl((ExprControl *)zp_con,dep->ndes[5]);
}
}
}
}
}
void LegMirrorPanel::AssignExpCtrl(ExprControl *expc,INode *tnde)
{
int i,slot;
int sanim;
TSTR nname;
Control *cpt;
CString str(tnde->GetName()); //debug
for(i=0;i<expc->getVarCount(VECTOR_EXPR);i++)
{
slot=expc->vVars[i].refID;
CString conname(expc->refTab[slot].client->SubAnimName(expc->vVars[i].subNum));
cpt=GetControlByName(tnde->GetTMController(),conname,&sanim);
ASSERT(cpt);
expc->assignController(VECTOR_EXPR,i,cpt,sanim);
}
for(i=0;i<expc->getVarCount(SCALAR_VAR);i++)
{
slot=expc->sVars[i].refID;
CString conname(expc->refTab[slot].client->SubAnimName(expc->sVars[i].subNum));
cpt=GetControlByName(tnde->GetTMController(),conname,&sanim);
ASSERT(cpt);
expc->assignController(SCALAR_EXPR,i,cpt,sanim);
}
}
@@ -0,0 +1,392 @@
/***************************************************************************
* *
* 3DS Max Test Plugin *
* *
***************************************************************************
* *
* Version : 1.0ß, March 11th, 1998 *
* *
* Written By Loic Baumann from Fatal Design, specially for Gamasutra *
* *
***************************************************************************
* *
* This Plugin demonstrates how to write a simple 3DS MAX Plugin, using MFCs *
* *
***************************************************************************/
#include "stdafx.h"
#ifdef STRICT // Already defined by stdafx,
#undef STRICT // so we avoid warning linking msg
#endif
#ifdef _MBCS // The same as above
#undef _MBCS
#endif
#include <DLLPlatform\DLLPlatform.hpp>
#include "MissionImp.h"
#include "ExportUtil.h"
//#ifdef _DEBUG
//#define new DEBUG_NEW
//#undef THIS_FILE
//static char THIS_FILE[] = __FILE__;
//#endif
#include <direct.h>
#include "ExportUtil.h"
//#include "mapsizedlg.h"
//===========================================================================//
int MissionImp::DoImport(const TCHAR *name, ImpInterface *ii,Interface *i, BOOL suppressPrompts)
{
int return_value;
__try
{
m_ip = i;
m_suppress = suppressPrompts?true:false;
return_value = ImportMission(name);
//return_value = true;
GetSystemSetting(SYSSET_CLEAR_UNDO);
Verify(!theHold.Holding());
}
__except(ProcessException(GetExceptionInformation()))
{
}
return return_value;
}
// in maxpolygonmesh.cpp
Quat ConvertMWToMax(UnitQuaternion &quat);
Point3 ConvertMWToMax(Stuff::Point3D &pnt);
/*******************************************************************************
/* function name: ImportVideo
/* description: Import .video files
/*******************************************************************************/
int MissionImp::ImportVideo(const char *name,Quat maxrot,Point3 maxtrans)
{
CString filename = GetGamePath(m_ip) + "content\\"+name;
NotationFile videofile(filename);
Page *page = videofile.FindPage("LOD");
if (page)
{
const char *entry;
if (page->GetEntry("Geometry",&entry))
{
char path[MAX_PATH];
_splitpath(name,NULL,path,NULL,NULL);
CString path1(path);
// trim "armaturevideo from the tail of the path
path1.MakeLower();
int index = path1.Find("armaturevideo");
if (index>0)
{
path1 = path1.Left(index);
}
CString erfpath = GetGamePath(m_ip) + "content\\";
erfpath+=path1;
erfpath+=entry;
if (m_ip->ImportFromFile(erfpath,false))
{
// Move any node with name not starting with "_" to the rotation/translation coordinates
Matrix3 axis(MAT_IDENT);
INode *pWorld = m_ip->GetRootNode();
for (int x=0;x<pWorld->NumberOfChildren();x++)
{
INode *pChild = pWorld->GetChildNode(x);
CString name = pChild->GetName();
if (strnicmp(name,"_",1))
{
name = CString("_")+name;//name;
pChild->SetName((char *)(LPCTSTR)name);
pChild->Rotate(0,axis,maxrot);
pChild->Move(0,axis,maxtrans);
Quat fixrot(0.0,0.0,PI/2.0,0.0);
// Now move and rotate to the terrain's coordinate system
// pChild->Move(0,axis,fixtrans);
pChild->Rotate(0,axis,fixrot);
}
}
return 1;
}
}
}
return 0;
}
/*******************************************************************************
/* function name: ImportModel
/* description: Import .data files
/*******************************************************************************/
int MissionImp::ImportModel(const char *name,Quat maxrot,Point3 maxtrans)
{
CString filename = GetGamePath(m_ip) + "content\\"+name;
NotationFile modelfile(filename);
Page *page = modelfile.FindPage("Renderers");
if (page)
{
const char *entry;
if (page->GetEntry("VideoRenderer",&entry))
{
char path[MAX_PATH];
_splitpath(name,NULL,path,NULL,NULL);
CString filename(path);
// trim "armaturedata from the tail of the path
filename.MakeLower();
int index = filename.Find("armaturedata");
if (index>0)
{
filename = filename.Left(index);
}
filename+=entry;
return ImportVideo(filename,maxrot,maxtrans);
}
}
return 0;
}
struct ARMNODE
{
ARMNODE *parent;
CString name;
const char *model;
Quat rot;
Point3 trans;
};
/*******************************************************************************
/* function name: ImportArmature
/* description: Import .armature files
/*******************************************************************************/
int MissionImp::ImportArmature(const char *name,Quat maxrot,Point3 maxtrans)
{
CString filename = GetGamePath(m_ip) + "content\\"+name;
NotationFile armfile(filename);
NotationFile::PageIterator *pages = armfile.MakePageIterator();
CMapStringToPtr mapNode;
ARMNODE *pRoot = NULL;
Page *page;
while (page = pages->ReadAndNext())
{
ARMNODE *pNode = new ARMNODE;
if (NULL == pRoot)
pRoot = pNode;
pNode->name = page->GetName();
pNode->name.MakeLower();
mapNode[pNode->name] = pNode;
pNode->parent = NULL;
pNode->rot.Identity();
pNode->trans = Point3(0,0,0);
pNode->model = NULL;
}
delete pages;
pages = armfile.MakePageIterator();
while (page = pages->ReadAndNext())
{
CString name = page->GetName();
name.MakeLower();
ARMNODE *pNode = (ARMNODE *)mapNode[name];
Page::NoteIterator *notes = page->MakeNoteIterator();
Note *note;
while (note = notes->ReadAndNext())
{
if (0==stricmp(note->GetName(),"rotation"))
{
YawPitchRoll ypr;
note->GetEntry(&ypr);
{
UnitQuaternion rotation;
rotation = ypr;
pNode->rot = ConvertMWToMax(rotation);
}
}
if (0==stricmp(note->GetName(),"translation"))
{
Point3D translation;
note->GetEntry(&translation);
{
pNode->trans = ConvertMWToMax(translation);
}
}
if (0==stricmp(note->GetName(),"child"))
{
const char *child;
note->GetEntry(&child);
{
CString str(child);
str.MakeLower();
ARMNODE *pChild = (ARMNODE *)mapNode[str];
Check_Pointer(pChild);
pChild->parent = pNode;
if (pChild == pRoot)
pRoot= pNode;
}
}
if (0==stricmp(note->GetName(),"model"))
{
const char *model;
note->GetEntry(&model);
{
pNode->model = model;
}
}
}
delete notes;
}
delete pages;
int count = 0;
POSITION pos = mapNode.GetStartPosition();
while (pos)
{
CString key;
LPVOID value;
mapNode.GetNextAssoc(pos,key,value);
ARMNODE *pNode = (ARMNODE *)value;
if (pNode->model)
{
Quat q = pNode->rot;
Point3 p = pNode->trans;
ARMNODE *pParent = pNode->parent;
while (pParent)
{
q+=pParent->rot;
p+=pParent->trans;
pParent = pParent->parent;
}
q+=maxrot;
p+=maxtrans;
char path[MAX_PATH];
_splitpath(name,NULL,path,NULL,NULL);
CString filename(path);
filename+=pNode->model;
count += ImportModel(filename,q,p);
}
}
pos = mapNode.GetStartPosition();
while (pos)
{
CString key;
LPVOID value;
mapNode.GetNextAssoc(pos,key,value);
ARMNODE *pNode = (ARMNODE *)value;
delete pNode;
}
mapNode.RemoveAll();
return count;
}
/*******************************************************************************
/* function name: ImportPage
/* description: Import an object from a mission contents file
/*******************************************************************************/
int MissionImp::ImportPage(Page *page)
{
Quat maxrot;
Point3 maxtrans;
maxrot.Identity();
maxtrans = Point3(0,0,0);
YawPitchRoll ypl;
if (page->GetEntry("rotation",&ypl))
{
UnitQuaternion rotation;
rotation = ypl;
maxrot = ConvertMWToMax(rotation);
}
Point3D translation;
if (page->GetEntry("translation",&translation))
{
maxtrans = ConvertMWToMax(translation);
}
// Now import the buildings only
const char *entry;
if (page->GetEntry("armature",&entry))
{
if (0==strnicmp(entry,"buildings",9))
return ImportArmature(entry,maxrot,maxtrans);
}
if (page->GetEntry("model",&entry))
{
if (0==strnicmp(entry,"buildings",9))
return ImportModel(entry,maxrot,maxtrans);
}
return 0;
}
/*******************************************************************************
/* function name: ImportMission
/* description: Import a mission .contents file
/*******************************************************************************/
int MissionImp::ImportMission(const CString& fileName)
{
Point3 fixtrans;
fixtrans.x = 0;
fixtrans.y = 0;
Quat fixrot(0.0,0.0,PI/2.0,0.0);
INode *pWorld = m_ip->GetRootNode();
for (int x=0;x<pWorld->NumberOfChildren();x++)
{
INode *pChild = pWorld->GetChildNode(x);
CString name = pChild->GetName();
if (strnicmp(name,"_",1))
{
name = CString("_")+name;//name;
pChild->SetName((char *)(LPCTSTR)name);
}
}
// Change directory to game path
CString gamepath = GetGamePath(m_ip);
char tpath[MAX_PATH];
getcwd(tpath,MAX_PATH);
chdir(gamepath);
NotationFile notefile(fileName);
m_ip->ProgressStart((char *)(LPCTSTR)(CString("Importing ")+fileName),false,fn,NULL);
Page *page;
NotationFile::PageIterator *pages = notefile.MakePageIterator();
Check_Object(pages);
int count = 0;
int progress = 0;
int maxcount = pages->GetSize();
while (page = pages->ReadAndNext())
{
progress++;
m_ip->ProgressUpdate((int)(((float)progress/(float)maxcount)*100.0f),false,(char *)page->GetName());
count += ImportPage(page);
}
m_ip->ProgressEnd();
delete pages;
chdir(tpath);
return true;
}
@@ -0,0 +1,71 @@
// PlugTest.h : main header file for the PLUGTEST DLL
//
#if !defined(AFX_MISSIONIMP_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_)
#define AFX_MISSIONIMP_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#ifdef STRICT // Already defined by stdafx,
#undef STRICT // so we avoid warning linking msg
#endif
#ifdef _MBCS // The same as above
#undef _MBCS
#endif
#include "AnimationSuite.h"
#include <Stuff\StuffHeaders.hpp>
class MissionImp : public SceneImport
{
public:
MissionImp() {}
~MissionImp() {}
int ExtCount() { return 1;}
const TCHAR * Ext(int n) {
switch(n) {
case 0:
// This cause a static string buffer overwrite
// return GetString(IDS_EXTENSION1);
return _T("contents");
}
return _T("");
}
const TCHAR * LongDesc() { return GetString(IDS_LONGDESC); }
const TCHAR * ShortDesc() { return _T("MW4 CONTENT"); }
const TCHAR * AuthorName() { return _T("Jonthan Kyle"); }
const TCHAR * CopyrightMessage() { return GetString(IDS_COPYRIGHT); }
const TCHAR * OtherMessage1() { return _T(""); }
const TCHAR * OtherMessage2() { return _T(""); }
unsigned int Version() { return 100; }
void ShowAbout(HWND hWnd) {
CAbout dlg;
dlg.DoModal();
}
int DoImport(const TCHAR *name, ImpInterface *ii,Interface *i, BOOL suppressPrompts=FALSE);
int ImportMission(const CString& fileName);
private:
int ImportPage(Page *page);
int ImportVideo(const char *name,Quat maxrot,Point3 maxtrans);
int ImportModel(const char *name,Quat maxrot,Point3 maxtrans);
int ImportArmature(const char *name,Quat maxrot,Point3 maxtrans);
Interface* m_ip;
bool m_suppress;
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MISSIONIMP_H__68E70A2D_B863_11D1_98AD_0040051EDCE7__INCLUDED_)
@@ -0,0 +1,275 @@
#include "stdafx.h"
#ifdef STRICT // Already defined by stdafx,
#undef STRICT // so we avoid warning linking msg
#endif
#ifdef _MBCS // The same as above
#undef _MBCS
#endif
#include "OptimizeKeyframe.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
OptimizeKeyframePanel g_optimizeKeyframePanel;
CCriticalSection g_threadLock;
ThreadData g_threadInfo;
////////////////////////////////////////////////////////////////////////////////
// PlugPanel Dialog Procedure to handle User and System Interactions
static BOOL CALLBACK OptimizeKeyframePanelProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
switch (msg) {
case WM_INITDIALOG: //Panel's extra initialization
g_optimizeKeyframePanel.Init(hWnd);
break;
case WM_DESTROY: //Panel's extra destruction
g_optimizeKeyframePanel.Destroy(hWnd);
break;
case WM_COMMAND :
switch (LOWORD(wParam)) { //Handle Panel's controls
case IDC_ABOUT: {
CAbout dlg;
dlg.DoModal();
break;
}
case IDC_OPTIMIZE: {
g_optimizeKeyframePanel.Optimize();
break;
}
}
break;
////////////////////////////////////////////////////////////////////////
//The following lines are not necessary for MAX2 Plugins
case WM_LBUTTONDOWN:
case WM_LBUTTONUP:
case WM_MOUSEMOVE:
g_optimizeKeyframePanel.m_ip->RollupMouseMessage(hWnd, msg, wParam, lParam);
break;
////////////////////////////////////////////////////////////////////////
default:
return FALSE;
}
return TRUE;
}
////////////////////////////////////////////////////////////////////////////////
// Display the Plugin's Panel
void OptimizeKeyframePanel::BeginEditParams(Interface* ip, IUtil* iu)
{
m_ip = ip; //Get the Plugin's Interface
m_iu = iu; //Get the Utility Plugin's Interface
AFX_MANAGE_STATE(AfxGetStaticModuleState());
HINSTANCE loc_hInstance = AfxGetResourceHandle ();
//Display the plugin's Rollup Dialog
m_hPanel = m_ip->AddRollupPage(loc_hInstance, MAKEINTRESOURCE(IDD_OPT_PANEL),
OptimizeKeyframePanelProc, GetString(IDS_OPTIMIZEKEY_NAME),0);
}
////////////////////////////////////////////////////////////////////////////////
// Free the Plugins' Panel
void OptimizeKeyframePanel::EndEditParams(Interface *ip, IUtil *iu)
{
m_iu = NULL;
m_ip = NULL;
//Remove the Rollup Dialog
ip->DeleteRollupPage(m_hPanel);
m_hPanel = NULL;
}
////////////////////////////////////////////////////////////////////////////////
// Panel Initialization callback
void OptimizeKeyframePanel::Init(HWND hWnd)
{
}
////////////////////////////////////////////////////////////////////////////////
// Panel Destruction callback
void OptimizeKeyframePanel::Destroy(HWND hWnd)
{
}
////////////////////////////////////////////////////////////////////////////////
// Called when the Optimize Button is pushed
void OptimizeKeyframePanel::Optimize()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
JointEditDialog dialog(m_ip->GetRootNode(), m_ip);
if (dialog.DoModal() == IDOK)
{
// now optimize...
int total_nodes = JointEditDialog::CountChildren(m_ip->GetRootNode());
int current_node = 0;
theHold.SuperBegin();
LPVOID arg = NULL;
m_ip->ProgressStart(_T("Optimizing Joints"), TRUE, fn, arg);
OptimizeAnimation(m_ip->GetRootNode(), current_node, total_nodes, &dialog);
m_ip->ProgressEnd();
// Close out the undo
theHold.SuperAccept("Replicate");
}
}
////////////////////////////////////////////////////////////////////////////////
void
OptimizeKeyframePanel::OptimizeAnimation(INode *copy_node, int &current_node, int total_nodes, JointEditDialog *dialog)
{
Control *position_control = NULL;
Control *rotation_control = NULL;
Control *tm_controller = copy_node->GetTMController();
if (tm_controller != NULL)
{
position_control = tm_controller->GetPositionController();
rotation_control = tm_controller->GetRotationController();
JointPreference *pref = dialog->GetJointPrefrence(copy_node);
Verify(pref != NULL);
int include_joint = true;
if (pref->m_excludeJoint == JointPreference::ExcludeJoint)
{
include_joint = false;
}
if (pref->m_excludeJoint == JointPreference::AutoJoint)
{
if(dialog->NodeAnimated(copy_node))
{
include_joint = false;
}
}
if (include_joint)
{
if (pref->m_optimizeRotation)
{
if (rotation_control != NULL)
{
int num_keys = rotation_control->NumKeys();
if (num_keys > 0)
{
TimeValue start = rotation_control->GetKeyTime(0);
TimeValue end = rotation_control->GetKeyTime(num_keys-1);
if (pref->m_rotationRange)
{
start = (TimeValue)pref->m_rotationSampleStartFrame * GetTicksPerFrame();
end = (TimeValue)pref->m_rotationSampleEndFrame * GetTicksPerFrame();
}
Interval range;
start = (rotation_control->GetKeyTime(0) > start) ? rotation_control->GetKeyTime(0):start;
end = (rotation_control->GetKeyTime(num_keys-1) < end) ? rotation_control->GetKeyTime(num_keys-1):end;
// adjust the optimization to not include the last frame... tehehehehehe
if ((end - GetTicksPerFrame()) > start)
{
end -= GetTicksPerFrame();
}
range.Set(start , end);
OptKeyReduceStatus rot_progress;
ApplyKeyReduction_MW4(
rotation_control,
range,
pref->m_rotationThreshold * Stuff::Radians_Per_Degree,
GetTicksPerFrame(),
&rot_progress
);
}
}
}
if (pref->m_optimizeTranslation)
{
if (position_control != NULL)
{
int num_keys = position_control->NumKeys();
if (num_keys > 0)
{
TimeValue start = position_control->GetKeyTime(0);
TimeValue end = position_control->GetKeyTime(num_keys-1);
if (pref->m_translationRange)
{
start = (TimeValue)pref->m_translationSampleStartFrame * GetTicksPerFrame();
end = (TimeValue)pref->m_translationSampleEndFrame * GetTicksPerFrame();
}
Interval range;
start = (position_control->GetKeyTime(0) > start) ? position_control->GetKeyTime(0):start;
end = (position_control->GetKeyTime(num_keys-1) < end) ? position_control->GetKeyTime(num_keys-1):end;
// adjust the optimization to not include the last frame... tehehehehehe
if ((end - GetTicksPerFrame()) > start)
{
end -= GetTicksPerFrame();
}
range.Set(start , end);
OptKeyReduceStatus tran_progress;
ApplyKeyReduction_MW4(
position_control,
range,
pref->m_translationThreshold,
GetTicksPerFrame(),
&tran_progress
);
}
}
}
}
}
++current_node;
int total_done = (int)(((float)current_node/(float)total_nodes)*100.0f);
m_ip->ProgressUpdate(total_done);
for (int i = 0; i < copy_node->NumberOfChildren(); i++)
{
INode *child_node = copy_node->GetChildNode(i);
assert(child_node != NULL);
OptimizeAnimation(child_node, current_node, total_nodes, dialog);
}
return;
}
@@ -0,0 +1,120 @@
// PlugTest.h : main header file for the PLUGTEST DLL
//
#if !defined(OPT_KEYFRAME)
#define OPT_KEYFRAME
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#include "AnimationSuite.h"
struct ThreadData
{
int stop;
int abort;
int done;
float percent_complete;
INode* theNode;
float transThreshold;
float rotThreshold;
TimeValue step;
int totalChildren;
int childrenCounted;
char current_operation[200];
ThreadData()
{
stop = 0;
abort = 0;
percent_complete = 0;
step = 0;
transThreshold = 0;
rotThreshold = 0;
theNode = NULL;
done = 0;
totalChildren = 0;
childrenCounted = 0;
}
};
class OptKeyReduceStatus:
public KeyReduceStatus
{
public:
OptKeyReduceStatus()
{
}
void Init(int total)
{
}
int Progress(int p){return KEYREDUCE_CONTINUE;};
};
extern CCriticalSection g_threadLock;
extern ThreadData g_threadInfo;
/////////////////////////////////////////////////////////////////////////////
// PlugPanel, manage the Plugins' display panel
class OptimizeKeyframePanel : public UtilityObj {
protected:
IUtil* m_iu;
HWND m_hPanel;
public:
Interface* m_ip;
// Constructor & Destructor
OptimizeKeyframePanel() {};
virtual ~OptimizeKeyframePanel() {};
// Overides of the UtilityObj class
void BeginEditParams(Interface* ip, IUtil* iu);
void EndEditParams(Interface* ip, IUtil* iu);
void DeleteThis() {}
void Init(HWND hWnd);
void Destroy(HWND hWnd);
//Specific Methods
void Optimize();
void OptimizeAnimation(INode *copy_node, int &current_node, int total_nodes, JointEditDialog *dialog);
};
/////////////////////////////////////////////////////////////////////////////
// 3DS Max Standard Select-by-name Dialog Box Callback Class
class TestHitByNameDlgCallback : public HitByNameDlgCallback
{
public:
virtual TCHAR* dialogTitle() { return _T("Select a Node to get information from");}
virtual TCHAR* buttonText() { return _T("Select");}
virtual BOOL useFilter() {return FALSE;}
virtual BOOL useProc() { return TRUE;}
virtual void proc(INodeTab &nodeTab){NodeTab = nodeTab;}
virtual BOOL singleSelect() {return TRUE;}
public:
INodeTab NodeTab;
};
/////////////////////////////////////////////////////////////////////////////
#endif

Some files were not shown because too many files have changed in this diff Show More