Browse Source

MaxMain and MaxPlasmaLights now build and compile with VS2010 + 3dsm 2011

Adam Johnson 14 years ago
parent
commit
745d8c675f
  1. 2
      Sources/Tools/CMakeLists.txt
  2. 22
      Sources/Tools/MaxMain/CMakeLists.txt
  3. 15
      Sources/Tools/MaxMain/GlobalUtility.cpp
  4. 8
      Sources/Tools/MaxMain/main.cpp
  5. 38
      Sources/Tools/MaxMain/plAgeDescInterface.cpp
  6. 11
      Sources/Tools/MaxMain/plMaxMenu.cpp
  7. 2
      Sources/Tools/MaxMain/plMaxNode.cpp
  8. 2
      Sources/Tools/MaxMain/plMaxNode.h
  9. 18
      Sources/Tools/MaxMain/plMaxNodeBase.cpp
  10. 6
      Sources/Tools/MaxMain/plMaxUtils.cpp
  11. 2
      Sources/Tools/MaxMain/plPluginResManager.cpp
  12. 12
      Sources/Tools/MaxMain/plTextureSearch.cpp
  13. 2
      Sources/Tools/MaxPlasmaLights/CMakeLists.txt
  14. 2
      Sources/Tools/MaxPlasmaLights/DLLEntry.cpp
  15. 2
      Sources/Tools/MaxPlasmaLights/target.h
  16. 2
      Sources/Tools/MaxPlasmaMtls/Layers/plDynamicEnvLayer.h
  17. 2
      Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.h
  18. 35
      Sources/Tools/MaxSceneViewer/CMakeLists.txt
  19. 14
      Sources/Tools/MaxSceneViewer/SceneSync.cpp
  20. 4
      Sources/Tools/MaxSceneViewer/SceneSync.h
  21. 4
      Sources/Tools/MaxSceneViewer/SceneViewer.cpp
  22. 8
      Sources/Tools/MaxSceneViewer/SceneWatcher.cpp
  23. 2
      Sources/Tools/MaxSceneViewer/SceneWatcher.h
  24. 2
      Sources/Tools/MaxSceneViewer/plKeyRefSort.cpp
  25. 2
      Sources/Tools/MaxSceneViewer/plKeyRefSort.h
  26. 2
      Sources/Tools/MaxSceneViewer/plMaxFileData.cpp
  27. 2
      Sources/Tools/MaxSceneViewer/plMaxFileData.h
  28. 2
      Sources/Tools/MaxSceneViewer/plPluginApp.cpp
  29. 2
      Sources/Tools/MaxSceneViewer/plPluginApp.h
  30. 12
      Sources/Tools/MaxSceneViewer/plPluginClient.cpp
  31. 2
      Sources/Tools/MaxSceneViewer/plPluginClient.h
  32. 10
      cmake/FindMaxSDK.cmake

2
Sources/Tools/CMakeLists.txt

@ -16,5 +16,5 @@ if(3dsm_BUILD_PLUGIN)
#add_subdirectory(MaxMtlUpdate)
add_subdirectory(MaxPlasmaLights)
add_subdirectory(MaxPlasmaMtls)
#add_subdirectory(MaxSceneViewer)
#add_subdirectory(MaxSceneViewer) # NOTE: Uses Plasma classes that do not exist
endif()

22
Sources/Tools/MaxMain/CMakeLists.txt

@ -8,6 +8,7 @@ include_directories("../../Plasma/PubUtilLib")
include_directories("../../Plasma/PubUtilLib/inc")
include_directories(${3dsm_INCLUDE_DIR})
include_directories(${OPENSSL_INCLUDE_DIR})
include_directories(${OPENAL_INCLUDE_DIR})
include_directories(${PHYSX_INCLUDE_DIRS})
include_directories(${PYTHON_INCLUDE_DIR})
@ -79,8 +80,8 @@ set(MaxMain_SOURCES
)
add_library(MaxMain SHARED ${MaxMain_HEADERS} ${MaxMain_RESOURCES} ${MaxMain_SOURCES})
set_target_properties(MaxMain PROPERTIES SUFFIX ".dlo")
set_target_properties(MaxMain PROPERTIES OUTPUT_NAME "PlasmaMax")
set_target_properties(MaxMain PROPERTIES SUFFIX ".gup")
target_link_libraries(MaxMain MaxComponent)
target_link_libraries(MaxMain MaxConvert)
@ -91,13 +92,19 @@ target_link_libraries(MaxMain ${3dsm_LIBRARIES})
if(Bink_SDK_AVAILABLE)
target_link_libraries(MaxMain ${Bink_LIBRARIES})
endif()
target_link_libraries(MaxMain debug ${PYTHON_DEBUG_LIBRARY})
target_link_libraries(MaxMain optimized ${PYTHON_LIBRARY})
target_link_libraries(MaxMain ${EXPAT_LIBRARY})
target_link_libraries(MaxMain ${DirectX_LIBRARIES})
target_link_libraries(MaxMain ${JPEG_LIBRARY})
target_link_libraries(MaxMain ${Ogg_LIBRARIES})
target_link_libraries(MaxMain ${OPENAL_LIBRARY})
target_link_libraries(MaxMain ${OPENSSL_LIBRARIES})
target_link_libraries(MaxMain ${PHYSX_LIBRARIES})
target_link_libraries(MaxMain debug ${PYTHON_DEBUG_LIBRARY})
target_link_libraries(MaxMain optimized ${PYTHON_LIBRARY})
target_link_libraries(MaxMain ${Speex_LIBRARY})
target_link_libraries(MaxMain ${Vorbis_LIBRARIES})
# Carbon copy from plClient
# Carbon copy from MaxMain
# TODO: Maybe see if some of these can be removed?
target_link_libraries(MaxMain CoreLib)
target_link_libraries(MaxMain CoreLibExe)
@ -179,6 +186,7 @@ target_link_libraries(MaxMain pnModifier)
target_link_libraries(MaxMain pnNetBase)
target_link_libraries(MaxMain pnNetCli)
target_link_libraries(MaxMain pnNetCommon)
target_link_libraries(MaxMain pnNetProtocol)
target_link_libraries(MaxMain pnNucleusInc)
target_link_libraries(MaxMain pnProduct)
target_link_libraries(MaxMain pnSceneObject)
@ -188,7 +196,11 @@ target_link_libraries(MaxMain pnUtils)
target_link_libraries(MaxMain pnUtilsExe)
if (WIN32)
target_link_libraries(MaxMain Comctl32)
target_link_libraries(MaxMain Rpcrt4)
target_link_libraries(MaxMain Shlwapi)
target_link_libraries(MaxMain Strmiids)
target_link_libraries(MaxMain Vfw32)
target_link_libraries(MaxMain Ws2_32)
endif(WIN32)

15
Sources/Tools/MaxMain/GlobalUtility.cpp

@ -107,7 +107,7 @@ static void NotifyProc(void *param, NotifyInfo *info)
if (info->intcode == NOTIFY_FILE_POST_OPEN)
{
plMaxNode *pNode = (plMaxNode*)GetCOREInterface()->GetRootNode();
DoAllRecur(plMaxNode::ClearData, pNode);
DoAllRecur(&plMaxNode::ClearData, pNode);
}
else if (info->intcode == NOTIFY_SYSTEM_STARTUP)
{
@ -182,7 +182,9 @@ DWORD PlasmaMax::Start()
DummyCodeIncludeFuncGrassShader();
// Register the SceneViewer with Max
#ifdef MAXSCENEVIEWER_ENABLED
SceneSync::Instance();
#endif
plComponentShow::Init();
@ -192,7 +194,9 @@ DWORD PlasmaMax::Start()
RegisterNotification(NotifyProc, 0, NOTIFY_SYSTEM_STARTUP);
#ifdef MAXSCENEVIEWER_ENABLED
InitMaxFileData();
#endif
// Setup the localization mgr
std::string clientPath = plMaxConfig::GetClientPath(false, true);
@ -214,7 +218,9 @@ void PlasmaMax::Stop()
}
#include "plMtlCollector.h"
#ifdef MAXASS_AVAILABLE
#include "../../AssetMan/PublicInterface/AssManBaseTypes.h"
#endif
void TextureSet(Texmap* texmap, int iBmp, UInt64 assetId)
{
@ -222,8 +228,10 @@ void TextureSet(Texmap* texmap, int iBmp, UInt64 assetId)
if (layer)
{
int numBitmaps = layer->GetNumBitmaps();
#ifdef MAXASS_AVAILABLE
if (iBmp < numBitmaps)
layer->SetBitmapAssetId(jvUniqueId(assetId), iBmp);
#endif
}
}
@ -267,11 +275,14 @@ DWORD PlasmaMax::Control(DWORD parameter)
}
}
#ifdef MAXASS_AVAILABLE
jvArray<TexInfo>* textures = TRACKED_NEW jvArray<TexInfo>(texInfo.size());
for (int i = 0; i < texInfo.size(); i++)
(*textures)[i] = texInfo[i];
return DWORD(textures);
#else
return 0;
#endif
}
else if (parameter == kGetTextureSetFunc)
{

8
Sources/Tools/MaxMain/main.cpp

@ -38,7 +38,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
extern ClassDesc* GetGUPDesc();
extern ClassDesc* GetComponentUtilDesc();
extern ClassDesc* GetComponentMgrDesc();
extern ClassDesc *GetMaxFileDataDesc();
extern ClassDesc* GetMaxFileDataDesc();
extern ClassDesc* GetMaxUtilsDesc();
static HSClassDesc2 HSDesc;
@ -92,8 +92,10 @@ __declspec(dllexport) ClassDesc *LibClassDesc(int i)
return GetComponentUtilDesc();
case 4:
return GetComponentMgrDesc();
#ifdef MAXSCENEVIEWER_ENABLED
case 5:
return GetMaxFileDataDesc();
#endif
case 6:
return GetMaxUtilsDesc();
default:
@ -207,7 +209,7 @@ public:
SClass_ID SuperClassID() {return CUST_ATTRIB_CLASS_ID;}
Class_ID ClassID() {return fClassDesc->ClassID();}
ReferenceTarget *Clone(RemapDir &remap = NoRemap());
ReferenceTarget *Clone(RemapDir &remap = DefaultRemapDir());
virtual bool CheckCopyAttribTo(ICustAttribContainer *to) { return true; }
const char* GetName() { return (TCHAR*)fClassDesc->ClassName(); }
@ -267,7 +269,7 @@ void plGeneralAttrib::EndEditParams(IObjParam *ip, ULONG flags, Animatable *next
ReferenceTarget *plGeneralAttrib::Clone(RemapDir &remap)
{
plGeneralAttrib *pnew = (plGeneralAttrib*) fClassDesc->Create(false);
pnew->MakeRefByID(FOREVER,0,remap.CloneRef(fPBlock));
pnew->SetReference(0, remap.CloneRef(fPBlock));
BaseClone(this, pnew, remap);
return pnew;
}

38
Sources/Tools/MaxMain/plAgeDescInterface.cpp

@ -32,7 +32,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plMaxCFGFile.h"
#include "hsStream.h"
#include "hsUtils.h"
#ifdef MAXASS_AVAILABLE
#include "../../AssetMan/PublicInterface/MaxAssInterface.h"
#endif
#include "plMaxAccelerators.h"
#include <string>
@ -53,7 +55,9 @@ protected:
}
public:
#ifdef MAXASS_VAILABLE
jvUniqueId fAssetID;
#endif
string fPath;
string fAgeName;
@ -70,11 +74,14 @@ public:
fPath = path;
IGetAgeName(path);
}
#ifdef MAXASS_AVAILABLE
plAgeFile(Types type, const char *path, jvUniqueId& id) : fType(type), fAssetID(id)
{
fPath = path;
IGetAgeName(path);
}
#endif
};
//// Static Tree Helpers //////////////////////////////////////////////////////
@ -162,8 +169,10 @@ BOOL plAgeDescInterface::DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPar
case WM_INITDIALOG:
fhDlg = hDlg;
#ifdef MAXASS_AVAILABLE
if( fAssetManIface == nil )
fAssetManIface = TRACKED_NEW MaxAssBranchAccess();
#endif
// Make our bold font by getting the normal font and bolding
if( fBoldFont == nil )
@ -185,8 +194,10 @@ BOOL plAgeDescInterface::DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPar
return TRUE;
case WM_DESTROY:
#ifdef MAXASS_AVAILABLE
delete fAssetManIface;
fAssetManIface = nil;
#endif
return TRUE;
// Day length spinner changed
@ -335,7 +346,9 @@ BOOL plAgeDescInterface::DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPar
{
int id = SendDlgItemMessage( hDlg, IDC_BRANCHCOMBO, CB_GETITEMDATA, idx, 0 );
#ifdef MAXASS_AVAILABLE
fAssetManIface->SetCurrBranch( id );
#endif
IFillAgeTree();
}
}
@ -502,6 +515,7 @@ void plAgeDescInterface::ICheckedPageFlag(int ctrlID)
void plAgeDescInterface::ICheckOutCurrentAge( void )
{
#ifdef MAXASS_AVAILABLE
hsAssert( !fCurrAgeCheckedOut, "Trying to re-check out an age!" );
plAgeFile *currAge = IGetCurrentAge();
@ -521,6 +535,7 @@ void plAgeDescInterface::ICheckOutCurrentAge( void )
hsMessageBox( "Unable to check out age file from AssetMan. Most likely somebody already has it checked out.", "Error", hsMessageBoxNormal );
return;
}
#endif
fCurrAgeCheckedOut = true;
// Make sure we loaded the latest version
@ -532,6 +547,7 @@ void plAgeDescInterface::ICheckOutCurrentAge( void )
void plAgeDescInterface::ICheckInCurrentAge( void )
{
#ifdef MAXASS_AVAILABLE
hsAssert( fCurrAgeCheckedOut, "Trying to check in an age when none is checked out!" );
plAgeFile *currAge = IGetCurrentAge();
@ -547,6 +563,7 @@ void plAgeDescInterface::ICheckInCurrentAge( void )
// Check the age file back in to AssetMan
(*fAssetManIface)->CheckInAsset( currAge->fAssetID, fCheckedOutPath, "" );
fCurrAgeCheckedOut = false;
#endif
IInvalidateCheckOutIndicator();
IEnableControls( true );
@ -554,6 +571,7 @@ void plAgeDescInterface::ICheckInCurrentAge( void )
void plAgeDescInterface::IUndoCheckOutCurrentAge( void )
{
#ifdef MAXASS_AVAILABLE
hsAssert( fCurrAgeCheckedOut, "Trying to undo check out an age when none is checked out!" );
plAgeFile *currAge = IGetCurrentAge();
@ -569,6 +587,7 @@ void plAgeDescInterface::IUndoCheckOutCurrentAge( void )
// Reload the non-saved version
ILoadAge( fCheckedOutPath );
#endif
IInvalidateCheckOutIndicator();
IEnableControls( true );
@ -586,6 +605,7 @@ void plAgeDescInterface::IInvalidateCheckOutIndicator( void )
hsBool plAgeDescInterface::IMakeSureCheckedIn( void )
{
#ifdef MAXASS_AVAILABLE
int result;
plAgeFile* currAge = IGetCurrentAge();
if (!currAge)
@ -631,6 +651,8 @@ hsBool plAgeDescInterface::IMakeSureCheckedIn( void )
}
IEnableControls( true );
}
#endif
return true;
}
@ -648,6 +670,7 @@ void plAgeDescInterface::IUpdateCurAge( void )
IEnableControls( true );
#ifdef MAXASS_AVAILABLE
if( currAge->fType == plAgeFile::kAssetFile )
{
// Gotta get the latest version from assetMan before loading
@ -662,6 +685,7 @@ void plAgeDescInterface::IUpdateCurAge( void )
}
}
else
#endif
// Load the local age, also check its sequence #s
ILoadAge( currAge->fPath.c_str(), true );
}
@ -670,6 +694,7 @@ static const int kDefaultCapacity = 10;
void plAgeDescInterface::IInitControls()
{
#ifdef MAXASS_AVAILABLE
// Fill the branch combo box
SendDlgItemMessage( fhDlg, IDC_BRANCHCOMBO, CB_RESETCONTENT, 0, 0 );
const jvTypeArray &branches = (*fAssetManIface)->GetBranches();
@ -691,6 +716,7 @@ void plAgeDescInterface::IInitControls()
SendDlgItemMessage( fhDlg, IDC_AGELIST_STATIC, WM_SETFONT, (WPARAM)fBoldFont, MAKELPARAM( TRUE, 0 ) );
SendDlgItemMessage( fhDlg, IDC_AGEDESC, WM_SETFONT, (WPARAM)fBoldFont, MAKELPARAM( TRUE, 0 ) );
#endif
ISetControlDefaults();
IEnableControls(false);
@ -814,7 +840,9 @@ void plAgeDescInterface::IGetAgeFiles(vector<plAgeFile*>& ageFiles)
}
}
#ifdef MAXASS_AVAILABLE
// Add AssetMan ages, if available (since we're static, go thru the main MaxAss interface)
// Hoikas (many years later) does not believe the above comment...
MaxAssInterface *assetMan = GetMaxAssInterface();
if( assetMan!= nil )
{
@ -845,6 +873,7 @@ void plAgeDescInterface::IGetAgeFiles(vector<plAgeFile*>& ageFiles)
}
assets->DeleteSelf();
}
#endif
}
void plAgeDescInterface::IClearAgeFiles(vector<plAgeFile*>& ageFiles)
@ -876,10 +905,13 @@ void plAgeDescInterface::IFillAgeTree( void )
// Clear the tree first and add our two root headers
TreeView_DeleteAllItems(ageTree);
#ifdef MAXASS_AVAILABLE
if( fAssetManIface != nil )
fAssetManBranch = SAddTreeItem(ageTree, nil, "AssetMan Ages", -1);
else
fAssetManBranch = nil;
#endif
fLocalBranch = SAddTreeItem(ageTree, nil, "Local Ages", -1);
IGetAgeFiles(fAgeFiles);
@ -967,13 +999,17 @@ void plAgeDescInterface::INewAge()
VARIANT assetId;
VariantInit(&assetId);
#ifdef MAXASS_AVAILABLE
bool makeAsset = true;
if( hsMessageBox( "Do you wish to store your new age in AssetMan?", "Make source-controlled?", hsMessageBoxYesNo ) == hsMBoxNo )
makeAsset = false;
#endif
char newAssetFilename[ MAX_PATH ];
#ifdef MAXASS_AVAILABLE
if (!fAssetManIface)
makeAsset = false;
#endif
if( !IGetLocalAgePath( newAssetFilename ) )
return;
@ -993,6 +1029,7 @@ void plAgeDescInterface::INewAge()
strcat(newAssetFilename, name);
strcat(newAssetFilename, ".age");
#ifdef MAXASS_AVAILABLE
if( !makeAsset )
fForceSeqNumLocal = true;
ISetControlDefaults();
@ -1001,6 +1038,7 @@ void plAgeDescInterface::INewAge()
if( makeAsset )
(*fAssetManIface)->AddNewAsset(newAssetFilename);
#endif
// Refresh the tree now
IFillAgeTree();

11
Sources/Tools/MaxMain/plMaxMenu.cpp

@ -177,8 +177,13 @@ bool DoAction(int id)
return true;
case kActionSceneViewer:
#ifdef MAXSCENEVIEWER_ENABLED
SceneViewer::Instance().Show();
return true;
#else
hsMessageBox("The SceneViewer has been disabled in this build", "Disabled", 0);
return true;
#endif
case kActionLock:
plNodeLock().Lock();
@ -246,7 +251,7 @@ void AddPlasmaExportMenu()
// KLUDGE - MaxAss didn't define the file submenu with an accelerator.
// This fixes it.
if (title == "MAX File Operations")
if (title == (CStr)"MAX File Operations")
{
fileMenuItem->SetUseCustomTitle(true);
bool custom = fileMenuItem->GetUseCustomTitle();
@ -264,7 +269,7 @@ void AddPlasmaExportMenu()
IMenuItem* fileMenuItem = fileMenu->GetItem(i);
const TSTR& title = fileMenuItem->GetTitle();
// We want to add it after the "Export Selected" menu item
if (title == "Export Selected...")
if (title == (CStr)"Export Selected...")
{
ActionTable* pActionTable = GetCOREInterface()->GetActionManager()->FindTable(kActionId);
if (!pActionTable)
@ -379,10 +384,12 @@ void plCreateMenu()
pMenuItem->ActAsSeparator();
pPlasmaMenu->AddItem(pMenuItem);
#ifdef MAXSCENEVIEWER_ENABLED
// Add the SceneViewer to the menu
pMenuItem = GetIMenuItem();
pMenuItem->SetActionItem(pActionTable->GetAction(kActionSceneViewer));
pPlasmaMenu->AddItem(pMenuItem);
#endif
// Add a separator
pMenuItem = GetIMenuItem();

2
Sources/Tools/MaxMain/plMaxNode.cpp

@ -4038,7 +4038,7 @@ plKey plMaxNode::FindPageKey( UInt16 classIdx, const char *name )
return hsgResMgr::ResMgr()->FindKey( plUoid( GetLocation(), classIdx, name ) );
}
char *plMaxNode::GetAgeName()
const char *plMaxNode::GetAgeName()
{
int i;
for (i = 0; i < NumAttachedComponents(); i++)

2
Sources/Tools/MaxMain/plMaxNode.h

@ -164,7 +164,7 @@ public:
// Little helper function. Calls FindKey() in the resManager using the location (page) of this node
plKey FindPageKey( UInt16 classIdx, const char *name );
char *GetAgeName();
const char *GetAgeName();
void CheckSynchOptions(plSynchedObject* so);

18
Sources/Tools/MaxMain/plMaxNodeBase.cpp

@ -462,7 +462,7 @@ bool plMaxNodeBase::IsXRef()
{
// Is this an XRef'd object?
Object *obj = GetObjectRef();
if (obj->SuperClassID() == SYSTEM_CLASS_ID && obj->ClassID() == Class_ID(XREFOBJ_CLASS_ID,0))
if (obj->SuperClassID() == SYSTEM_CLASS_ID && obj->ClassID() == XREFOBJ_CLASS_ID)
return true;
//
@ -523,18 +523,18 @@ UInt32 plMaxNodeBase::NumAttachedComponents(bool all)
std::vector<plComponentBase*> comps;
// Go through this item's reflist, looking for components
RefList &refList = GetRefList();
RefListItem *item = refList.FirstItem();
DependentIterator di(this);
ReferenceMaker* item = di.Next();
while (item)
{
plComponentBase *comp = IRefMakerToComponent(item->maker, all);
plComponentBase *comp = IRefMakerToComponent(item, all);
if (comp && std::find(comps.begin(), comps.end(), comp) == comps.end())
{
comps.push_back(comp);
numComponents++;
}
item = item->next;
item = di.Next();
}
return numComponents;
@ -546,11 +546,11 @@ plComponentBase *plMaxNodeBase::GetAttachedComponent(UInt32 i, bool all)
std::vector<plComponentBase*> comps;
// Go through this item's reflist, looking for components
RefList &refList = GetRefList();
RefListItem *item = refList.FirstItem();
DependentIterator di(this);
ReferenceMaker* item = di.Next();
while (item)
{
plComponentBase *comp = IRefMakerToComponent(item->maker, all);
plComponentBase *comp = IRefMakerToComponent(item, all);
if (comp && std::find(comps.begin(), comps.end(), comp) == comps.end())
{
if (numComponents == i)
@ -560,7 +560,7 @@ plComponentBase *plMaxNodeBase::GetAttachedComponent(UInt32 i, bool all)
numComponents++;
}
item = item->next;
item = di.Next();;
}
return nil;

6
Sources/Tools/MaxMain/plMaxUtils.cpp

@ -98,10 +98,13 @@ BOOL plMaxUtils::DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
#include "plMtlCollector.h"
#include "MaxPlasmaMtls/Layers/plPlasmaMAXLayer.h"
#ifdef MAXASS_AVAILABLE
#include "../../AssetMan/PublicInterface/AssManTypes.h"
#endif
int ClearTextureIds()
{
#ifdef MAXASS_AVAILABLE
int numCleared = 0;
TexSet texmaps;
@ -131,6 +134,9 @@ int ClearTextureIds()
}
return numCleared;
#else
return 0;
#endif
}
/*
void ClearAssetsRecur(plMaxNode* node)

2
Sources/Tools/MaxMain/plPluginResManager.cpp

@ -392,7 +392,7 @@ void plPluginResManager::EndExport()
}
fExportedNodes.Reset();
for( i = 0; i < fLooseEnds.GetCount(); i++ )
for(int i = 0; i < fLooseEnds.GetCount(); i++ )
{
if( fLooseEnds[i] )
fLooseEnds[i]->UnRefObject();

12
Sources/Tools/MaxMain/plTextureSearch.cpp

@ -36,14 +36,20 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plMtlCollector.h"
#include "plMaxAccelerators.h"
#include "MaxPlasmaMtls/Layers/plPlasmaMAXLayer.h"
#ifdef MAXASS_AVAILABLE
#include "../../AssetMan/PublicInterface/MaxAssInterface.h"
#endif
// Not a class member so we don't have to make everyone who uses this know about AssetMan
#ifdef MAXASS_AVAILABLE
static jvUniqueId gAssetID;
#endif
plTextureSearch::plTextureSearch() : fDlg(NULL)
{
#ifdef MAXASS_AVAILABLE
gAssetID.SetEmpty();
#endif
memset(fFileName, 0, sizeof(fFileName));
}
@ -278,7 +284,9 @@ void plTextureSearch::IUpdateTextures(plTextureSearch::Update update)
}
else if (update == kUpdateReplace)
{
#ifdef MAXASS_AVAILABLE
layer->SetBitmapAssetId(gAssetID, i);
#endif
BitmapInfo info;
info.SetName(fFileName);
@ -344,6 +352,7 @@ void plTextureSearch::IPickReplaceTexture()
fFileName[0] = '\0';
// if we have the assetman plug-in, then try to use it, unless shift is held down
#ifdef MAXASS_AVAILABLE
MaxAssInterface* maxAssInterface = GetMaxAssInterface();
if (maxAssInterface && !(GetKeyState(VK_SHIFT) & 0x8000))
{
@ -352,10 +361,13 @@ void plTextureSearch::IPickReplaceTexture()
else
{
gAssetID.SetEmpty();
#endif
BitmapInfo bi;
TheManager->SelectFileInput(&bi, GetCOREInterface()->GetMAXHWnd(), _T("Select Bitmap Image File"));
strcpy(fFileName, bi.Filename());
#ifdef MAXASS_AVAILABLE
}
#endif
if (fFileName[0] == '\0')
{

2
Sources/Tools/MaxPlasmaLights/CMakeLists.txt

@ -33,6 +33,7 @@ set_target_properties(MaxPlasmaLights PROPERTIES SUFFIX ".dlo")
target_link_libraries(MaxPlasmaLights MaxComponent)
target_link_libraries(MaxPlasmaLights MaxPlasmaMtls)
target_link_libraries(MaxPlasmaLights ${3dsm_LIBRARIES})
# Carbon copy from plClient
@ -126,6 +127,7 @@ target_link_libraries(MaxPlasmaLights pnUtils)
target_link_libraries(MaxPlasmaLights pnUtilsExe)
if (WIN32)
target_link_libraries(MaxPlasmaLights Comctl32)
target_link_libraries(MaxPlasmaLights Rpcrt4)
target_link_libraries(MaxPlasmaLights Ws2_32)
endif(WIN32)

2
Sources/Tools/MaxPlasmaLights/DLLEntry.cpp

@ -51,6 +51,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
if (!controlsInit)
{
controlsInit = TRUE;
// Note: InitCustomControls is deprecated
// New versions of 3dsm do this for us :)
InitCustomControls(hInstance); // Initialize MAX's custom controls
InitCommonControls(); // Initialize Win95 controls
}

2
Sources/Tools/MaxPlasmaLights/target.h

@ -97,7 +97,7 @@ class TargetObject: public GeomObject {
WPARAM wParam, LPARAM lParam ){return(0);}
// From ref.h
RefTargetHandle Clone(RemapDir& remap = NoRemap());
RefTargetHandle Clone(RemapDir& remap = DefaultRemapDir());
// IO
IOResult Save(ISave *isave);

2
Sources/Tools/MaxPlasmaMtls/Layers/plDynamicEnvLayer.h

@ -44,6 +44,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
class ClassDesc2;
class IParamBlock2;
ClassDesc2* GetDynamicEnvLayerDesc();
//// Class Definition /////////////////////////////////////////////////////////
class plDynamicEnvLayer : public plPlasmaMAXLayer

2
Sources/Tools/MaxPlasmaMtls/Layers/plPlasmaMAXLayer.h

@ -121,8 +121,10 @@ class plPlasmaMAXLayer : public Texmap
virtual BOOL HandleBitmapSelection(int index = 0);
virtual void SetBitmap(BitmapInfo *bi, int index = 0);
#ifdef MAXASS_AVAILABLE
virtual void SetBitmapAssetId(jvUniqueId& assetId, int index = 0);
virtual void GetBitmapAssetId(jvUniqueId& assetId, int index = 0);
#endif
// Pure virtual accessors for the various bitmap related elements
virtual Bitmap *GetMaxBitmap(int index = 0) = 0;

35
Sources/Tools/MaxSceneViewer/CMakeLists.txt

@ -0,0 +1,35 @@
include_directories("../")
include_directories("../../Plasma/Apps")
include_directories("../../Plasma/CoreLib")
include_directories("../../Plasma/FeatureLib")
include_directories("../../Plasma/FeatureLib/inc")
include_directories("../../Plasma/NucleusLib")
include_directories("../../Plasma/NucleusLib/inc")
include_directories("../../Plasma/PubUtilLib")
include_directories("../../Plasma/PubUtilLib/inc")
include_directories(${3dsm_INCLUDE_DIR})
set(MaxSceneViewer_HEADERS
plKeyRefSort.h
plMaxFileData.h
plPluginApp.h
plPluginClient.h
SceneSync.h
SceneViewer.h
SceneWatcher.h
)
set(MaxSceneViewer_SOURCES
plKeyRefSort.cpp
plMaxFileData.cpp
plPluginApp.cpp
plPluginClient.cpp
SceneSync.cpp
SceneViewer.cpp
SceneWatcher.cpp
)
add_library(MaxSceneViewer STATIC ${MaxSceneViewer_HEADERS} ${MaxSceneViewer_SOURCES})
source_group("Header Files" FILES ${MaxSceneViewer_HEADERS})
source_group("Source Files" FILES ${MaxSceneViewer_SOURCES})

14
Sources/Tools/MaxSceneViewer/SceneSync.cpp

@ -30,15 +30,15 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#define MAXPLUGINCODE
#include "../pnSceneObject/plSceneObject.h"
#include "../MaxMain/plMaxNode.h"
#include "../MaxMain/plPluginResManager.h"
#include "../MaxConvert/plConvert.h"
#include "../MaxConvert/hsMaterialConverter.h"
#include "../MaxComponent/plComponent.h"
#include "pnSceneObject/plSceneObject.h"
#include "MaxMain/plMaxNode.h"
#include "MaxMain/plPluginResManager.h"
#include "MaxConvert/plConvert.h"
#include "MaxConvert/hsMaterialConverter.h"
#include "MaxComponent/plComponent.h"
#include "hsThread.h"
#include "hsSTLStream.h"
#include "../../../Plasma/Apps/plClient/plClientUpdateFormat.h"
#include "plClient/plClientUpdateFormat.h"
#include "plMaxFileData.h"

4
Sources/Tools/MaxSceneViewer/SceneSync.h

@ -37,8 +37,8 @@ class hsSemaphore;
class SceneWatcher;
class plSceneNode;
#include "../pnKeyedObject/plUoid.h"
#include "../pnKeyedObject/plKey.h"
#include "pnKeyedObject/plUoid.h"
#include "pnKeyedObject/plKey.h"
class SceneSync
{

4
Sources/Tools/MaxSceneViewer/SceneViewer.cpp

@ -27,9 +27,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "SceneViewer.h"
#include "SceneSync.h"
#include "../MaxMain/plMaxCFGFile.h"
#include "MaxMain/plMaxCFGFile.h"
#include "../MaxMain/resource.h"
#include "MaxMain/resource.h"
// For ShellExecute
#include <shellapi.h>

8
Sources/Tools/MaxSceneViewer/SceneWatcher.cpp

@ -27,11 +27,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "SceneWatcher.h"
#include "../MaxMain/plMaxNode.h"
#include "../MaxComponent/plComponent.h"
#include "../MaxMain/plPlasmaRefMsgs.h"
#include "MaxMain/plMaxNode.h"
#include "MaxComponent/plComponent.h"
#include "MaxMain/plPlasmaRefMsgs.h"
#include "../pnKeyedObject/plKey.h"
#include "pnKeyedObject/plKey.h"
SceneWatcher::SceneWatcher() : fDirty(false)
{

2
Sources/Tools/MaxSceneViewer/SceneWatcher.h

@ -32,7 +32,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <vector>
#include <set>
#include "../pnKeyedObject/plKey.h"
#include "pnKeyedObject/plKey.h"
class plMaxNode;

2
Sources/Tools/MaxSceneViewer/plKeyRefSort.cpp

@ -24,7 +24,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "plKeyRefSort.h"
#include "../pnKeyedObject/plKeyImp.h"
#include "pnKeyedObject/plKeyImp.h"
#include <algorithm>

2
Sources/Tools/MaxSceneViewer/plKeyRefSort.h

@ -25,7 +25,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "hsTypes.h"
#include <vector>
#include "../pnKeyedObject/plKey.h"
#include "pnKeyedObject/plKey.h"
// A really crappy sort of a list of keys from the most referenced key to the least.

2
Sources/Tools/MaxSceneViewer/plMaxFileData.cpp

@ -138,7 +138,7 @@ public:
const TCHAR* Category() { return _T(""); }
};
MaxFileDataClassDesc gMaxFileDataClassDesc;
ClassDesc *GetMaxFileDataDesc() { return &gMaxFileDataClassDesc; }
ClassDesc* GetMaxFileDataDesc() { return &gMaxFileDataClassDesc; }
// This functions searches for Trackviewnode and the Controller and creates one, if none is present.
plMaxFileDataControl *GetMaxFileData(bool& created)

2
Sources/Tools/MaxSceneViewer/plMaxFileData.h

@ -23,4 +23,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021
*==LICENSE==*/
void InitMaxFileData();
ClassDesc* GetMaxFileDataDesc();

2
Sources/Tools/MaxSceneViewer/plPluginApp.cpp

@ -25,7 +25,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "plPluginClient.h"
#include "plPluginApp.h"
#include "../pnNetCommon/plNetApp.h"
#include "pnNetCommon/plNetApp.h"
plClient *plPluginApp::Startup(char *pCmdLine)
{

2
Sources/Tools/MaxSceneViewer/plPluginApp.h

@ -23,7 +23,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
Mead, WA 99021
*==LICENSE==*/
#include "../../Plasma/Apps/plClient/plApp.h"
#include "plClient/plApp.h"
class plPluginClient;

12
Sources/Tools/MaxSceneViewer/plPluginClient.cpp

@ -25,19 +25,19 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
*==LICENSE==*/
#include "plPluginClient.h"
#include "../../../Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.h"
#include "plPipeline/hsG3DDeviceSelector.h"
#include "hsThread.h"
#include "hsSTLStream.h"
#include "../pnKeyedObject/plUoid.h"
#include "../plResMgr/plUpdatableResManager.h"
#include "../plStatusLog/plStatusLog.h"
#include "pnKeyedObject/plUoid.h"
#include "plResMgr/plUpdatableResManager.h"
#include "plStatusLog/plStatusLog.h"
// Needed for IEnableProxies
#include "plPipeline.h"
#include "../plDrawable/plDrawableSpans.h"
#include "../pnMessage/plProxyDrawMsg.h"
#include "plDrawable/plDrawableSpans.h"
#include "pnMessage/plProxyDrawMsg.h"
#include "plgDispatch.h"
#define LOG_SCENEVIWER

2
Sources/Tools/MaxSceneViewer/plPluginClient.h

@ -27,7 +27,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#define plUpdatableClient_h_inc
#include "hsTypes.h"
#include "../../Plasma/Apps/plClient/plClient.h"
#include "plClient/plClient.h"
class hsSemaphore;
class plStatusLog;

10
cmake/FindMaxSDK.cmake

@ -38,6 +38,12 @@ find_library(3dsm_MAXUTIL_LIBRARY maxutil
find_library(3dsm_MESH_LIBRARY mesh
PATHS "${3dsm_PATH}/maxsdk/lib")
find_library(3dsm_MENUS_LIBRARY menus
PATHS "${3dsm_PATH}/maxsdk/lib")
find_library(3dsm_MNMATH_LIBRARY mnmath
PATHS "${3dsm_PATH}/maxsdk/lib")
find_library(3dsm_PARAMBLK2_LIBRARY paramblk2
PATHS "${3dsm_PATH}/maxsdk/lib")
@ -52,6 +58,8 @@ set(3dsm_LIBRARIES
${3dsm_MAXSCRPT_LIBRARY}
${3dsm_MAXUTIL_LIBRARY}
${3dsm_MESH_LIBRARY}
${3dsm_MENUS_LIBRARY}
${3dsm_MNMATH_LIBRARY}
${3dsm_PARAMBLK2_LIBRARY}
)
@ -66,6 +74,8 @@ mark_as_advanced(
3dsm_MAXSCRPT_LIBRARY
3dsm_MAXUTIL_LIBRARY
3dsm_MESH_LIBRARY
3dsm_MENUS_LIBRARY
3dsm_MNMATH_LIBRARY
3dsm_PARAMBLK2_LIBRARY
)

Loading…
Cancel
Save