added everything

This commit is contained in:
Metario
2017-04-17 06:17:10 -06:00
commit 9c6ff74f19
6121 changed files with 1625704 additions and 0 deletions

View File

@ -0,0 +1,83 @@
/**********************************************************************
*<
FILE: DllEntry.cpp
DESCRIPTION: Contains the Dll Entry stuff
CREATED BY:
HISTORY:
*> Copyright (c) 2000, All Rights Reserved.
**********************************************************************/
#include "max2dtsExporterPro.h"
#include "skinHelper.h"
#include "resource.h"
extern ClassDesc2* GetMax2dtsExporterPlusDesc();
extern ClassDesc2* GetMax2dsqExporterPlusDesc();
HINSTANCE hInstance;
int controlsInit = FALSE;
// This function is called by Windows when the DLL is loaded. This
// function may also be called many times during time critical operations
// like rendering. Therefore developers need to be careful what they
// do inside this function. In the code below, note how after the DLL is
// loaded the first time only a few statements are executed.
BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
{
hInstance = hinstDLL; // Hang on to this DLL's instance handle.
if (!controlsInit) {
controlsInit = TRUE;
InitCustomControls(hInstance); // Initialize MAX's custom controls
InitCommonControls(); // Initialize Win95 controls
}
return (TRUE);
}
// This function returns a string that describes the DLL and where the user
// could purchase the DLL if they don't have it.
__declspec( dllexport ) const TCHAR* LibDescription()
{
return GetString(IDS_LIBDESCRIPTION);
}
// This function returns the number of plug-in classes this DLL
// Must change this number when adding a new class
__declspec( dllexport ) int LibNumberClasses()
{
return 3;
}
// This function returns the number of plug-in classes this DLL
__declspec( dllexport ) ClassDesc* LibClassDesc(int i)
{
switch(i) {
case 0: return GetMax2dtsExporterPlusDesc();
case 1: return GetMax2dsqExporterPlusDesc();
case 2: return GetSkinHelperDesc();
default: return 0;
}
}
// This function returns a pre-defined constant indicating the version of
// the system under which it was compiled. It is used to allow the system
// to catch obsolete DLLs.
__declspec( dllexport ) ULONG LibVersion()
{
return VERSION_3DSMAX;
}
TCHAR *GetString(int id)
{
static TCHAR buf[256];
if (hInstance)
return LoadString(hInstance, id, buf, sizeof(buf)) ? buf : NULL;
return NULL;
}

View File

@ -0,0 +1,415 @@
/**********************************************************************
*<
FILE: max2dtsExporterPlus.cpp
DESCRIPTION: Appwizard generated plugin
CREATED BY:
HISTORY:
*> Copyright (c) 2000, All Rights Reserved.
**********************************************************************/
#include "max2dtsExporterPro.h"
#include "maxSceneEnum.h"
#include "appConfig.h"
#include "resource.h"
#include <fstream>
#define MAX2DTSEXPORTERPLUS_CLASS_ID Class_ID(0x612c5c7, 0x5924d160)
#define MAX2DSQEXPORTERPLUS_CLASS_ID Class_ID(0x39ec6494, 0x2ed1496b)
HWND hProgressDialog;
void SetProgress(F32 minor, F32 major, const char* message)
{
SendDlgItemMessage(hProgressDialog,IDC_MINOR_BAR,PBM_SETPOS, (int)(minor * 100.0f), 0 );
SendDlgItemMessage(hProgressDialog,IDC_MAJOR_BAR,PBM_SETPOS, (int)(major * 100.0f), 0 );
HWND hctl = GetDlgItem(hProgressDialog,IDC_MESSAGE);
SetWindowText(hctl,message);
InvalidateRect(hProgressDialog,NULL, TRUE);
UpdateWindow(hProgressDialog);
}
void SetupProgressDialog()
{
hProgressDialog = CreateDialog(hInstance, MAKEINTRESOURCE(IDD_PROGRESS),GetActiveWindow(),NULL);
CenterWindow(hProgressDialog,GetParent(hProgressDialog));
ShowWindow(hProgressDialog, SW_SHOW);
}
void ShutdownProgressDialog()
{
if(hProgressDialog)
{
DestroyWindow(hProgressDialog);
}
}
class Max2dtsExporterPlus : public SceneExport {
public:
static HWND hParams;
int ExtCount(); // Number of extensions supported
const TCHAR * Ext(int n); // Extension #n (i.e. "3DS")
const TCHAR * LongDesc(); // Long ASCII description (i.e. "Autodesk 3D Studio File")
const TCHAR * ShortDesc(); // Short ASCII description (i.e. "3D Studio")
const TCHAR * AuthorName(); // ASCII Author name
const TCHAR * CopyrightMessage(); // ASCII Copyright message
const TCHAR * OtherMessage1(); // Other message #1
const TCHAR * OtherMessage2(); // Other message #2
unsigned int Version(); // Version number * 100 (i.e. v3.01 = 301)
void ShowAbout(HWND hWnd); // Show DLL's "About..." box
BOOL SupportsOptions(int ext, DWORD options);
int DoExport(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts=FALSE, DWORD options=0);
void alert(const char * title, const char * message, BOOL suppressPrompts);
//Constructor/Destructor
Max2dtsExporterPlus();
~Max2dtsExporterPlus();
};
class Max2dsqExporterPlus : public SceneExport {
public:
static HWND hParams;
int ExtCount(); // Number of extensions supported
const TCHAR * Ext(int n); // Extension #n (i.e. "3DS")
const TCHAR * LongDesc(); // Long ASCII description (i.e. "Autodesk 3D Studio File")
const TCHAR * ShortDesc(); // Short ASCII description (i.e. "3D Studio")
const TCHAR * AuthorName(); // ASCII Author name
const TCHAR * CopyrightMessage(); // ASCII Copyright message
const TCHAR * OtherMessage1(); // Other message #1
const TCHAR * OtherMessage2(); // Other message #2
unsigned int Version(); // Version number * 100 (i.e. v3.01 = 301)
void ShowAbout(HWND hWnd); // Show DLL's "About..." box
BOOL SupportsOptions(int ext, DWORD options);
int DoExport(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts=FALSE, DWORD options=0);
void alert(const char * title, const char * message, BOOL suppressPrompts);
//Constructor/Destructor
Max2dsqExporterPlus();
~Max2dsqExporterPlus();
};
class Max2dtsExporterPlusClassDesc:public ClassDesc2 {
public:
int IsPublic() { return TRUE; }
void * Create(BOOL loading = FALSE) { return new Max2dtsExporterPlus(); }
const TCHAR * ClassName() { return GetString(IDS_CLASS_NAME); }
SClass_ID SuperClassID() { return SCENE_EXPORT_CLASS_ID; }
Class_ID ClassID() { return MAX2DTSEXPORTERPLUS_CLASS_ID; }
const TCHAR* Category() { return GetString(IDS_CATEGORY); }
const TCHAR* InternalName() { return _T("Max2dtsExporterPlus"); } // returns fixed parsable name (scripter-visible name)
HINSTANCE HInstance() { return hInstance; } // returns owning module handle
};
class Max2dsqExporterPlusClassDesc:public ClassDesc2 {
public:
int IsPublic() { return TRUE; }
void * Create(BOOL loading = FALSE) { return new Max2dsqExporterPlus(); }
const TCHAR * ClassName() { return GetString(IDS_CLASS_NAME); }
SClass_ID SuperClassID() { return SCENE_EXPORT_CLASS_ID; }
Class_ID ClassID() { return MAX2DSQEXPORTERPLUS_CLASS_ID; }
const TCHAR* Category() { return GetString(IDS_CATEGORY); }
const TCHAR* InternalName() { return _T("Max2dsqExporterPlus"); } // returns fixed parsable name (scripter-visible name)
HINSTANCE HInstance() { return hInstance; } // returns owning module handle
};
static Max2dtsExporterPlusClassDesc Max2dtsExporterPlusDesc;
ClassDesc2* GetMax2dtsExporterPlusDesc() { return &Max2dtsExporterPlusDesc; }
static Max2dsqExporterPlusClassDesc Max2dsqExporterPlusDesc;
ClassDesc2* GetMax2dsqExporterPlusDesc() { return &Max2dsqExporterPlusDesc; }
BOOL CALLBACK Max2dtsExporterPlusOptionsDlgProc(HWND hWnd,UINT message,WPARAM wParam,LPARAM lParam) {
static Max2dtsExporterPlus *imp = NULL;
switch(message) {
case WM_INITDIALOG:
imp = (Max2dtsExporterPlus *)lParam;
CenterWindow(hWnd,GetParent(hWnd));
return TRUE;
case WM_CLOSE:
EndDialog(hWnd, 0);
return TRUE;
}
return FALSE;
}
//--- Max2dtsExporterPlus -------------------------------------------------------
Max2dtsExporterPlus::Max2dtsExporterPlus()
{
hProgressDialog = NULL;
}
Max2dtsExporterPlus::~Max2dtsExporterPlus()
{
}
int Max2dtsExporterPlus::ExtCount()
{
// Returns the number of file name extensions supported by the plug-in.
return 1;
}
const TCHAR *Max2dtsExporterPlus::Ext(int n)
{
// Return the 'i-th' file name extension
return _T("DTS");
}
const TCHAR *Max2dtsExporterPlus::LongDesc()
{
//Return long ASCII description
return _T("Torque game engine dts shape");
}
const TCHAR *Max2dtsExporterPlus::ShortDesc()
{
//Return short ASCII description
return _T("Torque DTS Shape");
}
const TCHAR *Max2dtsExporterPlus::AuthorName()
{
//Return ASCII Author name
return _T("Dark Industries");
}
const TCHAR *Max2dtsExporterPlus::CopyrightMessage()
{
// Return ASCII Copyright message
return _T("Copyright Dark Industries");
}
const TCHAR *Max2dtsExporterPlus::OtherMessage1()
{
//Return Other message #1 if any
return _T("");
}
const TCHAR *Max2dtsExporterPlus::OtherMessage2()
{
//Return other message #2 in any
return _T("");
}
unsigned int Max2dtsExporterPlus::Version()
{
//Return Version number * 100 (i.e. v3.01 = 301)
return 100;
}
void Max2dtsExporterPlus::ShowAbout(HWND hWnd)
{
// Optional
}
BOOL Max2dtsExporterPlus::SupportsOptions(int ext, DWORD options)
{
// Decide which options to support. Simply return
// true for each option supported by each Extension
// the exporter supports.
return TRUE;
}
void Max2dtsExporterPlus::alert(const char * title, const char * message, BOOL suppressPrompts)
{
if (suppressPrompts)
DTS::AppConfig::PrintDump(-1,message);
else
{
TSTR str1(message);
TSTR str2(title);
MessageBox(GetActiveWindow(), str1, str2, MB_OK);
}
}
int Max2dtsExporterPlus::DoExport(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts, DWORD options)
{
// Implement the actual file Export here and
// return TRUE If the file is exported properly
DTS::AppConfig::SetAppFramesPerSec(GetFrameRate());
if (!DTS::AppConfig::SetDumpFile(name))
alert("Dump file error",DTS::avar("Unable to create dumpfile for shape \"%s\".",name),suppressPrompts);
DTS::AppConfig::SetExportOptimized(true);
//DTS::AppConfig::PrintDump(-1,"Setting up for full export (dts) -- turning on optimized meshes\r\n");
// Get config file if it exists...
const char * configBase = i->GetCurFilePath();
DTS::AppConfig::SearchConfigFile(configBase);
SetupProgressDialog();
DTS::AppConfig::SetProgressCallback(SetProgress);
DTS::AppConfig::SetProgress(0.0f,0.0f,"Exploring scene...");
DTS::MaxSceneEnum maxSceneEnum(ei->theScene);
DTS::Shape * shape = maxSceneEnum.processScene();
if (!DTS::AppConfig::IsExportError())
{
std::ofstream os;
os.open(name,std::ofstream::binary);
shape->save(os);
os.close();
}
DTS::AppConfig::CloseDumpFile();
delete shape;
ShutdownProgressDialog();
if (DTS::AppConfig::IsExportError())
alert("Export error",DTS::AppConfig::GetExportError(),suppressPrompts);
return !DTS::AppConfig::IsExportError();
}
//--- Max2dsqExporterPlus -------------------------------------------------------
Max2dsqExporterPlus::Max2dsqExporterPlus()
{
}
Max2dsqExporterPlus::~Max2dsqExporterPlus()
{
}
int Max2dsqExporterPlus::ExtCount()
{
// Returns the number of file name extensions supported by the plug-in.
return 1;
}
const TCHAR *Max2dsqExporterPlus::Ext(int n)
{
// Return the 'i-th' file name extension
return _T("DSQ");
}
const TCHAR *Max2dsqExporterPlus::LongDesc()
{
//Return long ASCII description
return _T("Torque game engine dsq files");
}
const TCHAR *Max2dsqExporterPlus::ShortDesc()
{
//Return short ASCII description
return _T("Torque DSQ File");
}
const TCHAR *Max2dsqExporterPlus::AuthorName()
{
//Return ASCII Author name
return _T("Dark Industries");
}
const TCHAR *Max2dsqExporterPlus::CopyrightMessage()
{
// Return ASCII Copyright message
return _T("Copyright Dark Industries");
}
const TCHAR *Max2dsqExporterPlus::OtherMessage1()
{
//Return Other message #1 if any
return _T("");
}
const TCHAR *Max2dsqExporterPlus::OtherMessage2()
{
//Return other message #2 in any
return _T("");
}
unsigned int Max2dsqExporterPlus::Version()
{
//Return Version number * 100 (i.e. v3.01 = 301)
return 100;
}
void Max2dsqExporterPlus::ShowAbout(HWND hWnd)
{
// Optional
}
BOOL Max2dsqExporterPlus::SupportsOptions(int ext, DWORD options)
{
// Decide which options to support. Simply return
// true for each option supported by each Extension
// the exporter supports.
return TRUE;
}
void Max2dsqExporterPlus::alert(const char * title, const char * message, BOOL suppressPrompts)
{
if (suppressPrompts)
DTS::AppConfig::PrintDump(-1,message);
else
{
TSTR str1(message);
TSTR str2(title);
MessageBox(GetActiveWindow(), str1, str2, MB_OK);
}
}
int Max2dsqExporterPlus::DoExport(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts, DWORD options)
{
// Implement the actual file Export here and
// return TRUE If the file is exported properly
DTS::AppConfig::SetAppFramesPerSec(GetFrameRate());
if (!DTS::AppConfig::SetDumpFile(name))
alert("Dump file error",DTS::avar("Unable to create dumpfile for shape \"%s\".",name),suppressPrompts);
DTS::AppConfig::SetExportOptimized(false);
//DTS::AppConfig::PrintDump(-1,"Setting up for sequence export only (dsq) -- turning off optimized meshes\r\n");
// Get config file if it exists...
const char * configBase = i->GetCurFilePath();
DTS::AppConfig::SearchConfigFile(configBase);
SetupProgressDialog();
DTS::AppConfig::SetProgressCallback(SetProgress);
DTS::MaxSceneEnum maxSceneEnum(ei->theScene);
DTS::Shape * shape = maxSceneEnum.processScene();
if (!DTS::AppConfig::IsExportError())
{
std::ofstream os;
os.open(name,std::ofstream::binary);
shape->saveSequences(os);
os.close();
}
DTS::AppConfig::CloseDumpFile();
delete shape;
ShutdownProgressDialog();
if (DTS::AppConfig::IsExportError())
alert("Export error",DTS::AppConfig::GetExportError(),suppressPrompts);
return !DTS::AppConfig::IsExportError();
}

View File

@ -0,0 +1,8 @@
LIBRARY max2dtsExporterPro
EXPORTS
LibDescription @1
LibNumberClasses @2
LibClassDesc @3
LibVersion @4
SECTIONS
.data READ WRITE

View File

@ -0,0 +1,26 @@
/**********************************************************************
*<
FILE: max2dtsExporterPlus.h
DESCRIPTION: Includes for Plugins
CREATED BY:
HISTORY:
*> Copyright (c) 2000, All Rights Reserved.
**********************************************************************/
#ifndef __MAX2DTSEXPORTERPLUS__H
#define __MAX2DTSEXPORTERPLUS__H
#include "Max.h"
#include "resource.h"
#include "istdplug.h"
#include "iparamb2.h"
#include "iparamm2.h"
extern TCHAR *GetString(int id);
extern HINSTANCE hInstance;
#endif // __MAX2DTSEXPORTERPLUS__H

View File

@ -0,0 +1,155 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include <windows.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
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
BEGIN
IDD_PROGRESS, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 179
TOPMARGIN, 7
BOTTOMMARGIN, 47
END
END
#endif // APSTUDIO_INVOKED
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Dark Industries"
VALUE "FileDescription", "max2dtsExporterPlus"
VALUE "FileVersion", "1, 0, 0, 0"
VALUE "InternalName", "max2dtsExporterPlus"
VALUE "LegalCopyright", "Copyright <20> 2006"
VALUE "OriginalFilename", "max2dtsExporterPlus.dle"
VALUE "ProductName", "Dark Industries max2dtsExporterPlus"
VALUE "ProductVersion", "1, 0, 0, 0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_PROGRESS DIALOGEX 0, 0, 186, 54
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
WS_SYSMENU
CAPTION "Exporting..."
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
LTEXT "Static",IDC_MESSAGE,7,7,172,8
CONTROL "",IDC_MAJOR_BAR,"msctls_progress32",WS_BORDER,7,33,172,
14
CONTROL "",IDC_MINOR_BAR,"msctls_progress32",WS_BORDER,7,17,172,
14
END
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE
BEGIN
IDS_LIBDESCRIPTION "Export Torque DTS files using dtsSDKPlus"
IDS_CATEGORY "Exporter"
IDS_CLASS_NAME "Max2dtsExporterPlus"
IDS_PARAMS "Parameters"
IDS_SPIN "Spin"
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@ -0,0 +1,540 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
#include "maxAppMesh.h"
#include "maxAppNode.h"
#include "appConfig.h"
#include "appIfl.h"
#include "skinHelper.h"
#pragma pack(push,8)
#include <max.h>
#include <iparamb2.h>
#include <ISkin.h>
#include <modstack.h>
#include <istdplug.h>
#include <stdmat.h>
#include <maxtypes.h>
#pragma pack(pop)
//----------------------------------------------------------------
// 3dsMax utility function:
// Grab the tri object from the max mesh node
//----------------------------------------------------------------
TriObject * getTriObject( INode *pNode, S32 time, bool & deleteIt)
{
TriObject * tri = NULL;
IParamBlock * paramBlock = NULL;
// if the object can't convert to a tri-mesh, eval world state to
// get an object that can:
const ::ObjectState &os = pNode->EvalWorldState(time);
if ( os.obj->CanConvertToType(triObjectClassID) )
tri = (TriObject *)os.obj->ConvertToType( time, triObjectClassID );
deleteIt = (tri && (tri != os.obj));
return tri;
}
//----------------------------------------------------------------
// 3dsMax utility function:
// Grab the skin data from the max mesh node
//----------------------------------------------------------------
void findSkinData(INode * pNode, ISkin **skin, ISkinContextData ** skinData)
{
// till proven otherwise...
*skin = NULL;
*skinData = NULL;
// Get object from node. Abort if no object.
::Object* obj = pNode->GetObjectRef();
if (!obj)
return;
Modifier * mod = NULL;
// Is derived object ?
S32 i;
while (obj->SuperClassID() == GEN_DERIVOB_CLASS_ID)
{
IDerivedObject* dobj = (IDerivedObject*) obj;
// Iterate over all entries of the modifier stack.
for (i=0;i<dobj->NumModifiers();i++)
if (dobj->GetModifier(i)->ClassID() == SKIN_CLASSID)
break;
if (i!=dobj->NumModifiers())
{
mod = dobj->GetModifier(i);
break;
}
obj = dobj->GetObjRef();
}
if (!mod)
return;
*skin = (ISkin*) mod->GetInterface(I_SKIN);
if (!*skin)
return;
*skinData = (*skin)->GetContextInterface(pNode);
if (!*skinData)
*skin=NULL; // return both or neither
}
namespace DTS
{
MaxAppMesh::MaxAppMesh(INode * maxNode, AppNode * appNode)
{
mMaxNode = maxNode;
mAppNode = appNode;
}
Matrix<4,4,F32> MaxAppMesh::getMeshTransform(const AppTime & time)
{
assert(!mLocked && "Mesh is locked");
Matrix<4,4,F32> ret;
Matrix3 mat = mMaxNode->GetObjTMAfterWSM(SecToTicks(time.getF32()));
return convertFromMaxMatrix(mat);
}
F32 MaxAppMesh::getVisValue(const AppTime & time)
{
assert(!mLocked && "Mesh is locked");
return mMaxNode->GetVisibility(SecToTicks(time.getF32()));
}
bool MaxAppMesh::getMaterial(S32 matIdx, Material & mat)
{
mat.reflectance = -1;
mat.bump = -1;
mat.detail = -1;
mat.detailScale = 1.0f;
mat.reflection = 1.0f;
mat.flags = 0;
// do some hocus pocus to get the material....
Mtl * mtl = mMaxNode->GetMtl();
if( !mtl )
return false;
if( mtl->ClassID() == Class_ID(MULTI_CLASS_ID,0) )
{
MultiMtl * multiMtl = (MultiMtl*)mtl;
if (multiMtl->NumSubMtls()==0)
return false;
matIdx %= multiMtl->NumSubMtls();
mtl = multiMtl->GetSubMtl( matIdx );
}
if( mtl->ClassID() != Class_ID(DMTL_CLASS_ID,0) )
{
AppConfig::SetExportError("max1", avar("Unexpected material type on mesh \"%s\".",mMaxNode->GetName()));
return false;
}
StdMat * stdMat = (StdMat*)mtl;
// we now have a standard material...this guy has a number of maps
// the diffuse map corresponds to the texture
// the reflection map is used for environment mapping (normally this will be in the alpha of
// the texture, but under some circumstances -- translucency -- you want a separate map for it)
// the material also has a bump map and a detail map (we look for this in the ambient map...
// ambient because detail maps add ambiance... :)
// get diffuse map...
if (stdMat->GetSubTexmap(ID_DI) == NULL || !stdMat->MapEnabled(ID_DI))
// no diffuse...
return false;
if (stdMat->GetSubTexmap(ID_DI)->ClassID() != Class_ID(BMTEX_CLASS_ID,0))
{
AppConfig::SetExportError("max2", avar("Diffuse channel on mesh \"%s\" has a non-bitmap texture map.",mMaxNode->GetName()));
return false;
}
BitmapTex * diffuse = (BitmapTex*)stdMat->GetSubTexmap(ID_DI);
char* name = diffuse->GetMapName();
// set up texture flags
if (stdMat->MapEnabled(ID_OP))
{
// note: translucent if opacity channel is enabled
mat.flags |= Material::Translucent;
if (stdMat->GetTransparencyType() == TRANSP_ADDITIVE)
mat.flags |= Material::Additive;
else if (stdMat->GetTransparencyType() == TRANSP_SUBTRACTIVE)
mat.flags |= Material::Subtractive;
}
if (!stdMat->MapEnabled(ID_RL))
// only environment map if reflectance check box is set (but no material necessary)
mat.flags |= Material::NeverEnvMap;
mat.reflectance = stdMat->GetTexmapAmt(ID_RL,0);
if (diffuse->GetUVGen()->GetTextureTiling() & U_WRAP)
mat.flags |= Material::SWrap;
if (diffuse->GetUVGen()->GetTextureTiling() & V_WRAP)
mat.flags |= Material::TWrap;
if ( stdMat->GetSelfIllum(0) > 0.99f)
mat.flags |= Material::SelfIlluminating;
//------------
// If this is an ifl, then create the ifl material if it doesn't exist and mark as ifl
const char * dot = strchr(name,'.');
if (dot && !stricmp(dot+1,"ifl"))
{
mat.flags |= Material::IFLMaterial;
while (mIfls.size()<=matIdx)
mIfls.push_back(NULL);
if (!mIfls[matIdx])
mIfls[matIdx] = new AppIfl(name);
}
else
{
name = removeExt(name);
}
mat.name = std::string( name );
return true;
}
bool MaxAppMesh::animatesFrame(const AppSequenceData & seqData)
{
assert(!mLocked && "Mesh is locked");
S32 startTime = SecToTicks(seqData.startTime.getF32());
S32 endTime = SecToTicks(seqData.endTime.getF32());
bool deleteIt;
TriObject * tri = getTriObject(mMaxNode,startTime,deleteIt);
if (!tri)
return false;
Interval ivalid;
ivalid = tri->ChannelValidity(startTime, GEOM_CHAN_NUM);
if (deleteIt)
tri->DeleteMe();
return (ivalid.Start() > startTime || ivalid.End() < endTime);
}
bool MaxAppMesh::animatesMatFrame(const AppSequenceData & seqData)
{
assert(!mLocked && "Mesh is locked");
S32 startTime = SecToTicks(seqData.startTime.getF32());
S32 endTime = SecToTicks(seqData.endTime.getF32());
bool deleteIt;
TriObject * tri = getTriObject(mMaxNode,startTime,deleteIt);
if (!tri)
return false;
Interval ivalid;
ivalid = tri->ChannelValidity(startTime, TEXMAP_CHAN_NUM);
if (deleteIt)
tri->DeleteMe();
return (ivalid.Start() > startTime || ivalid.End() < endTime);
}
AppMeshLock MaxAppMesh::lockMesh(const AppTime & time, const Matrix<4,4,F32> & objectOffset)
{
// are we mirrored?
AffineParts parts;
decomp_affine(objectOffset,&parts);
bool mirror = parts.sign < 0.0f;
bool delTri;
TriObject * tri = getTriObject(mMaxNode,SecToTicks(time.getF32()),delTri);
::Mesh & maxMesh = tri->mesh;
S32 i;
S32 lastMatIdx = -1;
Matrix3 uvTransform;
// start lists empty
mFaces.clear();
mVerts.clear();
mTVerts.clear();
mIndices.clear();
mSmooth.clear();
mVertId.clear();
// start out with faces and crop data allocated
//mFaces.resize(maxMesh.getNumFaces());
// if no faces, detect it (use redundant test just in case
bool tmap = maxMesh.mapSupport(1) && maxMesh.tVerts; // 1 == default map
bool twoSided = false;
// get faces, points & materials
for (i=0; i<maxMesh.getNumFaces();i++)
{
Face & maxFace = maxMesh.faces[i];
Primitive tsFace; //mFaces[i];
// set faces material index
tsFace.type = maxFace.getMatID(); // use max mat idx (get's converted by shapemimic)
tsFace.firstElement = mIndices.size();
tsFace.numElements = 3;
tsFace.type |= Primitive::Triangles|Primitive::Indexed;
// set vertex indices
S32 idx0 = maxFace.v[0];
S32 idx1 = maxFace.v[2]; // switch the order to be CW
S32 idx2 = maxFace.v[1]; // switch the order to be CW
if (mirror)
{
S32 tmp = idx1;
idx1 = idx2;
idx2 = tmp;
}
Point3D v0(maxMesh.verts[idx0].x,maxMesh.verts[idx0].y,maxMesh.verts[idx0].z);
Point3D v1(maxMesh.verts[idx1].x,maxMesh.verts[idx1].y,maxMesh.verts[idx1].z);
Point3D v2(maxMesh.verts[idx2].x,maxMesh.verts[idx2].y,maxMesh.verts[idx2].z);
Point3D vert0 = objectOffset * v0;
Point3D vert1 = objectOffset * v1;
Point3D vert2 = objectOffset * v2;
// set texture vertex indices
Point2D tvert0(0,0);
Point2D tvert1(0,0);
Point2D tvert2(0,0);
if (tmap)
{
TVFace & maxTVFace = maxMesh.mapFaces(1)[i]; // 1 == default map
S32 tidx0 = maxTVFace.getTVert(0);
S32 tidx1 = maxTVFace.getTVert(2); // switch the order to be CW
S32 tidx2 = maxTVFace.getTVert(1); // switch the order to be CW
if (mirror)
{
S32 tmp = tidx1;
tidx1 = tidx2;
tidx2 = tmp;
}
if (lastMatIdx != maxFace.getMatID())
{
twoSided = false;
// get texture transform for this material
uvTransform.IdentityMatrix();
Mtl * mtl = mMaxNode->GetMtl();
if( mtl )
{
if( mtl->ClassID() == Class_ID(MULTI_CLASS_ID,0) )
{
MultiMtl * multiMtl = (MultiMtl*)mtl;
if (multiMtl->NumSubMtls()>0)
mtl = multiMtl->GetSubMtl( maxFace.getMatID() % multiMtl->NumSubMtls());
}
if( mtl->ClassID() == Class_ID(DMTL_CLASS_ID,0) )
{
StdMat * stdMat = (StdMat*)mtl;
if (stdMat->GetSubTexmap(ID_DI)!=NULL && stdMat->MapEnabled(ID_DI) && stdMat->GetSubTexmap(ID_DI)->ClassID() == Class_ID(BMTEX_CLASS_ID,0))
{
BitmapTex * diffuse = (BitmapTex*)stdMat->GetSubTexmap(ID_DI);
diffuse->GetUVGen()->GetUVTransform(uvTransform);
}
if (stdMat->GetTwoSided() > 0)
twoSided = true;
else
twoSided = false;
}
}
lastMatIdx = maxFace.getMatID();
}
Point2 tv0 = maxMesh.mapVerts(1)[tidx0] * uvTransform;
Point2 tv1 = maxMesh.mapVerts(1)[tidx1] * uvTransform;
Point2 tv2 = maxMesh.mapVerts(1)[tidx2] * uvTransform;
tvert0.x(tv0.x);
tvert0.y(1.0f-tv0.y);
tvert1.x(tv1.x);
tvert1.y(1.0f-tv1.y);
tvert2.x(tv2.x);
tvert2.y(1.0f-tv2.y);
}
tsFace.type |= maxFace.getMatID(); // return max mat id...gets converted to ts mat id by shapemimic
mFaces.push_back(tsFace);
// now add indices...this is easy right now...later we'll mess this up
mIndices.push_back(addVertex(vert0,tvert0,idx0,maxFace.smGroup));
mIndices.push_back(addVertex(vert1,tvert1,idx1,maxFace.smGroup));
mIndices.push_back(addVertex(vert2,tvert2,idx2,maxFace.smGroup));
if( twoSided )
{
Primitive tsFace; //mFaces[i];
// set faces material index
tsFace.type = maxFace.getMatID(); // use max mat idx (get's converted by shapemimic)
tsFace.firstElement = mIndices.size();
tsFace.numElements = 3;
tsFace.type |= Primitive::Triangles|Primitive::Indexed;
tsFace.type |= maxFace.getMatID(); // return max mat id...gets converted to ts mat id by shapemimic
mFaces.push_back(tsFace);
mIndices.push_back(addVertex(vert0,tvert0,idx0,maxFace.smGroup));
mIndices.push_back(addVertex(vert2,tvert2,idx2,maxFace.smGroup));
mIndices.push_back(addVertex(vert1,tvert1,idx1,maxFace.smGroup));
}
}
if (delTri)
delete tri;
return Parent::lockMesh(time,objectOffset);
}
void MaxAppMesh::unlockMesh()
{
Parent::unlockMesh();
// no more cleanup...but if there were some to do, we'd do it here
}
void MaxAppMesh::getSkinData()
{
if (mSkinDataFetched)
return;
mSkinDataFetched = true;
ISkin * skin;
ISkinContextData * skinData;
findSkinData(mMaxNode,&skin,&skinData);
if (!skin || !skinData || !skin->GetNumBones())
return;
// This is a hack to avoid making the skin helper a ws modifier
// A hack, but needed because ws modifiers screw things up (add
// offsets for some reason).
SkinHelper::smTheOnlyOne = mMaxNode;
// add skin helper modifier...
::Object * obj = mMaxNode->GetObjectRef();
IDerivedObject * dobj = (IDerivedObject*)CreateDerivedObject(mMaxNode->GetObjectRef());
SkinHelper * skinHelper = (SkinHelper*)CreateInstance(GetSkinHelperDesc()->SuperClassID(),GetSkinHelperDesc()->ClassID());
dobj->AddModifier(skinHelper);
mMaxNode->SetObjectRef(dobj);
// get bones
S32 i,j, numBones = skin->GetNumBones();
for (i=0; i<numBones; i++)
{
mBones.push_back(new MaxAppNode(skin->GetBone(i)));
AppConfig::PrintDump(PDPass2,avar("Adding skin object from skin \"%s\" to bone \"%s\" (%i).\r\n",mMaxNode->GetName(),mBones[i]->getName(),i));
}
bool delTri;
TriObject * tri = NULL;
// get skin mesh
tri = getTriObject(mMaxNode,0,delTri);
// get vertex weights from alternate tv channels
S32 numPoints = tri->mesh.getNumVerts();
if (tri->mesh.getNumMaps()<2+((1+numBones)>>1))
{
AppConfig::SetExportError("max3", "Assertion failed on skin object");
return;
}
mWeights.resize(numBones);
for (i=0; i<mWeights.size(); i++)
{
mWeights[i] = new std::vector<F32>;
mWeights[i]->resize(numPoints);
for (j=0; j<numPoints; j++)
(*mWeights[i])[j]=0.0f;
}
for (j=0; j<numBones; j++)
{
//AppConfig::PrintDump(-1,avar("Adding weights for bone %i (\"%s\")\r\n",j,mBones[j]->getName()));
std::vector<bool> gotWeight;
gotWeight.resize(tri->mesh.numVerts);
for (i=0; i<gotWeight.size(); i++)
gotWeight[i]=false;
for (i=0; i<tri->mesh.numFaces; i++)
{
S32 ch = 2+(j>>1);
Face & face = tri->mesh.faces[i];
TVFace & tvFace = tri->mesh.mapFaces(ch)[i];
for (S32 count=0; count<3; count++)
{
S32 idx = face.v[count];
if (!gotWeight[idx])
{
UVVert tv = tri->mesh.mapVerts(ch)[tvFace.t[count]];
F32 w = (j&1) ? tv.y : tv.x;
(*mWeights[j])[idx] = w;
//if (w>0.01f)
//AppConfig::PrintDump(-1,avar(" Vertex %i, weight %f\r\n",idx,w));
gotWeight[idx]=true;
}
}
}
}
if (delTri)
delete tri;
// done with helper...remove it now...
dobj->DeleteModifier(); // this'll be our skin helper
SkinHelper::smTheOnlyOne = NULL;
// following copied from AVCUtil.cpp...is needed to get rid of bar in modifier list
if (dobj->NumModifiers() == 0 && !dobj->TestAFlag(A_DERIVEDOBJ_DONTDELETE))
{
obj = dobj->GetObjRef();
obj->TransferReferences(dobj);
dobj->SetAFlag(A_LOCK_TARGET);
dobj->NotifyDependents(FOREVER,0,REFMSG_SUBANIM_STRUCTURE_CHANGED);
obj->NotifyDependents(FOREVER,0,REFMSG_SUBANIM_STRUCTURE_CHANGED);
dobj->ClearAFlag(A_LOCK_TARGET);
dobj->MaybeAutoDelete();
}
}
bool MaxAppMesh::isBillboard()
{
bool temp;
return ( getBool( "enableBillboard", temp) && temp == true ) || AppMesh::isBillboard();
}
bool MaxAppMesh::isBillboardZAxis()
{
bool temp;
S32 value = 0;
if( getBool( "enableBillboard", temp) && temp == true )
{
if( getInt("bb_Type", value) && value == 2 )
return true;
}
return AppMesh::isBillboardZAxis();
}
bool MaxAppMesh::isSorted()
{
bool temp;
return ( getBool( "enableSort", temp) && temp == true ) || AppMesh::isSorted();
}
};

View File

@ -0,0 +1,63 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
#ifndef DTSMAXAPPMESH_H_
#define DTSMAXAPPMESH_H_
#include "appMesh.h"
#include "appNode.h"
class INode;
namespace DTS
{
class MaxAppMesh : public AppMesh
{
typedef AppMesh Parent;
protected:
// Don't hold onto anything mesh-like in max, keep the node instead
INode * mMaxNode;
// Hold this in addition just for convenience of a few methods that
// use app node methods
AppNode * mAppNode;
void getSkinData();
public:
MaxAppMesh(INode * maxNode, AppNode * appNode);
const char * getName() { return mAppNode->getName(); }
bool getFloat(const char * propName, F32 & defaultVal) { return mAppNode->getFloat(propName,defaultVal); }
bool getInt(const char * propName, S32 & defaultVal) { return mAppNode->getInt(propName,defaultVal); }
bool getBool(const char * propName, bool & defaultVal) { return mAppNode->getBool(propName,defaultVal); }
Matrix<4,4,F32> getMeshTransform(const AppTime & time);
F32 getVisValue(const AppTime & time);
bool getMaterial(S32 matIdx, Material &);
S32 getNumBones();
AppNode * getBone(S32 idx);
F32 getWeight(S32 boneIdx, S32 vertIdx);
bool animatesMatFrame(const AppSequenceData & seqData);
bool animatesFrame(const AppSequenceData & seqData);
bool isBillboard();
bool isBillboardZAxis();
bool isSorted();
AppMeshLock lockMesh(const AppTime & time, const Matrix<4,4,F32> & objectOffset);
void unlockMesh();
};
};
#endif // DTSMAXAPPMESH_H_

View File

@ -0,0 +1,153 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
#include "maxAppNode.h"
#include "maxAppMesh.h"
#include "DTSUtil.h"
#pragma pack(push,8)
#include <max.h>
#pragma pack(pop)
namespace DTS
{
MaxAppNode::MaxAppNode(INode * maxNode)
{
mMaxNode = maxNode;
}
void MaxAppNode::buildMeshList()
{
::ObjectState os = mMaxNode->EvalWorldState(0);
if (os.obj->CanConvertToType(triObjectClassID))
mMeshes.push_back(new MaxAppMesh(mMaxNode,this));
}
void MaxAppNode::buildChildList()
{
for (S32 i=0; i<mMaxNode->NumberOfChildren(); i++)
{
INode * child = mMaxNode->GetChildNode(i);
mChildNodes.push_back(new MaxAppNode(child));
}
}
bool MaxAppNode::isEqual(AppNode * node)
{
MaxAppNode * maxAppNode = dynamic_cast<MaxAppNode*>(node);
return maxAppNode && (maxAppNode->mMaxNode == mMaxNode);
}
Matrix<4,4,F32> MaxAppNode::getNodeTransform(const AppTime & time)
{
// Get the node marix then copy from max format into our matrix struct
// Note that this results in a transpose of the matrix...
Matrix3 nodeMat = mMaxNode->GetNodeTM( SecToTicks(time.getF32()) );
return convertFromMaxMatrix(nodeMat);
}
bool MaxAppNode::animatesTransform(const AppSequenceData & seqData)
{
Interval range(SecToTicks(seqData.startTime.getF32()),SecToTicks(seqData.endTime.getF32()));
Interval test = range;
// does this sequence animate the bounds node, if so, add ground transform
S32 midpoint = (range.Start() + range.End()) / 2;
mMaxNode->GetNodeTM(midpoint,&test);
return ( test.Start()!=range.Start() || test.End()!=range.End() );
}
const char * MaxAppNode::getName()
{
if (!mName)
mName = strnew(mMaxNode->GetName());
return mName;
}
const char * MaxAppNode::getParentName()
{
if (!mParentName)
mParentName = mMaxNode->GetParentNode() ? strnew(mMaxNode->GetParentNode()->GetName()) : strnew("ROOT");
return mParentName;
}
bool MaxAppNode::isBillboard()
{
bool temp;
return getBool( "enableBillboard", temp) || AppNode::isBillboard();
}
bool MaxAppNode::isBillboardZAxis()
{
bool temp;
S32 value;
if( getBool( "enableBillboard", temp) )
{
if( getInt("bb_Type", value) && value == 2 )
return true;
}
return AppNode::isBillboardZAxis();
}
bool MaxAppNode::isParentRoot()
{
return (mMaxNode->GetParentNode()==NULL) || mMaxNode->GetParentNode()->IsRootNode();
}
bool MaxAppNode::getFloat(const char * propName, F32 & defaultVal)
{
// don't trust max not to touch value...
F32 val;
if (mMaxNode->GetUserPropFloat(propName,val))
{
defaultVal = val;
return true;
}
return false;
}
bool MaxAppNode::getInt(const char * propName, S32 & defaultVal)
{
// don't trust max not to touch value...
S32 val;
if (mMaxNode->GetUserPropInt(propName,val))
{
defaultVal = val;
return true;
}
return false;
}
bool MaxAppNode::getBool(const char * propName, bool & defaultVal)
{
// don't trust max not to touch value...
BOOL val;
if (mMaxNode->GetUserPropBool(propName,val))
{
defaultVal = val ? true : false;
return true;
}
return false;
}
Matrix<4,4,F32> convertFromMaxMatrix(Matrix3 & mat)
{
Matrix<4,4,F32> ret;
for (S32 i=0; i<4; i++)
{
Point3 row = mat.GetRow(i);
Vector<F32,4> col;
col.set(0,row.x);
col.set(1,row.y);
col.set(2,row.z);
col.set(3,i==3 ? 1 : 0);
ret.setCol(i,col);
}
return ret;
}
};

View File

@ -0,0 +1,51 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
#ifndef DTSMAXAPPNODE_H_
#define DTSMAXAPPNODE_H_
#include "appNode.h"
class INode;
class Matrix3;
namespace DTS
{
class MaxAppNode : public AppNode
{
typedef AppNode Parent;
INode * mMaxNode;
void buildMeshList();
void buildChildList();
public:
MaxAppNode(INode * maxNode);
bool isEqual(AppNode *);
Matrix<4,4,F32> getNodeTransform(const AppTime & time);
bool animatesTransform(const AppSequenceData & seqData);
const char * getName();
const char * getParentName();
bool isParentRoot();
bool isBillboard();
bool isBillboardZAxis();
bool getFloat(const char * propName, F32 & defaultVal);
bool getInt(const char * propName, S32 & defaultVal);
bool getBool(const char * propName, bool & defaultVal);
};
extern Matrix<4,4,F32> convertFromMaxMatrix(Matrix3 & mat);
};
#endif // DTSMAXAPPNODE_H_

View File

@ -0,0 +1,58 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
#ifdef _MSC_VER
#pragma warning(disable : 4786)
#endif
#include "maxSceneEnum.h"
#include "maxAppNode.h"
#pragma pack(push,8)
#include <max.h>
#include <ISTDPLUG.H>
#pragma pack(pop)
namespace DTS
{
class PrivateMaxEnum : public ITreeEnumProc
{
MaxSceneEnum * mMaxSceneEnum;
public:
PrivateMaxEnum(MaxSceneEnum * sceneEnum) { mMaxSceneEnum = sceneEnum; }
S32 callback( INode * node ) { return mMaxSceneEnum->callback(node); }
void enumScene(IScene * scene ) { scene->EnumTree(this); }
};
MaxSceneEnum::MaxSceneEnum(IScene * theScene)
{
mTheScene = theScene;
}
MaxSceneEnum::~MaxSceneEnum()
{
}
S32 MaxSceneEnum::callback(INode * node)
{
MaxAppNode * maxAppNode = new MaxAppNode(node);
if (!processNode(maxAppNode))
delete maxAppNode;
return TREE_CONTINUE;
}
void MaxSceneEnum::enumScene()
{
PrivateMaxEnum pme(this);
pme.enumScene(mTheScene);
}
}; // namespace DTS

View File

@ -0,0 +1,32 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
#ifndef DTSMAXSCENEENUM_H_
#define DTSMAXSCENEENUM_H_
#include "appSceneEnum.h"
class INode;
class IScene;
namespace DTS
{
class MaxSceneEnum : public AppSceneEnum
{
protected:
IScene * mTheScene;
public:
MaxSceneEnum(IScene*);
~MaxSceneEnum();
S32 callback(INode * node);
void enumScene();
};
}; // namespace DTS
#endif // #define DTSMAXSCENEENUM_H_

Binary file not shown.

After

Width:  |  Height:  |  Size: 824 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 824 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 824 B

View File

@ -0,0 +1,13 @@
---------------------------------------------------------------------
-- Torque DTS exporter utility for 3ds Max 7.0
---------------------------------------------------------------------
macroScript torqueDTS
category:"Torque"
toolTip:"Torque DTS Utility: Automates DTS Setup for the Torque Game Engine."
Icon:#("TorqueDTS",1)
(
include "dts_utility.ms"
) --end of Macroscript

View File

@ -0,0 +1,19 @@
3D Studio Max DTS Exporter 1.3 License
==================
Except where otherwise noted, all of the documentation and software included
in the 3D Studio Max DTS exporter is copyrighted by Dark Industries.
Copyright (C) 2004-2006 Dark Industries. All rights reserved.
This software is provided "as-is," without any express or implied warranty.
In no event shall the author be held liable for any damages arising from the
use of this software.
Permission is granted to liscensed users to use this software for any purpose,
including commercial applications, and to alter it for their own use.
Dark Industries
info@darkindustries.com
http://www.darkindustries.com/

View File

@ -0,0 +1,41 @@
----------------------------------------------------
Installing the Exporter and Utility:
----------------------------------------------------
Close Max and then Run the self installing exe.
----------------------------------------------------
Loading the plugin into 3d Studio Max 7:
----------------------------------------------------
With Max open click on the menu "Customize" and
select "Customize User Interface". Then click on the
Toolbars Tab and change the category to "Torque".
You can now drag the Torque DTS Utility icon from
the window onto any open toolbar in your work area.
----------------------------------------------------
New Features This Build
----------------------------------------------------
* UI can be loaded as an Extended Viewport
* Collision manager
* New graphics added to the UI
* User can resize UI
* Minimize button - shrinks the UI to toolbar size
* UI remembers its size and screen position
* show dmp file on export
* exporter preferences
* Auto create .Cfg on export
* User can turn rollouts on and off
* Ability to Parent bounds and set link inheritance
* TwoSided material support
* Mesh sort settings
* Set and remove detail parent
* UI Billobard settings are now read by the exporter
* Material manager sets "show in viewport" by default

View File

@ -0,0 +1,272 @@
{\rtf1\ansi\ansicpg1252\deff0
{\fonttbl
{\f0\fswiss\fcharset0\fprq2\fttruetype Arial;}
{\f1\froman\fcharset0\fprq2\fttruetype Times New Roman;}
{\f2\fnil\fcharset0\fprq2\fttruetype Dingbats;}
{\f3\fmodern\fcharset0\fprq1\fttruetype Courier New;}
{\f4\froman\fcharset0\fprq2\fttruetype Symbol;}}
{\colortbl
\red0\green0\blue0;
\red255\green255\blue255;}
{\stylesheet
{\s1\tx1584\sbasedon57\snext33Chapter Heading;}
{\s2\fi-424\li720Box List;}
{\*\cs15Hyperlink;}
{\s5\sbasedon33\snext33Address;}
{\s6\fi-424\li720\sbasedon25Lower Case List;}
{\s7\qc\f0\fs16\snext33z-Top of Form;}
{\*\cs4Strong;}
{\s9\fi-424\li720Triangle List;}
{\s20\sb440\sa60\f0\fs34\b\sbasedon33\snext33Heading 1;}
{\s11\sb440\sa60\f0\fs28\b\sbasedon33\snext33Heading 2;}
{\s23\sb440\sa60\f0\fs24\b\sbasedon33\snext33Heading 3;}
{\s13\sb440\sa60\f0\fs24\b\sbasedon33\snext33Heading 4;}
{\s14\fi-424\li720Heart List;}
{\s16\li1440\ri1440\sa117\sbasedon33Block Text;}
{\s17\fi-424\li720Square List;}
{\s8\li360\ri360\sb99\sa99\sbasedon33Blockquote;}
{\s19\qc\sb240\sa117\f0\fs32\b\sbasedon33\snext33Contents Header;}
{\s10\fi-424\li720\sbasedon25Upper Case List;}
{\*\cs21\fs20\sbasedon33Footnote Text;}
{\*\cs22Variable;}
{\s12\fi-424\li720Bullet List;}
{\*\cs24Comment;}
{\s25\fi-424\li720Numbered List;}
{\s26\fi-424\li720Diamond List;}
{\s27\fi-424\li720Hand List;}
{\*\cs60\fs20Reference;}
{\*\cs28Emphasis;}
{\*\cs29\f3Sample;}
{\s31\qc\f0\fs16\snext33z-Bottom of Form;}
{\s32\fi-424\li720\sbasedon25Upper Roman List;}
{\s33\f1\fs24\lang1033Normal;}
{\s49\fi-424\li720Implies List;}
{\*\cs36\f3\fs20CODE;}
{\s37\sb99\sa99\fs48\sbasedon33\snext33H1;}
{\s38\sb99\sa99\fs36\sbasedon33\snext33H2;}
{\s39\sb99\sa99\fs28\sbasedon33\snext33H3;}
{\s40\sb99\sa99\fs24\sbasedon33\snext33H4;}
{\s41\sb99\sa99\fs20\sbasedon33\snext33H5;}
{\s18\sb99\sa99\fs16\sbasedon33\snext33H6;}
{\s59\tx431\sbasedon23\snext33Numbered Heading 3;}
{\s43\fi-424\li720Star List;}
{\s44\tx1584\sbasedon57\snext33Section Heading;}
{\*\cs45\f3\fs20Keyboard;}
{\*\cs46FollowedHyperlink;}
{\s47\sbasedon33\snext30Definition Term;}
{\s48\tx0\tx958\tx1917\tx2877\tx3836\tx4794\tx5753\tx6713\tx7672\tx8631\tx9589\f3\fs20\sbasedon33Preformatted;}
{\*\cs34Definition;}
{\*\cs35CITE;}
{\s57\tx431\sbasedon20\snext33Numbered Heading 1;}
{\s61\fi-424\li720\sbasedon33\snext33Contents 1;}
{\*\cs3\f3\fs20Typewriter;}
{\s53\fi-424\li720\sbasedon33Lower Roman List;}
{\*\cs54\fs20\superFootnote Reference;}
{\*\cs55\sbasedon33Endnote Text;}
{\*\cs56\fs20\superEndnote Reference;}
{\*\cs51HTML Markup;}
{\s58\tx431\sbasedon11\snext33Numbered Heading 2;}
{\s52\fi-424\li720Dashed List;}
{\s64\fi-424\li2880\sbasedon33\snext33Contents 4;}
{\s42\f3\sbasedon33Plain Text;}
{\s50\fi-424\li720Tick List;}
{\s62\fi-424\li1440\sbasedon33\snext33Contents 2;}
{\s63\fi-424\li2160\sbasedon33\snext33Contents 3;}
{\s30\li360\sbasedon33\snext47Definition List;}}
\kerning0\cf0\ftnbj\fet2\ftnstart1\ftnnar\aftnnar\ftnstart1\aftnstart1\aenddoc\revprop3{\info\uc1}\deftab720\viewkind1\paperw12240\paperh15840\margl1440\margr1440\widowctrl
\sectd\sbknone\colsx360\pgncont\ltrsect
\pard\plain\ltrpar\ql\sb440\sa60\s20\sl240\slmult1\itap0\tx1584{\s20\f0\fs34\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Getting Started}{\s20\f0\fs34\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Introduction}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch This document assumes a basic level of familiarity with 3d Studio Max and is simply a general reference for creating and exporting shapes using the 3d Studio Max DTS exporter. It is not a quick start guide for how to use 3d Studio Max nor is it a detailed tutorial on how to build and animate shapes in 3d Studio Max for the Torque Game Engine.\line \line There are two file types that you can export: shapes (DTS) and sequences (DSQ). A DTS file contains meshes, detail levels, the bounding box, all necessary nodes for a particular shape and optionally animation data can also be included in the DTS file.\line \line DSQ files only contain animation data and require a matching DTS file that contains all of the necessary nodes for the shape. There can be multiple DSQ files for any one DTS file. Also, DSQ files can be used on multiple DTS files provided that the animation nodes in the DTS files match exactly.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Whats New & Bug Fixes}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Full scripted user interface}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Export progress meter}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Html based dump file (dump.html)}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Smoothing groups are supported for skinned meshes}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Dts unmess utility is no longer needed}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch CFG file export}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s20\sl240\slmult1\itap0{\s20\f0\fs34\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Installation}{\s20\f0\fs34\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s20\sl240\slmult1\itap0{\s20\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch To install the exporter download the installer for the exporter and double click on the executable to begin the installation process.\line \line Follow the instructions on the installer screens, being careful to make sure you point the installer to the location that your version of 3d Studio Max is installed. The 3ds Max DTS exporter is supported in 3DS Max versions 6, 7, and 8.\line \line After the installer finishes exit the installer, start up your copy of 3d Studio Max and load in the exporter UI.}{\s20\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s20\sl240\slmult1\itap0{\s20\f0\fs34\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Loading the Exporter UI in Max}{\s20\f0\fs34\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb99\sa99\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch After installing the exporter you can load the exporter UI by going to the Customize menu and selecting the option "Customize User Interface".\line \line With the Customize User Interface window open click on the "Toolbars" tab and change the Category to Torque. This will show all of the tools in the "Torque" category.\line \line When the "Torque DTS Utility" appears in the tools list, click on it and drag it onto any toolbar in the UI. Once the icon is added to your toolbar click on it to open the DTS Utility.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s20\sl240\slmult1\itap0{\s20\f0\fs34\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Using the DTS Utility}{\s20\f0\fs34\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s20\sl240\slmult1\itap0{\s20\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch The utility for the exporter is relatively straight forward to use and offers a quick & easy way to help automate all of the setup in 3D Studio Max that is required for a DTS file to export properly.\line \line The exporter utility is a standard floating dialog window, with both an upper and lower tool bar and several SubRollouts that contain logical divisions of the properties and settings that are read by the exporter when exporting to the DTS format.\line \line Each of the SubRollouts in the utility can be opened and closed individually by clicking on the title of the SubRollout. This will allow you to free up space in the UI when SubRollouts are not in use.}{\s20\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb99\sa99\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Right clicking in any of the open SubRollouts will open a menu of options that will allow you to quickly open and close one or more of the available SubRollouts.\line \line Opening a SubRollout will cause the selected SubRollout to expand to fill the viewable area in the dialog. This behavior is helpful in reducing the amount of vertical scrolling required to access the properties on the various SubRollouts.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb99\sa99\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb99\sa99\s33\sl240\slmult1\itap0{\s33\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Resizing the Exporter UI}{\s33\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb99\sa99\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch The exporter UI is also user re-sizable and remembers both its size and on screen position from the last time the UI window was open.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Docking Exporter UI in a Viewport}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Finding Setup Errors}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb99\sa99\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch The exporter generates a log file named dump.html in the directory you export your object to. If your export fails, check the dump file first to see where it is crashing in the export process. Most of the time it is something simple, like spelling the word \uc1\u8220\'93bounds\uc1\u8221\'94 wrong.\line \line If a particular model is continually crashing on export, corrupted meshes, bad texture vertices, or double faces in the model might be the cause. Check your dump file, and if it stops on a particular mesh, do a test by deleting it in your scene, then try to export again.\line \line After a model is successfully exported, check your shape in the Torque Show Tool first before bringing them into your game. If it works in the Show Tool but not in the game, the file exported properly and the problem exists elsewhere.\line \line The requirements of a game may be different than the requirements to get a shape exported. What is required for it to work 'in the game' is not the same as what is required for a shape to export. If your game requires certain nodes be present, a certain naming convention, or certain parameters set a certain way, then get that information and set up the shape accordingly. If your shape works in the Show Tool but not in the game then it is most likely not the exporter that is at fault.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s20\sl240\slmult1\itap0{\s20\f0\fs34\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Quick Start}{\s20\f0\fs34\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Units & Grid Setup}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Simple Shape Setup }{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Adding Collision }{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s20\sl240\slmult1\itap0{\s20\f0\fs34\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Character Setup }{\s20\f0\fs34\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s20\sl240\slmult1\itap0{\s20\f0\fs34\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Export Settings }{\s20\f0\fs34\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Allows you to set several of the default settings of the exporter user interface such as the default bounds padding, the default size of nodes & markers, if created nodes and markers should be frozen after being created, if the exporter should show the .dmp file after export and if the exporter should always create a .cfg file on export.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s20\sl240\slmult1\itap0{\s20\f0\fs34\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Quick Export/Setup}{\s20\f0\fs34\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f0\fs34\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch The Quick setup tools take the current selection and performs all of the setup needed in order to export a DTS shape. This includes creating the DTS shape, parenting the selected mesh(es) to the shape branch of the DTS shape, adding a detail size of 2 to the selected mesh(es), adding detail markers and creating a bounds object using the volume of the selected object(s).\line \line Quick Export performs the same setup that quick setup does and then immediately prompts you with a save dialog box so that you can quickly export your shape and see how it looks in game\line \line Other options on the Quick Export/Setup dialog allow you to change the behavior of the quick export functions.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch As Skinned Mesh}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Checking this box tells the utility to setup the DTS shape as a shape with skeletal animation. This will leave the skinned mesh at the scene root and add the root IK chain to the DTS shape branch.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Use Existing Bounds}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Checking this box will tell the utility not to automatically create a bounds object and to instead use one that already exists in the scene.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Center Shape at Origin}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Checking this box tells the utility to move the selected object to the center of the scene during setup.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Remove Object Scale (xform)}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Checking this box tells the utility to Reset Transform remove all Rotation and Scale values from selected objects and places those transforms in an XForm modifier.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Create .CFG On Quick Export}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Checking this box will cause the utility to export a .CFG file prior to exporting the DTS file. This .CFG file will be read by the exporter during export and is used to control node export and other exporter options.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Use Node Preset}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Checking this box will activate the node preset list box and populate the list box with any of the default or custom node presets that you have created using the Node Manager. After selecting a preset from the list the utility will automatically add the named nodes stored in the preset to the scene. Keep in mind that in order for named nodes to export you must use a proper .CFG file, clicking the "Create .CFG On Quick Export" check box will tell the utility to create a .CFG file automatically.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s20\sl240\slmult1\itap0{\s20\f0\fs34\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Bounds Manager}{\s20\f0\fs34\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f0\fs34\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch The Bounds manager is a utility to help automate the creation of a bounds object for the DTS shape export. There can only be one bounds in the scene.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Freeze Bounds}{\s33\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Prevents the user from being able to interact with the bounds object, but leaves the bounds object visible in the scene. Useful to prevent the bounds object from being moved unintentionally, but still lets you see the bounds in the scene.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Hide Bounds}{\s33\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Hides the bounds object from display in the scene. Useful to prevent the bounds object from being moved unintentionally and also to free up visual space in the scene.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Create Bounds}{\s33\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Creates a new bounds object in the scene using the volume of the current selection. You can also optionally apply padding to each axes of the bounds (X, Y, Z) and choose the location of the bounds pivot point.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch X Padding}{\s33\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Adds padding to the bounds in the X axes of volume of the current selection}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Y Padding}{\s33\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Adds padding to the bounds in the Y axes of volume of the current selection}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Z Padding}{\s33\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Adds padding to the bounds in the Z axes of volume of the current selection. When the alignment of "Center" is chosen only half of the selected bounds padding is applied to the upper Z axes. }{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Bounds Alignment}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Allows you to change where the bounds center (pivot) is located. "Bottom" places the pivot of the bounds at the bottom center of the bounds object and places the bounds at the center of the selection at 0 in the Z axes. "Center" places the pivot of the bounds at the center of the bounds object and places the bounds object at the center of the selection.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Link Bounds}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Clicking the Link bounds button will open a window containing a list of all of the objects in the scene. After choosing an object from this list the bounds object will be parented to the selected object.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Remove Link}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Clicking the remove link button will re-parent the bounds object to the scene root}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch X Link Inheritance}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Sets the bounds object to inherit any movement from its parent object in the X axes.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Y Link Inheritance}{\s33\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Sets the bounds object to inherit any movement from its parent object in the Y axes. }{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Z Link Inheritance}{\s33\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Sets the bounds object to inherit any movement from its parent object in the Z axes. }{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s20\sl240\slmult1\itap0{\s20\f0\fs34\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Detail Manager}{\s20\f0\fs34\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f0\fs34\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch The Detail Manager exists to help automate the management of the detail markers and detail meshes needed in order for a DTS shape to export properly. }{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Detail Levels & Detail Meshes}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Detail levels are read from dummy nodes in the scene that tell the exporter that a detail mesh or meshes exist that should be exported. The "-" button deletes the selected detail level. The "edit" button lets you modify the selected detail level. The "auto" button will scan the scene looking for numbered detail meshes and automatically create the corresponding detail level markers. The "+" button adds a new detail level to the scene.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch To add a new detail level marker, enter a pixel size into the spinner on the right side of the detail manager and click the save button. The detail level list box will update and your new detail level marker will be added to the scene.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Selecting a detail level from the detail level marker list box will update the detail mesh list box and cause it to show all of the detail meshes in the scene that are of the same size of the selected detail level. This is handy since it mimics what the exporter actually sees in the scene and can help you catch improper scene setup even before you attempt to export your shape. Its always a good idea to click on your detail levels and double check the detail meshes that appear for any problems before trying to export your scene.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Show All Detail Meshes}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Checking this box will cause all of the mesh objects in the scene to appear in the detail mesh list box even if they do not have a detail number in their name. This will allow you to use the "Detail Utilities" to add the mesh objects in the scene into the DTS shape.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Detail Utilities}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch These tools are designed to work with the detail meshes in your scene and help automate the setup needed to get your shape to export to DTS.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Delete Shape}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Deletes the DTS shape nodes (Base01 > Start01) from the scene and leaves anything that was parented to them at the scene root.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Create Shape}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Creates the DTS shape nodes (Base01 > Start01) in the scene. Any detail markers that exist in the scene are automatically parented to Base01.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Register Details}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Takes all of the selected detail meshes in the detail mesh list box and parents them to the node Start01. If the DTS shape does not exist it created automatically.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Renumber Details}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Clicking the renumber details button opens a set of tools for the renumbering the detail meshes in your scene. Start by selecting one or more of the meshes in the detail mesh list box and then enter the detail number that you would like to assign to the selected meshes. If you leave the option "create new marker" checked if a detail marker does not exist in the scene the utility will add one for you. If the option "remove old marker" is checked the and there are any detail markers in scene for the previous detail level(s) the utility will remove them from the scene. Click the update button to apply your changes and cancel to return to the other detail utilities.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Remove Detail Markers}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch This tool will remove all of the detail markers from the scene.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Sort Settings}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Allows you to change the transparency sorting options for the selected detail mesh.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Set Parent}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Opens a new window that contains a list of all of the objects in the scene. Choosing an object from the select list and clicking apply sets the parent object of all of the meshes selected in the detail mesh list box to the selected object.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Delete Parent}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Sets the parent of the meshes selected in the Detail Mesh list box to null (scene root)}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Auto Details}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch The exporter can optionally auto generate detail levels for your DTS shape using polygon reduction that is built into the exporter. In order for this to work you must add AutoDetail settings to one or more meshes in the in the detail mesh list box. You can only add AutoDetail settings to one mesh at a time.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch The buttons above the auto details list box allow you to add, edit and delete auto detail settings from the selected detail mesh. Keep in mind that a large number of auto details or reduction on high poly count meshes can slow down the DTS export due to the calculations required.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Reduction}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch This setting controls the amount of polygon reduction to apply to the selected mesh. 1.0 = 0% or no poly reduction at all. 0.8 would be 20% poly reduction etc.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Pixel Size}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch This number represents the on screen size in Pixels that TGE should show each detail mesh of the same size value. When the on screen pixel size is smaller than the lowest numbered detail mesh in your DTS file it will stop drawing to the screen. }{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s20\sl240\slmult1\itap0{\s20\f0\fs34\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Billboard Manager}{\s20\f0\fs34\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f0\fs34\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch The billboard manager allows you to add billboard settings to any of the detail meshes in the scene. To enable billboard support for a mesh object, select a detail mesh from the list box and click "Set as billboard" and choose the billboard type: Billboard - always face toward the camera on all axes. Billboardz - always face the camera in the Z axes only.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Auto Billboards}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Auto billboard settings are stored on detail markers. To enable this feature select a detail marker from the list box and then click "Set as auto billboard". When your exported DTS file is loaded into the game engine or show tool, TGE will auto generate billboard based detail levels using the setting that you specified on your detail markers.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s20\sl240\slmult1\itap0{\s20\f0\fs34\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Node Manager}{\s20\f0\fs34\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f0\fs34\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch The node manager allows you quickly to add named nodes to your scene, create and edit node presets, and export .cfg files that are used to control node export. To add a new node to the scene enter a name into the input box check the appropriate node export settings and then click the save button. You new node will be added to the scene and the nodes list box will update to show the newly created node. You can now adjust the nodes location in the scene to work best for your DTS shape. Clicking on any node in the nodes list will allow you to edit its export settings.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Node Utilities}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Node utilities are tools to help automate working with node nodes in your scene.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Create .CFG}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch This tool reads the export settings stored each node in the scene as well as the .cfg settings for the current scene and exports a .cfg file to a directory of your choice.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Set Always Export}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Sets the always export flag for all of the nodes selected in the nodes list.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Set Never Export}{\s33\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Sets the never export flag for all of the nodes selected in the nodes list.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Set Never Animate}{\s33\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Sets the never animate flag for all of the nodes selected in the nodes list.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Remove .CFG Settings}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Removes the current .CFG settings from the scene}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch .CFG Settings}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Allows you set the default .CFG files settings for the scene}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Node Presets}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Node presets are way for you to quickly add sets of named nodes to your scene. This allows you to add all of the nodes needed for a shape to load properly in game to the scene at one time and then adjust their position in the scene to match your shape setup. Clicking the "-" button deletes the selected preset. Clicking the "edit" button allows you to rename or add additional nodes to the preset. Clicking the "+" button allows you to create a new preset. A preset consists of a name and a comma separated list of node names. Clicking the "Apply" button creates all of the nodes specified in the preset and adds then to the scene.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\sl240\slmult1\itap0{\s23\f0\fs34\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Sequence Manager }{\s23\f0\fs34\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s20\sl240\slmult1\itap0{\s20\f0\fs34\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Trigger Manager}{\s20\f0\fs34\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f0\fs34\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch The trigger manager allows you to add, edit and delete trigger states from the sequences sequences in your scene. To add trigger states to a sequence first select a sequence from the sequence list box. If no sequences are present use the sequence manager to add one or more.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch After selecting a sequence in the key frame spinner type the key frame number in the selected sequence that you like to add a trigger state to and then choose the appropriate trigger state from drop down list and click save. Positive trigger states (1) indicate that a trigger is active and negative trigger states (-1) indicate that a trigger is turned off. It is not always necessary to turn off triggers as they can be turned off in script. Keep in mind that key frames on trigger states should fall within the key frame range of the selected sequence. }{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s20\sl240\slmult1\itap0{\s20\f0\fs34\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Visibility Manager}{\s20\f0\fs34\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f0\fs34\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\sl240\slmult1\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch The visibility manager allows you to set visibility animation states from the the detail meshes in your scene. When you add a visibility state to a detail mesh the exporter utility will automatically add a visibility animation track to the selected object and add the key frame and visibility state to the visibility track for the selected object. You can then play the animation in max and see the visibility animation that you created. Keep in mind that key frames on visibility states should fall within the key frame range of one or more sequences in the scene or you will not be able to see it in your exported DTS file.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s20\sl240\slmult1\itap0{\s20\f0\fs34\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Collision Manager}{\s20\f0\fs34\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch The collision manager allows you to easily manage creating and setting up collision objects in your DTS scene. On the right side of the manager is the detail mesh list box, this list box contains a list of all of the mesh objects in the scene. Selecting one or more mesh objects from the list box and clicking one of the numbered collision buttons will add a collision object to the scene as well as automatically adding a matching collision maker in the DTS shape.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch You can change the behavior of the generated collision object by choosing one of the options underneath the detail list box. There are 3 options to choose from.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Use Volume}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch This is the default setting of the of collision manager. This option will use the mesh objects selected from the detail mesh list box and create a new mesh box based on volume of the selected objects. The created collision object will be named Col-x where x is equal to the collision number of the button that was pressed }{\s33\f1\fs24\lang1033{\*\listtag0}and collision mesh is linked into the DTS shape}{\s33\f1\fs24\lang1033{\*\listtag0}. A collision marker is also created and linked into the DTS hierarchy for the selected collision object.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Use Actual Mesh}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch This option will rename the selected detail mesh to match the number of the collision button that was pressed and link the collision mesh into the DTS shape. }{\s33\f1\fs24\lang1033{\*\listtag0}A collision marker is also created and linked into the DTS hierarchy for the selected collision object.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Use Copy of Mes}{\s23\f0\fs24\b\lang1033{\*\listtag0}h}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch This option will make a copy of the selected mesh, rename it to match the number of the collision button that was pressed and link the collision mesh into the DTS shape. A collision marker is also created and linked into the DTS hierarchy for the selected collision object.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Copy Buttons}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch The copy buttons between the collision and losCollision buttons take the mesh object that exists for the adjacent collision number and copy the collision object and the same mesh shape as a losCollision mesh.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch LOS Collision}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch The losCollision buttons preform the same function as the collision buttons and work with the 3 options listed below the detail mesh list box. The major difference is that instead los collision meshes }{\s33\f1\fs24\lang1033{\*\listtag0}(los) }{\s33\f1\fs24\lang1033{\*\listtag0}are created vs collision meshes.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s20\sl240\slmult1\itap0{\s20\f0\fs34\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Material Manager}{\s20\f0\fs34\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch The material manager is designed to help automate the setup of materials and material properties that are read by the DTS exporter from your scene. The numbered material slots on the left side of the material manager represent the 24 materials found in the 3ds Max material editor. Selecting a material from the materials list will display the current material properties for the selected material on the right side of the material manager. Any changes made to the selected material are }{\s33\f1\fs24\lang1033{\*\listtag0} applied }{\s33\f1\fs24\lang1033{\*\listtag0}immediately.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Material Editor}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Selecting this option shows that materials that are currently in the material editor.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Scene Materials}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Selecting this option shows only the materials that are currently in the scene.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Show Material in Viewport}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Used to control if the selected material should be displayed in the 3ds Max Viewport.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Choose texture}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Allows you to choose a .jpg, .png, .tga or .ifl texture for your material}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch UWrap}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Turns tiling on or off in the U axis}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\itap0{\s23\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch VWrap}{\s23\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Turns tiling on or off in the }{\s33\f1\fs24\lang1033{\*\listtag0}V}{\s33\f1\fs24\lang1033{\*\listtag0} axis}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\itap0{\s23\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Two Sided}{\s23\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Tells that exporter that the material should be exported as a two sided material. As a result of this setting the exporter will add faces to mesh objects in the scene as needed. }{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Self Illuminate}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Tells that exporter that the material should be exported with self illumination this causes the material to not be affected by shadows in game. The material will always appear to be full bright.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Transparency}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Allows you to select an image to use as a transparency mask for the selected material. The transparency mask can be the same image as the base texture or a separate image as desired. The image must contain and alpha channel for transparency to work properly.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch There are 3 transparency types to choose from: Normal, Additive and Subtractive.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Reflection}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\s33\itap0{\s33\f1\fs24\lang1033{\*\listtag0}\abinodiroverride\ltrch Reflection can be enabled by clicking the enable reflection check box and setting the amount of reflection desired in the spinner.}{\s33\f1\fs24\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s20\sl240\slmult1\itap0{\s20\f0\fs34\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Advanced Information}{\s20\f0\fs34\b\lang1033{\*\listtag0}\par}
\pard\plain\ltrpar\ql\sb440\sa60\s23\itap0{\s23\f0\fs24\b\lang1033{\*\listtag0}\abinodiroverride\ltrch Working with Scenes Created for the Old Exporter}{\s23\f0\fs24\b\lang1033{\*\listtag0}\par}}

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -0,0 +1,11 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> Max 7.0 Exporter Docs </TITLE>
</HEAD>
<BODY>
<br><br><br><br>
<div align="center"><img src="images/di_logo.jpg"></div>
</BODY>
</HTML>

View File

@ -0,0 +1,5 @@
[NodeSets]
SetNames=player,vechicle,weapon
player=eye,cam,light0,light1,ski0,ski1,mount0
vechicle=eye,cam,light0,light1,mount0,hub0,hub1,hub2,hub3
weapon=mountpoint,ejectpoint,muzzelpoint

View File

@ -0,0 +1,32 @@
[Settings]
BoundsPadX=1.0
BoundsPadY=1.0
BoundsPadZ=1.0
NodeX=0.25
NodeY=0.25
NodeZ=0.25
ShapeX=0.25
ShapeY=0.25
ShapeZ=0.25
AutoCFG=false
FreezeShape=true
FreezeMarkers=true
ShowDMP=false
HelpPath=C:\3dsmax7\scripts\dts\index.html
[Interface]
UiMin=false
UiHeight=673
UiX=398
UiY=0
UiMode=advanced
QuickExport=true
Bounds=true
Detail=true
Billboard=true
Node=true
Sequence=true
Trigger=true
Visibility=true
Collision=true
Material=true

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,25 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by max2dtsExporterPlus.rc
//
#define IDS_LIBDESCRIPTION 1
#define IDS_CATEGORY 2
#define IDS_CLASS_NAME 3
#define IDS_PARAMS 4
#define IDS_SPIN 5
#define IDS_SKINHELP_PARAMS 6
#define IDD_PROGRESS 103
#define IDC_MAJOR_BAR 1004
#define IDC_MINOR_BAR 1005
#define IDC_MESSAGE 1006
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 105
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1007
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

View File

@ -0,0 +1,248 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
#include "skinHelper.h"
#include "appConfig.h"
#pragma pack(push,8)
#include <Max.h>
#include <decomp.h>
#include <dummy.h>
#include <ISkin.h>
#include <modstack.h>
#pragma pack(pop)
class SkinHelperClassDesc:public ClassDesc {
public:
int IsPublic() {return 1;}
void * Create(BOOL loading = FALSE) {return new SkinHelper();}
const TCHAR * ClassName() {return "Skin Helper";}
SClass_ID SuperClassID() {return OSM_CLASS_ID;}
Class_ID ClassID() {return SKINHELPER_CLASS_ID;}
const TCHAR* Category() {return "General";}
void ResetClassParams(BOOL) {}
};
static SkinHelperClassDesc SkinHelperDesc;
ClassDesc* GetSkinHelperDesc() {return &SkinHelperDesc;}
IObjParam * SkinHelper::ip = NULL;
INode * SkinHelper::smTheOnlyOne = NULL;
//--- SkinHelper -------------------------------------------------------
SkinHelper::SkinHelper()
{
}
SkinHelper::~SkinHelper()
{
}
S32 gShouldOnlyBeOne=0;
void SkinHelper::SetReference(S32 i, RefTargetHandle rtarg)
{
gShouldOnlyBeOne++;
if (gShouldOnlyBeOne != 1)
DTS::AppConfig::SetExportError("max4", "Assertion failed on skin object -- added two skin helper objects");
}
Interval SkinHelper::LocalValidity(TimeValue t)
{
// if being edited, return NEVER forces a cache to be built
// after previous modifier.
if (TestAFlag(A_MOD_BEING_EDITED))
return NEVER;
//TODO: Return the validity interval of the modifier
return NEVER;
}
RefTargetHandle SkinHelper::Clone(RemapDir& remap)
{
SkinHelper* newmod = new SkinHelper();
//TODO: Add the cloning code here
return(newmod);
}
// This sits in maxAppMesh.cpp
extern void findSkinData(INode * pNode, ISkin **skin, ISkinContextData ** skinData);
void SkinHelper::ModifyObject(TimeValue t, ModContext &mc, ObjectState * os, INode *pNode)
{
pNode = smTheOnlyOne;
if (!pNode)
return;
ISkin * skin;
ISkinContextData * skinData;
if (!pNode)
return;
findSkinData(pNode,&skin,&skinData);
if (!skin || !skinData)
return;
TriObject * triObj = (TriObject*)os->obj->ConvertToType(0,Class_ID(TRIOBJ_CLASS_ID,0));
if (triObj!=os->obj)
delete triObj;
else
modifyTriObject(triObj,skin,skinData);
PatchObject * patchObj = (PatchObject*)os->obj->ConvertToType(0,Class_ID(PATCHOBJ_CLASS_ID,0));
if (patchObj!=os->obj)
delete patchObj;
else
modifyPatchObject(patchObj,skin,skinData);
}
void SkinHelper::modifyTriObject(TriObject * triObj, ISkin * skin, ISkinContextData * skinData)
{
S32 numBones = skin->GetNumBones();
Mesh & maxMesh = triObj->mesh;
S32 numVerts = maxMesh.getNumVerts();
S32 numTVerts = maxMesh.getNumMapVerts(1);
if (numVerts!=skinData->GetNumPoints())
return;
S32 numChannels = 2+((numBones+1)>>1);
UVVert tv(0,0,0);
S32 i,j;
for (i=2; i<numChannels; i++)
{
maxMesh.setMapSupport(i,true);
maxMesh.setNumMapVerts(i,numVerts);
for (j=0; j<numVerts; j++)
maxMesh.setMapVert(i,j,tv);
maxMesh.setNumMapFaces(i,maxMesh.getNumFaces());
// copy map faces from the first channel
for (j=0; j<maxMesh.getNumFaces(); j++)
{
Face & face = maxMesh.faces[j];
TVFace & tvFace = maxMesh.mapFaces(i)[j];
tvFace.t[0] = face.v[0];
tvFace.t[1] = face.v[1];
tvFace.t[2] = face.v[2];
}
}
for (S32 v=0; v<numVerts; v++)
{
for (i=0; i<skinData->GetNumAssignedBones(v); i++)
{
S32 bone = skinData->GetAssignedBone(v,i);
F32 w = skinData->GetBoneWeight(v,i);
UVVert tv = maxMesh.mapVerts(2+(bone>>1))[v];
if (bone&1)
tv.y = w;
else
tv.x = w;
maxMesh.setMapVert(2+(bone>>1),v,tv);
}
}
}
void SkinHelper::modifyPatchObject(PatchObject * patchObj, ISkin * skin, ISkinContextData * skinData)
{
S32 numBones = skin->GetNumBones();
S32 numPoints = skinData->GetNumPoints();
S32 i;
PatchMesh & maxMesh = patchObj->patch;
S32 numVerts = maxMesh.getNumVerts();
if (numVerts>numPoints)
// points should be more than verts...first set of points are the verts, the rest are control verts
// we don't do anything with those weights...it limits the surface deformations that can take
// place, but it's all we can do...
return;
if (!numBones)
return;
S32 numChannels = 2+((numBones+1)>>1);
S32 numTVerts = maxMesh.getNumMapVerts(1);
UVVert tv(0,0,0);
maxMesh.setNumMaps(numChannels);
for (i=2; i<numChannels; i++)
{
// prepare each channel...
S32 j;
maxMesh.setNumMapVerts(i,numVerts);
for (j=0; j<numVerts; j++)
maxMesh.getMapVert(i,j) = tv;
// set up tv patch faces
maxMesh.setNumMapPatches(i,maxMesh.getNumPatches());
for (j=0; j<maxMesh.getNumPatches(); j++)
{
Patch & patch = maxMesh.patches[j];
TVPatch & tvPatch = maxMesh.getMapPatch(i,j);
tvPatch.tv[0] = patch.v[0];
tvPatch.tv[1] = patch.v[1];
tvPatch.tv[2] = patch.v[2];
tvPatch.tv[3] = patch.v[3];
}
}
for (S32 v=0; v<numVerts; v++)
{
for (i=0; i<skinData->GetNumAssignedBones(v); i++)
{
S32 bone = skinData->GetAssignedBone(v,i);
F32 w = skinData->GetBoneWeight(v,i);
S32 channel = 2 + (bone>>1);
UVVert & tv = maxMesh.getMapVert(channel,v);
if (bone&1)
tv.y = w;
else
tv.x = w;
}
}
}
void SkinHelper::BeginEditParams( IObjParam *ip, ULONG flags,Animatable *prev )
{
this->ip = ip;
}
void SkinHelper::EndEditParams( IObjParam *ip, ULONG flags,Animatable *next)
{
this->ip = NULL;
}
//From ReferenceMaker
RefResult SkinHelper::NotifyRefChanged(
Interval changeInt, RefTargetHandle hTarget,
PartID& partID, RefMessage message)
{
//TODO: Add code to handle the various reference changed messages
return REF_SUCCEED;
}
//From Object
BOOL SkinHelper::HasUVW()
{
//TODO: Return whether the object has UVW coordinates or not
return TRUE;
}
void SkinHelper::SetGenUVW(BOOL sw)
{
if (sw==HasUVW()) return;
//TODO: Set the plugin internal value to sw
}
IOResult SkinHelper::Load(ILoad *iload)
{
//TODO: Add code to allow plugin to load its data
return IO_OK;
}
IOResult SkinHelper::Save(ISave *isave)
{
//TODO: Add code to allow plugin to save its data
return IO_OK;
}

View File

@ -0,0 +1,86 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
#ifndef __SKINHELPER__H
#define __SKINHELPER__H
#pragma pack(push,8)
#include <Max.h>
#include <istdplug.h>
#include <iparamb2.h>
#include <iparamm2.h>
#include <ISkin.h>
#pragma pack(pop)
#include "DTSPlusTypes.h"
// Note: this skinhelper is same as skin helper in original max2dts
// But we give it a different id so that it can co-exist with the old one.
//#define SKINHELPER_CLASS_ID Class_ID(0x20dfdba0, 0x60646cb4)
#define SKINHELPER_CLASS_ID Class_ID(0x449d28a3, 0x4dd3242b)
extern ClassDesc* GetSkinHelperDesc();
extern TCHAR *GetString(S32);
class SkinHelper : public OSModifier
{
public:
static IObjParam *ip; //Access to the interface
// From Animatable
TCHAR *GetObjectName() { return "SkinHelper"; }
//From Modifier
ChannelMask ChannelsUsed() { return TEXMAP_CHANNEL; }
ChannelMask ChannelsChanged() { return TEXMAP_CHANNEL; }
void ModifyObject(TimeValue t, ModContext &mc, ObjectState *os, INode *node);
void modifyTriObject(TriObject *, ISkin *, ISkinContextData *);
void modifyPatchObject(PatchObject *, ISkin *, ISkinContextData *);
Class_ID InputType() {return defObjectClassID;}
Interval LocalValidity(TimeValue t);
// From BaseObject
BOOL ChangeTopology() {return FALSE;}
CreateMouseCallBack* GetCreateMouseCallBack() {return NULL;}
void BeginEditParams(IObjParam *ip, ULONG flags,Animatable *prev);
void EndEditParams(IObjParam *ip, ULONG flags,Animatable *next);
Interval GetValidity(TimeValue t);
// Automatic texture support
BOOL HasUVW();
void SetGenUVW(BOOL sw);
// Loading/Saving
IOResult Load(ILoad *iload);
IOResult Save(ISave *isave);
//From Animatable
Class_ID ClassID() {return SKINHELPER_CLASS_ID;}
SClass_ID SuperClassID() { return OSM_CLASS_ID; }
void GetClassName(TSTR& s) {s = "SkinHelper"; }
RefTargetHandle Clone( RemapDir &remap );
RefResult NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget,
PartID& partID, RefMessage message);
int NumSubs() { return 0; }
TSTR SubAnimName(int i) { return _T(""); }
Animatable* SubAnim(int i) { return NULL; }
int NumRefs() { return 0; }
RefTargetHandle GetReference(int i) { return NULL; }
void SetReference(int i, RefTargetHandle rtarg);
void DeleteThis() { delete this; }
//Constructor/Destructor
SkinHelper();
~SkinHelper();
static INode * smTheOnlyOne;
};
#endif // __SKINHELPER__H