mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-17 04:51:48 +00:00
Changed: Minor changes
This commit is contained in:
parent
8eb24e71e3
commit
0fb1fa5cc0
7 changed files with 65 additions and 51 deletions
|
@ -15,7 +15,7 @@
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
#include "stdligo.h"
|
#include "stdligo.h"
|
||||||
#include "ligo_error.h"
|
#include "nel/ligo/ligo_error.h"
|
||||||
|
|
||||||
namespace NLLIGO
|
namespace NLLIGO
|
||||||
{
|
{
|
||||||
|
|
|
@ -48,10 +48,10 @@ END_MESSAGE_MAP()
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// CAboutDialog message handlers
|
// CAboutDialog message handlers
|
||||||
|
|
||||||
BOOL CAboutDialog::OnInitDialog()
|
BOOL CAboutDialog::OnInitDialog()
|
||||||
{
|
{
|
||||||
CDialog::OnInitDialog();
|
CDialog::OnInitDialog();
|
||||||
|
|
||||||
// Get the module path
|
// Get the module path
|
||||||
HMODULE hModule = AfxGetInstanceHandle();
|
HMODULE hModule = AfxGetInstanceHandle();
|
||||||
nlassert(hModule); // shouldn't be null now anymore in any case
|
nlassert(hModule); // shouldn't be null now anymore in any case
|
||||||
|
@ -73,7 +73,7 @@ BOOL CAboutDialog::OnInitDialog()
|
||||||
if (VerQueryValue (pInfo, _T("\\"), (void**)&versionTab, &versionSize))
|
if (VerQueryValue (pInfo, _T("\\"), (void**)&versionTab, &versionSize))
|
||||||
{
|
{
|
||||||
// Get the pointer on the structure
|
// Get the pointer on the structure
|
||||||
VS_FIXEDFILEINFO *info=(VS_FIXEDFILEINFO*)versionTab;
|
VS_FIXEDFILEINFO *info = (VS_FIXEDFILEINFO*)versionTab;
|
||||||
|
|
||||||
// Setup version number
|
// Setup version number
|
||||||
TCHAR version[512];
|
TCHAR version[512];
|
||||||
|
|
|
@ -1885,7 +1885,7 @@ bool CObjectViewer::loadInstanceGroup(const std::string &igFilename)
|
||||||
if (file.open (igFilename))
|
if (file.open (igFilename))
|
||||||
{
|
{
|
||||||
// Shape pointer
|
// Shape pointer
|
||||||
NL3D::CInstanceGroup *ig= new NL3D::CInstanceGroup;
|
NL3D::CInstanceGroup *ig = new NL3D::CInstanceGroup;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include "nel_export_scene.h"
|
#include "nel_export_scene.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
using namespace NL3D;
|
using namespace NL3D;
|
||||||
using namespace NLMISC;
|
using namespace NLMISC;
|
||||||
|
|
||||||
|
@ -66,25 +66,29 @@ INT_PTR CALLBACK OptionsDialogCallback (
|
||||||
LPARAM lParam // second message parameter
|
LPARAM lParam // second message parameter
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
switch (uMsg)
|
switch (uMsg)
|
||||||
{
|
{
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
{
|
{
|
||||||
CenterWindow( hwndDlg, theCNelExport._Ip->GetMAXHWnd() );
|
CenterWindow( hwndDlg, theCNelExport._Ip->GetMAXHWnd() );
|
||||||
ShowWindow( hwndDlg, TRUE );
|
ShowWindow( hwndDlg, TRUE );
|
||||||
|
|
||||||
// Initialize from theExportSceneStruct
|
// Initialize from theExportSceneStruct
|
||||||
if( theExportSceneStruct.bExcludeNonSelected )
|
if( theExportSceneStruct.bExcludeNonSelected )
|
||||||
SendMessage( GetDlgItem(hwndDlg,IDC_EXCLUDE), BM_SETCHECK, BST_CHECKED, 0 );
|
SendMessage( GetDlgItem(hwndDlg,IDC_EXCLUDE), BM_SETCHECK, BST_CHECKED, 0 );
|
||||||
else
|
else
|
||||||
SendMessage( GetDlgItem(hwndDlg,IDC_EXCLUDE), BM_SETCHECK, BST_UNCHECKED, 0 );
|
SendMessage( GetDlgItem(hwndDlg,IDC_EXCLUDE), BM_SETCHECK, BST_UNCHECKED, 0 );
|
||||||
|
|
||||||
if( theExportSceneStruct.bExportLighting )
|
if( theExportSceneStruct.bExportLighting )
|
||||||
SendMessage( GetDlgItem(hwndDlg,IDC_CHECKEXPORTLIGHTING), BM_SETCHECK, BST_CHECKED, 0 );
|
SendMessage( GetDlgItem(hwndDlg,IDC_CHECKEXPORTLIGHTING), BM_SETCHECK, BST_CHECKED, 0 );
|
||||||
else
|
else
|
||||||
SendMessage( GetDlgItem(hwndDlg,IDC_CHECKEXPORTLIGHTING), BM_SETCHECK, BST_UNCHECKED, 0 );
|
SendMessage( GetDlgItem(hwndDlg,IDC_CHECKEXPORTLIGHTING), BM_SETCHECK, BST_UNCHECKED, 0 );
|
||||||
|
|
||||||
if( theExportSceneStruct.OutputLightmapLog )
|
if( theExportSceneStruct.OutputLightmapLog )
|
||||||
SendMessage( GetDlgItem(hwndDlg,IDC_CHECKOUTPUTLIGHTMAPLOG), BM_SETCHECK, BST_CHECKED, 0 );
|
SendMessage( GetDlgItem(hwndDlg,IDC_CHECKOUTPUTLIGHTMAPLOG), BM_SETCHECK, BST_CHECKED, 0 );
|
||||||
else
|
else
|
||||||
SendMessage( GetDlgItem(hwndDlg,IDC_CHECKOUTPUTLIGHTMAPLOG), BM_SETCHECK, BST_UNCHECKED, 0 );
|
SendMessage( GetDlgItem(hwndDlg,IDC_CHECKOUTPUTLIGHTMAPLOG), BM_SETCHECK, BST_UNCHECKED, 0 );
|
||||||
|
|
||||||
if( theExportSceneStruct.bShadow)
|
if( theExportSceneStruct.bShadow)
|
||||||
SendMessage( GetDlgItem(hwndDlg,IDC_SHADOW), BM_SETCHECK, BST_CHECKED, 0 );
|
SendMessage( GetDlgItem(hwndDlg,IDC_SHADOW), BM_SETCHECK, BST_CHECKED, 0 );
|
||||||
else
|
else
|
||||||
|
@ -94,6 +98,7 @@ INT_PTR CALLBACK OptionsDialogCallback (
|
||||||
|
|
||||||
if( theExportSceneStruct.nExportLighting == 0 )
|
if( theExportSceneStruct.nExportLighting == 0 )
|
||||||
SendMessage( GetDlgItem(hwndDlg,IDC_RADIONORMALEXPORTLIGHTING), BM_SETCHECK, BST_CHECKED, 0 );
|
SendMessage( GetDlgItem(hwndDlg,IDC_RADIONORMALEXPORTLIGHTING), BM_SETCHECK, BST_CHECKED, 0 );
|
||||||
|
|
||||||
if( theExportSceneStruct.nExportLighting == 1 )
|
if( theExportSceneStruct.nExportLighting == 1 )
|
||||||
SendMessage( GetDlgItem(hwndDlg,IDC_RADIORADIOSITYEXPORTLIGHTING), BM_SETCHECK, BST_CHECKED, 0 );
|
SendMessage( GetDlgItem(hwndDlg,IDC_RADIORADIOSITYEXPORTLIGHTING), BM_SETCHECK, BST_CHECKED, 0 );
|
||||||
|
|
||||||
|
@ -101,17 +106,21 @@ INT_PTR CALLBACK OptionsDialogCallback (
|
||||||
|
|
||||||
if( theExportSceneStruct.nOverSampling == 1 )
|
if( theExportSceneStruct.nOverSampling == 1 )
|
||||||
SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS1), BM_SETCHECK, BST_CHECKED, 0 );
|
SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS1), BM_SETCHECK, BST_CHECKED, 0 );
|
||||||
|
|
||||||
if( theExportSceneStruct.nOverSampling == 2 )
|
if( theExportSceneStruct.nOverSampling == 2 )
|
||||||
SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS2), BM_SETCHECK, BST_CHECKED, 0 );
|
SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS2), BM_SETCHECK, BST_CHECKED, 0 );
|
||||||
|
|
||||||
if( theExportSceneStruct.nOverSampling == 4 )
|
if( theExportSceneStruct.nOverSampling == 4 )
|
||||||
SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS3), BM_SETCHECK, BST_CHECKED, 0 );
|
SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS3), BM_SETCHECK, BST_CHECKED, 0 );
|
||||||
|
|
||||||
if( theExportSceneStruct.nOverSampling == 8 )
|
if( theExportSceneStruct.nOverSampling == 8 )
|
||||||
SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS4), BM_SETCHECK, BST_CHECKED, 0 );
|
SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS4), BM_SETCHECK, BST_CHECKED, 0 );
|
||||||
|
|
||||||
if( theExportSceneStruct.bShowLumel )
|
if( theExportSceneStruct.bShowLumel )
|
||||||
SendMessage( GetDlgItem(hwndDlg,IDC_SHOWLUMEL), BM_SETCHECK, BST_CHECKED, 0 );
|
SendMessage( GetDlgItem(hwndDlg,IDC_SHOWLUMEL), BM_SETCHECK, BST_CHECKED, 0 );
|
||||||
else
|
else
|
||||||
SendMessage( GetDlgItem(hwndDlg,IDC_SHOWLUMEL), BM_SETCHECK, BST_UNCHECKED, 0 );
|
SendMessage( GetDlgItem(hwndDlg,IDC_SHOWLUMEL), BM_SETCHECK, BST_UNCHECKED, 0 );
|
||||||
|
|
||||||
if( theExportSceneStruct.bExportBgColor )
|
if( theExportSceneStruct.bExportBgColor )
|
||||||
SendMessage( GetDlgItem(hwndDlg,IDC_EXPORT_BG_COLOR), BM_SETCHECK, BST_CHECKED, 0 );
|
SendMessage( GetDlgItem(hwndDlg,IDC_EXPORT_BG_COLOR), BM_SETCHECK, BST_CHECKED, 0 );
|
||||||
else
|
else
|
||||||
|
@ -131,7 +140,7 @@ INT_PTR CALLBACK OptionsDialogCallback (
|
||||||
|
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
if( HIWORD(wParam) == BN_CLICKED )
|
if( HIWORD(wParam) == BN_CLICKED )
|
||||||
switch (LOWORD(wParam))
|
switch (LOWORD(wParam))
|
||||||
{
|
{
|
||||||
case IDC_BUTTONEXPORTLIGHTING:
|
case IDC_BUTTONEXPORTLIGHTING:
|
||||||
{
|
{
|
||||||
|
@ -153,14 +162,17 @@ INT_PTR CALLBACK OptionsDialogCallback (
|
||||||
theExportSceneStruct.bExcludeNonSelected = true;
|
theExportSceneStruct.bExcludeNonSelected = true;
|
||||||
else
|
else
|
||||||
theExportSceneStruct.bExcludeNonSelected = false;
|
theExportSceneStruct.bExcludeNonSelected = false;
|
||||||
|
|
||||||
if( SendMessage( GetDlgItem(hwndDlg,IDC_SHADOW), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
|
if( SendMessage( GetDlgItem(hwndDlg,IDC_SHADOW), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
|
||||||
theExportSceneStruct.bShadow = true;
|
theExportSceneStruct.bShadow = true;
|
||||||
else
|
else
|
||||||
theExportSceneStruct.bShadow = false;
|
theExportSceneStruct.bShadow = false;
|
||||||
|
|
||||||
if( SendMessage( GetDlgItem(hwndDlg,IDC_CHECKEXPORTLIGHTING), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
|
if( SendMessage( GetDlgItem(hwndDlg,IDC_CHECKEXPORTLIGHTING), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
|
||||||
theExportSceneStruct.bExportLighting = true;
|
theExportSceneStruct.bExportLighting = true;
|
||||||
else
|
else
|
||||||
theExportSceneStruct.bExportLighting = false;
|
theExportSceneStruct.bExportLighting = false;
|
||||||
|
|
||||||
if( SendMessage( GetDlgItem(hwndDlg,IDC_CHECKOUTPUTLIGHTMAPLOG), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
|
if( SendMessage( GetDlgItem(hwndDlg,IDC_CHECKOUTPUTLIGHTMAPLOG), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
|
||||||
theExportSceneStruct.OutputLightmapLog = true;
|
theExportSceneStruct.OutputLightmapLog = true;
|
||||||
else
|
else
|
||||||
|
@ -172,6 +184,7 @@ INT_PTR CALLBACK OptionsDialogCallback (
|
||||||
|
|
||||||
if( SendMessage( GetDlgItem(hwndDlg,IDC_RADIONORMALEXPORTLIGHTING), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
|
if( SendMessage( GetDlgItem(hwndDlg,IDC_RADIONORMALEXPORTLIGHTING), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
|
||||||
theExportSceneStruct.nExportLighting = 0;
|
theExportSceneStruct.nExportLighting = 0;
|
||||||
|
|
||||||
if( SendMessage( GetDlgItem(hwndDlg,IDC_RADIORADIOSITYEXPORTLIGHTING), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
|
if( SendMessage( GetDlgItem(hwndDlg,IDC_RADIORADIOSITYEXPORTLIGHTING), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
|
||||||
theExportSceneStruct.nExportLighting = 1;
|
theExportSceneStruct.nExportLighting = 1;
|
||||||
|
|
||||||
|
@ -180,16 +193,21 @@ INT_PTR CALLBACK OptionsDialogCallback (
|
||||||
|
|
||||||
if( SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS1), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
|
if( SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS1), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
|
||||||
theExportSceneStruct.nOverSampling = 1;
|
theExportSceneStruct.nOverSampling = 1;
|
||||||
|
|
||||||
if( SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS2), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
|
if( SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS2), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
|
||||||
theExportSceneStruct.nOverSampling = 2;
|
theExportSceneStruct.nOverSampling = 2;
|
||||||
|
|
||||||
if( SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS3), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
|
if( SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS3), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
|
||||||
theExportSceneStruct.nOverSampling = 4;
|
theExportSceneStruct.nOverSampling = 4;
|
||||||
|
|
||||||
if( SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS4), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
|
if( SendMessage( GetDlgItem(hwndDlg,IDC_RADIOSS4), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
|
||||||
theExportSceneStruct.nOverSampling = 8;
|
theExportSceneStruct.nOverSampling = 8;
|
||||||
|
|
||||||
if( SendMessage( GetDlgItem(hwndDlg,IDC_SHOWLUMEL), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
|
if( SendMessage( GetDlgItem(hwndDlg,IDC_SHOWLUMEL), BM_GETCHECK, 0, 0 ) == BST_CHECKED )
|
||||||
theExportSceneStruct.bShowLumel = true;
|
theExportSceneStruct.bShowLumel = true;
|
||||||
else
|
else
|
||||||
theExportSceneStruct.bShowLumel = false;
|
theExportSceneStruct.bShowLumel = false;
|
||||||
|
|
||||||
theExportSceneStruct.bExportBgColor = ( SendMessage( GetDlgItem(hwndDlg,IDC_EXPORT_BG_COLOR), BM_GETCHECK, 0, 0 ) == BST_CHECKED );
|
theExportSceneStruct.bExportBgColor = ( SendMessage( GetDlgItem(hwndDlg,IDC_EXPORT_BG_COLOR), BM_GETCHECK, 0, 0 ) == BST_CHECKED );
|
||||||
|
|
||||||
// SurfaceLighting
|
// SurfaceLighting
|
||||||
|
@ -212,9 +230,9 @@ INT_PTR CALLBACK OptionsDialogCallback (
|
||||||
EndDialog(hwndDlg,1);
|
EndDialog(hwndDlg,1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -228,7 +246,7 @@ static INT_PTR CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LP
|
||||||
setlocale (LC_NUMERIC, "English");
|
setlocale (LC_NUMERIC, "English");
|
||||||
|
|
||||||
BOOL ret = TRUE;
|
BOOL ret = TRUE;
|
||||||
switch (msg)
|
switch (msg)
|
||||||
{
|
{
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
{
|
{
|
||||||
|
@ -312,7 +330,7 @@ static INT_PTR CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LP
|
||||||
|
|
||||||
// Get time
|
// Get time
|
||||||
TimeValue time=theCNelExport._Ip->GetTime();
|
TimeValue time=theCNelExport._Ip->GetTime();
|
||||||
|
|
||||||
// Get node count
|
// Get node count
|
||||||
int nNumSelNode=theCNelExport._Ip->GetSelNodeCount();
|
int nNumSelNode=theCNelExport._Ip->GetSelNodeCount();
|
||||||
|
|
||||||
|
@ -430,7 +448,7 @@ static INT_PTR CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LP
|
||||||
|
|
||||||
// Get time
|
// Get time
|
||||||
TimeValue time=theCNelExport._Ip->GetTime();
|
TimeValue time=theCNelExport._Ip->GetTime();
|
||||||
|
|
||||||
// Get node count
|
// Get node count
|
||||||
uint nNumSelNode=theCNelExport._Ip->GetSelNodeCount();
|
uint nNumSelNode=theCNelExport._Ip->GetSelNodeCount();
|
||||||
|
|
||||||
|
@ -465,7 +483,7 @@ static INT_PTR CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LP
|
||||||
// ---
|
// ---
|
||||||
case ID_SAVECOLLISION:
|
case ID_SAVECOLLISION:
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
// Init the exporter
|
// Init the exporter
|
||||||
nlassert (theIP);
|
nlassert (theIP);
|
||||||
|
@ -473,7 +491,7 @@ static INT_PTR CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LP
|
||||||
|
|
||||||
// Get time
|
// Get time
|
||||||
TimeValue time=theCNelExport._Ip->GetTime();
|
TimeValue time=theCNelExport._Ip->GetTime();
|
||||||
|
|
||||||
// Get node count
|
// Get node count
|
||||||
int nNumSelNode=theCNelExport._Ip->GetSelNodeCount();
|
int nNumSelNode=theCNelExport._Ip->GetSelNodeCount();
|
||||||
|
|
||||||
|
@ -537,12 +555,12 @@ static INT_PTR CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LP
|
||||||
// Init the exporter
|
// Init the exporter
|
||||||
nlassert (theIP);
|
nlassert (theIP);
|
||||||
theCNelExport.init (false, true, theIP, true);
|
theCNelExport.init (false, true, theIP, true);
|
||||||
|
|
||||||
uint nNumSelNode = theCNelExport._Ip->GetSelNodeCount();
|
uint nNumSelNode = theCNelExport._Ip->GetSelNodeCount();
|
||||||
|
|
||||||
// Save all selected objects
|
// Save all selected objects
|
||||||
if (nNumSelNode)
|
if (nNumSelNode)
|
||||||
{
|
{
|
||||||
std::vector<INode*> vectNode;
|
std::vector<INode*> vectNode;
|
||||||
theCNelExport.getSelectedNode (vectNode);
|
theCNelExport.getSelectedNode (vectNode);
|
||||||
nlassert (vectNode.size()!=0);
|
nlassert (vectNode.size()!=0);
|
||||||
|
@ -583,7 +601,7 @@ static INT_PTR CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LP
|
||||||
COFile outputFile;
|
COFile outputFile;
|
||||||
if( outputFile.open(sConfigFileName) )
|
if( outputFile.open(sConfigFileName) )
|
||||||
theExportSceneStruct.serial( outputFile );
|
theExportSceneStruct.serial( outputFile );
|
||||||
}
|
}
|
||||||
// EXPORT THE SCENE
|
// EXPORT THE SCENE
|
||||||
// theCNelExport.exportScene( vectNode );
|
// theCNelExport.exportScene( vectNode );
|
||||||
}
|
}
|
||||||
|
@ -595,7 +613,7 @@ static INT_PTR CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LP
|
||||||
// Init the exporter
|
// Init the exporter
|
||||||
nlassert (theIP);
|
nlassert (theIP);
|
||||||
theCNelExport.init (false, true, theIP, true);
|
theCNelExport.init (false, true, theIP, true);
|
||||||
|
|
||||||
// Build a seleted set
|
// Build a seleted set
|
||||||
std::set<INode*> listNode;
|
std::set<INode*> listNode;
|
||||||
|
|
||||||
|
@ -618,13 +636,13 @@ static INT_PTR CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LP
|
||||||
// Init the exporter
|
// Init the exporter
|
||||||
nlassert (theIP);
|
nlassert (theIP);
|
||||||
theCNelExport.init (false, true, theIP, true);
|
theCNelExport.init (false, true, theIP, true);
|
||||||
|
|
||||||
uint nNumSelNode = theCNelExport._Ip->GetSelNodeCount();
|
uint nNumSelNode = theCNelExport._Ip->GetSelNodeCount();
|
||||||
|
|
||||||
// done in dllentry registerSerial3d();
|
// done in dllentry registerSerial3d();
|
||||||
// All the selected nodes are considered as a scene
|
// All the selected nodes are considered as a scene
|
||||||
if( nNumSelNode > 0 )
|
if( nNumSelNode > 0 )
|
||||||
{
|
{
|
||||||
std::vector<INode*> vectNode;
|
std::vector<INode*> vectNode;
|
||||||
theCNelExport.getSelectedNode (vectNode);
|
theCNelExport.getSelectedNode (vectNode);
|
||||||
nlassert (vectNode.size()!=0);
|
nlassert (vectNode.size()!=0);
|
||||||
|
@ -650,7 +668,7 @@ static INT_PTR CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LP
|
||||||
// Init the exporter
|
// Init the exporter
|
||||||
nlassert (theIP);
|
nlassert (theIP);
|
||||||
theCNelExport.init (false, true, theIP, true);
|
theCNelExport.init (false, true, theIP, true);
|
||||||
|
|
||||||
uint nNumSelNode = theCNelExport._Ip->GetSelNodeCount();
|
uint nNumSelNode = theCNelExport._Ip->GetSelNodeCount();
|
||||||
if (nNumSelNode!=1)
|
if (nNumSelNode!=1)
|
||||||
{
|
{
|
||||||
|
@ -679,13 +697,13 @@ static INT_PTR CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ID_TEST_INTERFACE_MESH:
|
case ID_TEST_INTERFACE_MESH:
|
||||||
{
|
{
|
||||||
nlassert (theIP);
|
nlassert (theIP);
|
||||||
theCNelExport.init (false, true, theIP, true);
|
theCNelExport.init (false, true, theIP, true);
|
||||||
// Get time
|
// Get time
|
||||||
TimeValue time = theCNelExport._Ip->GetTime();
|
TimeValue time = theCNelExport._Ip->GetTime();
|
||||||
|
|
||||||
// Get node count
|
// Get node count
|
||||||
uint nNumSelNode=theCNelExport._Ip->GetSelNodeCount();
|
uint nNumSelNode=theCNelExport._Ip->GetSelNodeCount();
|
||||||
|
|
||||||
|
@ -701,9 +719,9 @@ static INT_PTR CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LP
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
// create a mem displayer, that will receive errors
|
// create a mem displayer, that will receive errors
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// test all nodes
|
// test all nodes
|
||||||
for(std::vector<INode*>::iterator it = vectNode.begin(); it != vectNode.end(); ++it)
|
for(std::vector<INode*>::iterator it = vectNode.begin(); it != vectNode.end(); ++it)
|
||||||
{
|
{
|
||||||
|
@ -712,8 +730,8 @@ static INT_PTR CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LP
|
||||||
{
|
{
|
||||||
::MessageBox(NULL, _T("Unable to bind interface of mesh %s"), (*it)->GetName(), MB_OK | MB_ICONEXCLAMATION);
|
::MessageBox(NULL, _T("Unable to bind interface of mesh %s"), (*it)->GetName(), MB_OK | MB_ICONEXCLAMATION);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
theIP->RedrawViews(time);
|
theIP->RedrawViews(time);
|
||||||
}
|
}
|
||||||
catch(const std::exception &e)
|
catch(const std::exception &e)
|
||||||
|
@ -722,14 +740,14 @@ static INT_PTR CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case WM_LBUTTONDOWN:
|
case WM_LBUTTONDOWN:
|
||||||
case WM_LBUTTONUP:
|
case WM_LBUTTONUP:
|
||||||
case WM_MOUSEMOVE:
|
case WM_MOUSEMOVE:
|
||||||
theCNelExport._Ip->RollupMouseMessage(hWnd,msg,wParam,lParam);
|
theCNelExport._Ip->RollupMouseMessage(hWnd,msg,wParam,lParam);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -747,7 +765,7 @@ static INT_PTR CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LP
|
||||||
//--- CNelExport -------------------------------------------------------
|
//--- CNelExport -------------------------------------------------------
|
||||||
CNelExport::CNelExport() : _ErrorInDialog(true), _TerminateOnFileOpenIssues(false)
|
CNelExport::CNelExport() : _ErrorInDialog(true), _TerminateOnFileOpenIssues(false)
|
||||||
{
|
{
|
||||||
_Ip = NULL;
|
_Ip = NULL;
|
||||||
theHPanel = NULL;
|
theHPanel = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -756,7 +774,7 @@ CNelExport::~CNelExport()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNelExport::BeginEditParams(Interface *_Ip,IUtil *iu)
|
void CNelExport::BeginEditParams(Interface *_Ip,IUtil *iu)
|
||||||
{
|
{
|
||||||
theIP = _Ip;
|
theIP = _Ip;
|
||||||
if (_ExportNel)
|
if (_ExportNel)
|
||||||
|
@ -768,8 +786,8 @@ void CNelExport::BeginEditParams(Interface *_Ip,IUtil *iu)
|
||||||
theHBar = GetDlgItem(theHPanel,ID_BAR);
|
theHBar = GetDlgItem(theHPanel,ID_BAR);
|
||||||
SendMessage(theHBar,PBM_SETPOS,0,0);
|
SendMessage(theHBar,PBM_SETPOS,0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNelExport::EndEditParams(Interface *_Ip,IUtil *iu)
|
void CNelExport::EndEditParams(Interface *_Ip,IUtil *iu)
|
||||||
{
|
{
|
||||||
this->_Ip = NULL;
|
this->_Ip = NULL;
|
||||||
if (_ExportNel)
|
if (_ExportNel)
|
||||||
|
@ -813,7 +831,8 @@ void CNelExport::initOptions()
|
||||||
if( CFile::fileExists(sConfigFileName) )
|
if( CFile::fileExists(sConfigFileName) )
|
||||||
{
|
{
|
||||||
// Serial the configuration
|
// Serial the configuration
|
||||||
try {
|
try
|
||||||
|
{
|
||||||
CIFile inputFile;
|
CIFile inputFile;
|
||||||
if( inputFile.open(sConfigFileName) )
|
if( inputFile.open(sConfigFileName) )
|
||||||
{
|
{
|
||||||
|
@ -838,7 +857,7 @@ void CNelExport::init (bool view, bool errorInDialog, Interface *ip, bool loadSt
|
||||||
|
|
||||||
// Create a new nelexport
|
// Create a new nelexport
|
||||||
_Ip = ip;
|
_Ip = ip;
|
||||||
|
|
||||||
// Load the options
|
// Load the options
|
||||||
if (loadStruct)
|
if (loadStruct)
|
||||||
theCNelExport.initOptions();
|
theCNelExport.initOptions();
|
||||||
|
|
|
@ -338,8 +338,7 @@ static INT_PTR CALLBACK PickSetDlgProc(
|
||||||
Tab<TSTR*> &names = *((Tab < TSTR*>*)lParam);
|
Tab<TSTR*> &names = *((Tab < TSTR*>*)lParam);
|
||||||
for (int i = 0; i < names.Count(); i++)
|
for (int i = 0; i < names.Count(); i++)
|
||||||
{
|
{
|
||||||
int pos = SendDlgItemMessage(hWnd, IDC_NS_LIST, LB_ADDSTRING, 0,
|
int pos = SendDlgItemMessage(hWnd, IDC_NS_LIST, LB_ADDSTRING, 0, (LPARAM)(TCHAR*)*names[i]->ToMCHAR());
|
||||||
(LPARAM)(TCHAR*)*names[i]);
|
|
||||||
SendDlgItemMessage(hWnd, IDC_NS_LIST, LB_SETITEMDATA, pos, i);
|
SendDlgItemMessage(hWnd, IDC_NS_LIST, LB_SETITEMDATA, pos, i);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -71,18 +71,15 @@ void EditPatchMod::RefreshSelType()
|
||||||
*/
|
*/
|
||||||
if (selLevel == EP_PATCH)
|
if (selLevel == EP_PATCH)
|
||||||
{
|
{
|
||||||
hSurfPanel = ip->AddRollupPage(hInstance, MAKEINTRESOURCE(IDD_EDPATCH_SURF),
|
hSurfPanel = ip->AddRollupPage(hInstance, MAKEINTRESOURCE(IDD_EDPATCH_SURF), PatchSurfDlgProc, GetString(IDS_TH_SURFACEPROPERTIES), (LPARAM) this, rsSurf ? 0 : APPENDROLL_CLOSED);
|
||||||
PatchSurfDlgProc, GetString(IDS_TH_SURFACEPROPERTIES), (LPARAM) this, rsSurf ? 0 : APPENDROLL_CLOSED);
|
|
||||||
}
|
}
|
||||||
if (selLevel == EP_TILE)
|
if (selLevel == EP_TILE)
|
||||||
{
|
{
|
||||||
hTilePanel = ip->AddRollupPage(hInstance, MAKEINTRESOURCE(IDD_EDPATCH_TILE),
|
hTilePanel = ip->AddRollupPage(hInstance, MAKEINTRESOURCE(IDD_EDPATCH_TILE), PatchTileDlgProc, _M("Tile Properties"), (LPARAM) this, rsTile ? 0 : APPENDROLL_CLOSED);
|
||||||
PatchTileDlgProc, "Tile Properties", (LPARAM) this, rsTile ? 0 : APPENDROLL_CLOSED);
|
|
||||||
}
|
}
|
||||||
if (selLevel == EP_EDGE)
|
if (selLevel == EP_EDGE)
|
||||||
{
|
{
|
||||||
hEdgePanel = ip->AddRollupPage(hInstance, MAKEINTRESOURCE(IDD_EDPATCH_EDGE),
|
hEdgePanel = ip->AddRollupPage(hInstance, MAKEINTRESOURCE(IDD_EDPATCH_EDGE), PatchEdgeDlgProc, _M("Edge Properties"), (LPARAM) this, rsEdge ? 0 : APPENDROLL_CLOSED);
|
||||||
PatchEdgeDlgProc, "Edge Properties", (LPARAM) this, rsEdge ? 0 : APPENDROLL_CLOSED);
|
|
||||||
}
|
}
|
||||||
SetSurfDlgEnables();
|
SetSurfDlgEnables();
|
||||||
SetTileDlgEnables();
|
SetTileDlgEnables();
|
||||||
|
|
|
@ -160,8 +160,7 @@ void EditPatchMod::BeginEditParams(IObjParam *ip, ULONG flags, Animatable *prev)
|
||||||
*/
|
*/
|
||||||
if (selLevel == EP_PATCH)
|
if (selLevel == EP_PATCH)
|
||||||
{
|
{
|
||||||
hSurfPanel = ip->AddRollupPage(hInstance, MAKEINTRESOURCE(IDD_EDPATCH_SURF),
|
hSurfPanel = ip->AddRollupPage(hInstance, MAKEINTRESOURCE(IDD_EDPATCH_SURF), PatchSurfDlgProc, GetString(IDS_TH_SURFACEPROPERTIES), (LPARAM) this, rsSurf ? 0 : APPENDROLL_CLOSED);
|
||||||
PatchSurfDlgProc, GetString(IDS_TH_SURFACEPROPERTIES), (LPARAM) this, rsSurf ? 0 : APPENDROLL_CLOSED);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
hSurfPanel = NULL;
|
hSurfPanel = NULL;
|
||||||
|
|
Loading…
Reference in a new issue