Changed: Minor changes
--HG-- branch : develop
This commit is contained in:
parent
c744fc9acd
commit
3d3046ff97
6 changed files with 239 additions and 239 deletions
|
@ -33,13 +33,13 @@ INT_PTR CALLBACK SelectByMatDlgProc(
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
switch (LOWORD(wParam))
|
switch (LOWORD(wParam))
|
||||||
{
|
{
|
||||||
case IDOK:
|
case IDOK:
|
||||||
{
|
{
|
||||||
ISpinnerControl *spin = GetISpinner(GetDlgItem(hWnd, IDC_MAT_IDSPIN));
|
ISpinnerControl *spin = GetISpinner(GetDlgItem(hWnd, IDC_MAT_IDSPIN));
|
||||||
param[0] = spin->GetIVal();
|
param[0] = spin->GetIVal();
|
||||||
param[1] = IsDlgButtonChecked(hWnd, IDC_CLEARSELECTION);
|
param[1] = IsDlgButtonChecked(hWnd, IDC_CLEARSELECTION);
|
||||||
ReleaseISpinner(spin);
|
ReleaseISpinner(spin);
|
||||||
EndDialog(hWnd, 1);
|
EndDialog(hWnd, 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ INT_PTR CALLBACK SelectByMatDlgProc(
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
void SetSmoothButtonState(HWND hWnd, DWORD bits, DWORD invalid, DWORD unused = 0)
|
void SetSmoothButtonState(HWND hWnd, DWORD bits, DWORD invalid, DWORD unused = 0)
|
||||||
{
|
{
|
||||||
for (int i = IDC_SMOOTH_GRP1; i < IDC_SMOOTH_GRP1 + 32; i++)
|
for (int i = IDC_SMOOTH_GRP1; i < IDC_SMOOTH_GRP1 + 32; i++)
|
||||||
{
|
{
|
||||||
|
@ -71,7 +71,7 @@ void SetSmoothButtonState(HWND hWnd, DWORD bits, DWORD invalid, DWORD unused = 0
|
||||||
{
|
{
|
||||||
SetWindowText(GetDlgItem(hWnd, i), NULL);
|
SetWindowText(GetDlgItem(hWnd, i), NULL);
|
||||||
SendMessage(GetDlgItem(hWnd, i), CC_COMMAND, CC_CMD_SET_STATE, FALSE);
|
SendMessage(GetDlgItem(hWnd, i), CC_COMMAND, CC_CMD_SET_STATE, FALSE);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
TSTR buf;
|
TSTR buf;
|
||||||
buf.printf(_T("%d"), i - IDC_SMOOTH_GRP1 + 1);
|
buf.printf(_T("%d"), i - IDC_SMOOTH_GRP1 + 1);
|
||||||
|
@ -84,7 +84,7 @@ void SetSmoothButtonState(HWND hWnd, DWORD bits, DWORD invalid, DWORD unused = 0
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
INT_PTR CALLBACK SelectBySmoothDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
INT_PTR CALLBACK SelectBySmoothDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
static DWORD *param;
|
static DWORD *param;
|
||||||
switch (msg)
|
switch (msg)
|
||||||
|
@ -99,19 +99,19 @@ INT_PTR CALLBACK SelectBySmoothDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARA
|
||||||
CenterWindow(hWnd, GetParent(hWnd));
|
CenterWindow(hWnd, GetParent(hWnd));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
if (LOWORD(wParam) >= IDC_SMOOTH_GRP1 &&
|
if (LOWORD(wParam) >= IDC_SMOOTH_GRP1 &&
|
||||||
LOWORD(wParam) <= IDC_SMOOTH_GRP32)
|
LOWORD(wParam) <= IDC_SMOOTH_GRP32)
|
||||||
{
|
{
|
||||||
ICustButton *iBut = GetICustButton(GetDlgItem(hWnd, LOWORD(wParam)));
|
ICustButton *iBut = GetICustButton(GetDlgItem(hWnd, LOWORD(wParam)));
|
||||||
int shift = LOWORD(wParam) - IDC_SMOOTH_GRP1;
|
int shift = LOWORD(wParam) - IDC_SMOOTH_GRP1;
|
||||||
if (iBut->IsChecked())
|
if (iBut->IsChecked())
|
||||||
{
|
{
|
||||||
param[0] |= 1 << shift;
|
param[0] |= 1 << shift;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
param[0] &= ~(1 << shift);
|
param[0] &= ~(1 << shift);
|
||||||
}
|
}
|
||||||
ReleaseICustButton(iBut);
|
ReleaseICustButton(iBut);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -119,15 +119,15 @@ INT_PTR CALLBACK SelectBySmoothDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARA
|
||||||
switch (LOWORD(wParam))
|
switch (LOWORD(wParam))
|
||||||
{
|
{
|
||||||
case IDOK:
|
case IDOK:
|
||||||
param[1] = IsDlgButtonChecked(hWnd, IDC_CLEARSELECTION);
|
param[1] = IsDlgButtonChecked(hWnd, IDC_CLEARSELECTION);
|
||||||
EndDialog(hWnd, 1);
|
EndDialog(hWnd, 1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IDCANCEL:
|
case IDCANCEL:
|
||||||
EndDialog(hWnd, 0);
|
EndDialog(hWnd, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -142,10 +142,10 @@ INT_PTR CALLBACK PatchTileDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
EditPatchMod *ep =(EditPatchMod *)GetWindowLongPtr(hDlg, GWLP_USERDATA);
|
EditPatchMod *ep =(EditPatchMod *)GetWindowLongPtr(hDlg, GWLP_USERDATA);
|
||||||
if (!ep && message != WM_INITDIALOG)
|
if (!ep && message != WM_INITDIALOG)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
{
|
{
|
||||||
|
|
||||||
ep =(EditPatchMod *)lParam;
|
ep =(EditPatchMod *)lParam;
|
||||||
|
@ -169,16 +169,16 @@ INT_PTR CALLBACK PatchTileDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
ep->tileRot = NULL;
|
ep->tileRot = NULL;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
case CC_SPINNER_CHANGE:
|
case CC_SPINNER_CHANGE:
|
||||||
/*switch (LOWORD(wParam))
|
/*switch (LOWORD(wParam))
|
||||||
{
|
{
|
||||||
case IDC_TILE_MAT_SPIN:
|
case IDC_TILE_MAT_SPIN:
|
||||||
if (HIWORD(wParam))
|
if (HIWORD(wParam))
|
||||||
break; // No interactive action
|
break; // No interactive action
|
||||||
ep->SetTileNum (ep->tileNum->GetIVal());
|
ep->SetTileNum (ep->tileNum->GetIVal());
|
||||||
break;
|
break;
|
||||||
case IDC_TILE_ROT_SPIN:
|
case IDC_TILE_ROT_SPIN:
|
||||||
if (HIWORD(wParam))
|
if (HIWORD(wParam))
|
||||||
break; // No interactive action
|
break; // No interactive action
|
||||||
ep->SetTileRot (ep->tileRot->GetIVal());
|
ep->SetTileRot (ep->tileRot->GetIVal());
|
||||||
|
@ -208,8 +208,8 @@ INT_PTR CALLBACK PatchTileDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
if (u == 0xffffffff)
|
if (u == 0xffffffff)
|
||||||
{
|
{
|
||||||
ep->tileNum->SetIndeterminate(TRUE);
|
ep->tileNum->SetIndeterminate(TRUE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ep->tileNum->SetIndeterminate(FALSE);
|
ep->tileNum->SetIndeterminate(FALSE);
|
||||||
ep->tileNum->SetValue((int)u, FALSE);
|
ep->tileNum->SetValue((int)u, FALSE);
|
||||||
|
@ -220,13 +220,13 @@ INT_PTR CALLBACK PatchTileDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
if (v == -1)
|
if (v == -1)
|
||||||
{
|
{
|
||||||
ep->tileRot->SetIndeterminate(TRUE);
|
ep->tileRot->SetIndeterminate(TRUE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ep->tileRot->SetIndeterminate(FALSE);
|
ep->tileRot->SetIndeterminate(FALSE);
|
||||||
ep->tileRot->SetValue(v, FALSE);
|
ep->tileRot->SetValue(v, FALSE);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
ep->patchUIValid = TRUE;
|
ep->patchUIValid = TRUE;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -237,7 +237,7 @@ INT_PTR CALLBACK PatchTileDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
}*/
|
}*/
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -248,10 +248,10 @@ INT_PTR CALLBACK PatchEdgeDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
EditPatchMod *ep =(EditPatchMod *)GetWindowLongPtr(hDlg, GWLP_USERDATA);
|
EditPatchMod *ep =(EditPatchMod *)GetWindowLongPtr(hDlg, GWLP_USERDATA);
|
||||||
if (!ep && message != WM_INITDIALOG)
|
if (!ep && message != WM_INITDIALOG)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
{
|
{
|
||||||
|
|
||||||
ep =(EditPatchMod *)lParam;
|
ep =(EditPatchMod *)lParam;
|
||||||
|
@ -263,7 +263,7 @@ INT_PTR CALLBACK PatchEdgeDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
|
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
case WM_PAINT:
|
case WM_PAINT:
|
||||||
if (!ep->edgeUIValid)
|
if (!ep->edgeUIValid)
|
||||||
{
|
{
|
||||||
|
@ -294,7 +294,7 @@ INT_PTR CALLBACK PatchEdgeDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
|
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
switch (LOWORD(wParam))
|
switch (LOWORD(wParam))
|
||||||
{
|
{
|
||||||
case IDC_NO_SMOOTH:
|
case IDC_NO_SMOOTH:
|
||||||
// 3 states management
|
// 3 states management
|
||||||
if (IsDlgButtonChecked(hDlg, IDC_NO_SMOOTH)==BST_INDETERMINATE)
|
if (IsDlgButtonChecked(hDlg, IDC_NO_SMOOTH)==BST_INDETERMINATE)
|
||||||
|
@ -306,7 +306,7 @@ INT_PTR CALLBACK PatchEdgeDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -317,21 +317,21 @@ INT_PTR CALLBACK PatchSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
EditPatchMod *ep =(EditPatchMod *)GetWindowLongPtr(hDlg, GWLP_USERDATA);
|
EditPatchMod *ep =(EditPatchMod *)GetWindowLongPtr(hDlg, GWLP_USERDATA);
|
||||||
if (!ep && message != WM_INITDIALOG)
|
if (!ep && message != WM_INITDIALOG)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
{
|
{
|
||||||
ep = (EditPatchMod *)lParam;
|
ep = (EditPatchMod *)lParam;
|
||||||
ep->hSurfPanel = hDlg;
|
ep->hSurfPanel = hDlg;
|
||||||
|
|
||||||
for (int i = IDC_SMOOTH_GRP1; i < IDC_SMOOTH_GRP1 + 32; i++)
|
for (int i = IDC_SMOOTH_GRP1; i < IDC_SMOOTH_GRP1 + 32; i++)
|
||||||
SendMessage(GetDlgItem(hDlg, i), CC_COMMAND, CC_CMD_SET_TYPE, CBT_CHECK);
|
SendMessage(GetDlgItem(hDlg, i), CC_COMMAND, CC_CMD_SET_TYPE, CBT_CHECK);
|
||||||
SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)ep);
|
SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)ep);
|
||||||
ep->matSpin = SetupIntSpinner(hDlg, IDC_MAT_IDSPIN, IDC_MAT_ID, 1, MAX_MATID, 0);
|
ep->matSpin = SetupIntSpinner(hDlg, IDC_MAT_IDSPIN, IDC_MAT_ID, 1, MAX_MATID, 0);
|
||||||
ep->tessUSpin = SetupIntSpinner(hDlg, IDC_TESS_U_SPIN, IDC_TESS_U2, 1, 4, RPO_DEFAULT_TESSEL);
|
ep->tessUSpin = SetupIntSpinner(hDlg, IDC_TESS_U_SPIN, IDC_TESS_U2, 1, 4, RPO_DEFAULT_TESSEL);
|
||||||
ep->tessVSpin = SetupIntSpinner(hDlg, IDC_TESS_V_SPIN, IDC_TESS_V2, 1, 4, RPO_DEFAULT_TESSEL);
|
ep->tessVSpin = SetupIntSpinner(hDlg, IDC_TESS_V_SPIN, IDC_TESS_V2, 1, 4, RPO_DEFAULT_TESSEL);
|
||||||
|
|
||||||
ep->SetSurfDlgEnables();
|
ep->SetSurfDlgEnables();
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -354,17 +354,17 @@ INT_PTR CALLBACK PatchSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
ep->tessVSpin = NULL;
|
ep->tessVSpin = NULL;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
case CC_SPINNER_CHANGE:
|
case CC_SPINNER_CHANGE:
|
||||||
switch (LOWORD(wParam))
|
switch (LOWORD(wParam))
|
||||||
{
|
{
|
||||||
case IDC_MAT_IDSPIN:
|
case IDC_MAT_IDSPIN:
|
||||||
if (HIWORD(wParam))
|
if (HIWORD(wParam))
|
||||||
break; // No interactive action
|
break; // No interactive action
|
||||||
ep->SetSelMatIndex(ep->matSpin->GetIVal() - 1);
|
ep->SetSelMatIndex(ep->matSpin->GetIVal() - 1);
|
||||||
break;
|
break;
|
||||||
case IDC_TESS_U_SPIN:
|
case IDC_TESS_U_SPIN:
|
||||||
case IDC_TESS_V_SPIN:
|
case IDC_TESS_V_SPIN:
|
||||||
if (HIWORD(wParam))
|
if (HIWORD(wParam))
|
||||||
break; // No interactive action
|
break; // No interactive action
|
||||||
ep->SetSelTess(ep->tessUSpin->GetIVal(), ep->tessVSpin->GetIVal());
|
ep->SetSelTess(ep->tessUSpin->GetIVal(), ep->tessVSpin->GetIVal());
|
||||||
|
@ -379,8 +379,8 @@ INT_PTR CALLBACK PatchSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
ep->SetSelMatIndex(ep->matSpin->GetIVal() - 1);
|
ep->SetSelMatIndex(ep->matSpin->GetIVal() - 1);
|
||||||
ep->ip->RedrawViews(ep->ip->GetTime(), REDRAW_END);
|
ep->ip->RedrawViews(ep->ip->GetTime(), REDRAW_END);
|
||||||
break;
|
break;
|
||||||
case IDC_TESS_U_SPIN:
|
case IDC_TESS_U_SPIN:
|
||||||
case IDC_TESS_V_SPIN:
|
case IDC_TESS_V_SPIN:
|
||||||
ep->SetSelTess(ep->tessUSpin->GetIVal(), ep->tessVSpin->GetIVal());
|
ep->SetSelTess(ep->tessUSpin->GetIVal(), ep->tessVSpin->GetIVal());
|
||||||
ep->ip->RedrawViews(ep->ip->GetTime(), REDRAW_END);
|
ep->ip->RedrawViews(ep->ip->GetTime(), REDRAW_END);
|
||||||
break;
|
break;
|
||||||
|
@ -395,8 +395,8 @@ INT_PTR CALLBACK PatchSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
if (mat == -1)
|
if (mat == -1)
|
||||||
{
|
{
|
||||||
ep->matSpin->SetIndeterminate(TRUE);
|
ep->matSpin->SetIndeterminate(TRUE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ep->matSpin->SetIndeterminate(FALSE);
|
ep->matSpin->SetIndeterminate(FALSE);
|
||||||
ep->matSpin->SetValue(mat + 1, FALSE);
|
ep->matSpin->SetValue(mat + 1, FALSE);
|
||||||
|
@ -411,8 +411,8 @@ INT_PTR CALLBACK PatchSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
if (u == -1)
|
if (u == -1)
|
||||||
{
|
{
|
||||||
ep->tessUSpin->SetIndeterminate(TRUE);
|
ep->tessUSpin->SetIndeterminate(TRUE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ep->tessUSpin->SetIndeterminate(FALSE);
|
ep->tessUSpin->SetIndeterminate(FALSE);
|
||||||
ep->tessUSpin->SetValue(u, FALSE);
|
ep->tessUSpin->SetValue(u, FALSE);
|
||||||
|
@ -423,8 +423,8 @@ INT_PTR CALLBACK PatchSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
if (v == -1)
|
if (v == -1)
|
||||||
{
|
{
|
||||||
ep->tessVSpin->SetIndeterminate(TRUE);
|
ep->tessVSpin->SetIndeterminate(TRUE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ep->tessVSpin->SetIndeterminate(FALSE);
|
ep->tessVSpin->SetIndeterminate(FALSE);
|
||||||
ep->tessVSpin->SetValue(v, FALSE);
|
ep->tessVSpin->SetValue(v, FALSE);
|
||||||
|
@ -446,25 +446,25 @@ INT_PTR CALLBACK PatchSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
switch (LOWORD(wParam))
|
switch (LOWORD(wParam))
|
||||||
{
|
{
|
||||||
// Material
|
// Material
|
||||||
case IDC_SELECT_BYID:
|
case IDC_SELECT_BYID:
|
||||||
{
|
{
|
||||||
if (DialogBoxParam(
|
if (DialogBoxParam(
|
||||||
hInstance,
|
hInstance,
|
||||||
MAKEINTRESOURCE(IDD_SELECTBYMAT),
|
MAKEINTRESOURCE(IDD_SELECTBYMAT),
|
||||||
ep->ip->GetMAXHWnd(),
|
ep->ip->GetMAXHWnd(),
|
||||||
SelectByMatDlgProc,
|
SelectByMatDlgProc,
|
||||||
(LPARAM)sbmParams))
|
(LPARAM)sbmParams))
|
||||||
{
|
{
|
||||||
|
|
||||||
ep->SelectByMat(sbmParams[0] - 1/*index*/, sbmParams[1]/*clear*/);
|
ep->SelectByMat(sbmParams[0] - 1/*index*/, sbmParams[1]/*clear*/);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Smoothing groups
|
// Smoothing groups
|
||||||
case IDC_SELECTBYSMOOTH:
|
case IDC_SELECTBYSMOOTH:
|
||||||
{
|
{
|
||||||
sbsParams[2] = ~ep->GetUsedSmoothBits();
|
sbsParams[2] = ~ep->GetUsedSmoothBits();
|
||||||
if (DialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_EM_SELECTBYSMOOTH),
|
if (DialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_EM_SELECTBYSMOOTH),
|
||||||
ep->ip->GetMAXHWnd(), SelectBySmoothDlgProc, (LPARAM)sbsParams))
|
ep->ip->GetMAXHWnd(), SelectBySmoothDlgProc, (LPARAM)sbsParams))
|
||||||
|
@ -486,19 +486,19 @@ INT_PTR CALLBACK PatchSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
void EditPatchMod::SetSurfDlgEnables()
|
void EditPatchMod::SetSurfDlgEnables()
|
||||||
{
|
{
|
||||||
if (!hSurfPanel)
|
if (!hSurfPanel)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
nlassert(ip);
|
nlassert(ip);
|
||||||
|
|
||||||
BOOL oType =(GetSubobjectLevel() == EP_OBJECT) ? TRUE : FALSE;
|
BOOL oType =(GetSubobjectLevel() == EP_OBJECT) ? TRUE : FALSE;
|
||||||
BOOL pType =(GetSubobjectLevel() == EP_PATCH) ? TRUE : FALSE;
|
BOOL pType =(GetSubobjectLevel() == EP_PATCH) ? TRUE : FALSE;
|
||||||
|
|
||||||
|
@ -532,13 +532,13 @@ void EditPatchMod::SetSurfDlgEnables()
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
void EditPatchMod::SetTileDlgEnables()
|
void EditPatchMod::SetTileDlgEnables()
|
||||||
{
|
{
|
||||||
if (!hTilePanel)
|
if (!hTilePanel)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
nlassert(ip);
|
nlassert(ip);
|
||||||
|
|
||||||
BOOL oType =(GetSubobjectLevel() == EP_OBJECT) ? TRUE : FALSE;
|
BOOL oType =(GetSubobjectLevel() == EP_OBJECT) ? TRUE : FALSE;
|
||||||
BOOL pType =(GetSubobjectLevel() == EP_TILE) ? TRUE : FALSE;
|
BOOL pType =(GetSubobjectLevel() == EP_TILE) ? TRUE : FALSE;
|
||||||
|
|
||||||
|
@ -550,13 +550,13 @@ void EditPatchMod::SetTileDlgEnables()
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
void EditPatchMod::SetEdgeDlgEnables()
|
void EditPatchMod::SetEdgeDlgEnables()
|
||||||
{
|
{
|
||||||
if (!hEdgePanel)
|
if (!hEdgePanel)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
nlassert(ip);
|
nlassert(ip);
|
||||||
|
|
||||||
BOOL oType =(GetSubobjectLevel() == EP_OBJECT) ? TRUE : FALSE;
|
BOOL oType =(GetSubobjectLevel() == EP_OBJECT) ? TRUE : FALSE;
|
||||||
BOOL pType =(GetSubobjectLevel() == EP_TILE) ? TRUE : FALSE;
|
BOOL pType =(GetSubobjectLevel() == EP_TILE) ? TRUE : FALSE;
|
||||||
|
|
||||||
|
@ -573,14 +573,14 @@ DWORD EditPatchMod::GetSelSmoothBits(DWORD &invalid)
|
||||||
BOOL first = 1;
|
BOOL first = 1;
|
||||||
DWORD bits = 0;
|
DWORD bits = 0;
|
||||||
invalid = 0;
|
invalid = 0;
|
||||||
ModContextList mcList;
|
ModContextList mcList;
|
||||||
INodeTab nodes;
|
INodeTab nodes;
|
||||||
|
|
||||||
if (!ip)
|
if (!ip)
|
||||||
return 0;
|
return 0;
|
||||||
ip->GetModContexts(mcList, nodes);
|
ip->GetModContexts(mcList, nodes);
|
||||||
ClearPatchDataFlag(mcList, EPD_BEENDONE);
|
ClearPatchDataFlag(mcList, EPD_BEENDONE);
|
||||||
|
|
||||||
for (int i = 0; i < mcList.Count(); i++)
|
for (int i = 0; i < mcList.Count(); i++)
|
||||||
{
|
{
|
||||||
EditPatchData *patchData =(EditPatchData*)mcList[i]->localData;
|
EditPatchData *patchData =(EditPatchData*)mcList[i]->localData;
|
||||||
|
@ -601,8 +601,8 @@ DWORD EditPatchMod::GetSelSmoothBits(DWORD &invalid)
|
||||||
if (first)
|
if (first)
|
||||||
{
|
{
|
||||||
first = FALSE;
|
first = FALSE;
|
||||||
bits = patch->patches[j].smGroup;
|
bits = patch->patches[j].smGroup;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
if (patch->patches[j].smGroup != bits)
|
if (patch->patches[j].smGroup != bits)
|
||||||
{
|
{
|
||||||
|
@ -614,7 +614,7 @@ DWORD EditPatchMod::GetSelSmoothBits(DWORD &invalid)
|
||||||
|
|
||||||
patchData->SetFlag(EPD_BEENDONE, TRUE);
|
patchData->SetFlag(EPD_BEENDONE, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
nodes.DisposeTemporary();
|
nodes.DisposeTemporary();
|
||||||
return bits;
|
return bits;
|
||||||
}
|
}
|
||||||
|
@ -622,16 +622,16 @@ DWORD EditPatchMod::GetSelSmoothBits(DWORD &invalid)
|
||||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
DWORD EditPatchMod::GetUsedSmoothBits()
|
DWORD EditPatchMod::GetUsedSmoothBits()
|
||||||
{
|
{
|
||||||
DWORD bits = 0;
|
DWORD bits = 0;
|
||||||
ModContextList mcList;
|
ModContextList mcList;
|
||||||
INodeTab nodes;
|
INodeTab nodes;
|
||||||
|
|
||||||
if (!ip)
|
if (!ip)
|
||||||
return 0;
|
return 0;
|
||||||
ip->GetModContexts(mcList, nodes);
|
ip->GetModContexts(mcList, nodes);
|
||||||
ClearPatchDataFlag(mcList, EPD_BEENDONE);
|
ClearPatchDataFlag(mcList, EPD_BEENDONE);
|
||||||
|
|
||||||
for (int i = 0; i < mcList.Count(); i++)
|
for (int i = 0; i < mcList.Count(); i++)
|
||||||
{
|
{
|
||||||
EditPatchData *patchData =(EditPatchData*)mcList[i]->localData;
|
EditPatchData *patchData =(EditPatchData*)mcList[i]->localData;
|
||||||
|
@ -648,11 +648,11 @@ DWORD EditPatchMod::GetUsedSmoothBits()
|
||||||
for (int j = 0; j < patch->getNumPatches(); j++)
|
for (int j = 0; j < patch->getNumPatches(); j++)
|
||||||
{
|
{
|
||||||
bits |= patch->patches[j].smGroup;
|
bits |= patch->patches[j].smGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
patchData->SetFlag(EPD_BEENDONE, TRUE);
|
patchData->SetFlag(EPD_BEENDONE, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
nodes.DisposeTemporary();
|
nodes.DisposeTemporary();
|
||||||
return bits;
|
return bits;
|
||||||
}
|
}
|
||||||
|
@ -661,14 +661,14 @@ DWORD EditPatchMod::GetUsedSmoothBits()
|
||||||
|
|
||||||
void EditPatchMod::SelectBySmoothGroup(DWORD bits, BOOL clear)
|
void EditPatchMod::SelectBySmoothGroup(DWORD bits, BOOL clear)
|
||||||
{
|
{
|
||||||
ModContextList mcList;
|
ModContextList mcList;
|
||||||
INodeTab nodes;
|
INodeTab nodes;
|
||||||
|
|
||||||
if (!ip)
|
if (!ip)
|
||||||
return;
|
return;
|
||||||
ip->GetModContexts(mcList, nodes);
|
ip->GetModContexts(mcList, nodes);
|
||||||
ClearPatchDataFlag(mcList, EPD_BEENDONE);
|
ClearPatchDataFlag(mcList, EPD_BEENDONE);
|
||||||
|
|
||||||
theHold.Begin();
|
theHold.Begin();
|
||||||
|
|
||||||
for (int i = 0; i < mcList.Count(); i++)
|
for (int i = 0; i < mcList.Count(); i++)
|
||||||
|
@ -689,25 +689,25 @@ void EditPatchMod::SelectBySmoothGroup(DWORD bits, BOOL clear)
|
||||||
{
|
{
|
||||||
theHold.Put(new PatchSelRestore(patchData, this, patch));
|
theHold.Put(new PatchSelRestore(patchData, this, patch));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (clear)
|
if (clear)
|
||||||
patch->patchSel.ClearAll();
|
patch->patchSel.ClearAll();
|
||||||
for (int j = 0; j < patch->getNumPatches(); j++)
|
for (int j = 0; j < patch->getNumPatches(); j++)
|
||||||
{
|
{
|
||||||
if (patch->patches[j].smGroup & bits)
|
if (patch->patches[j].smGroup & bits)
|
||||||
{
|
{
|
||||||
patch->patchSel.Set(j);
|
patch->patchSel.Set(j);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
patchData->UpdateChanges(patch, rpatch, FALSE);
|
patchData->UpdateChanges(patch, rpatch, FALSE);
|
||||||
patchData->SetFlag(EPD_BEENDONE, TRUE);
|
patchData->SetFlag(EPD_BEENDONE, TRUE);
|
||||||
patchData->TempData(this)->Invalidate(PART_SELECT);
|
patchData->TempData(this)->Invalidate(PART_SELECT);
|
||||||
}
|
}
|
||||||
|
|
||||||
PatchSelChanged();
|
PatchSelChanged();
|
||||||
theHold.Accept(GetString(IDS_RB_SELECTBYSMOOTH));
|
theHold.Accept(GetString(IDS_RB_SELECTBYSMOOTH));
|
||||||
|
|
||||||
nodes.DisposeTemporary();
|
nodes.DisposeTemporary();
|
||||||
NotifyDependents(FOREVER, PART_SELECT, REFMSG_CHANGE);
|
NotifyDependents(FOREVER, PART_SELECT, REFMSG_CHANGE);
|
||||||
ip->RedrawViews(ip->GetTime());
|
ip->RedrawViews(ip->GetTime());
|
||||||
|
@ -717,14 +717,14 @@ void EditPatchMod::SelectBySmoothGroup(DWORD bits, BOOL clear)
|
||||||
|
|
||||||
void EditPatchMod::SetSelSmoothBits(DWORD bits, DWORD which)
|
void EditPatchMod::SetSelSmoothBits(DWORD bits, DWORD which)
|
||||||
{
|
{
|
||||||
ModContextList mcList;
|
ModContextList mcList;
|
||||||
INodeTab nodes;
|
INodeTab nodes;
|
||||||
|
|
||||||
if (!ip)
|
if (!ip)
|
||||||
return;
|
return;
|
||||||
ip->GetModContexts(mcList, nodes);
|
ip->GetModContexts(mcList, nodes);
|
||||||
ClearPatchDataFlag(mcList, EPD_BEENDONE);
|
ClearPatchDataFlag(mcList, EPD_BEENDONE);
|
||||||
|
|
||||||
theHold.Begin();
|
theHold.Begin();
|
||||||
|
|
||||||
for (int i = 0; i < mcList.Count(); i++)
|
for (int i = 0; i < mcList.Count(); i++)
|
||||||
|
@ -745,24 +745,24 @@ void EditPatchMod::SetSelSmoothBits(DWORD bits, DWORD which)
|
||||||
{
|
{
|
||||||
theHold.Put(new PatchSelRestore(patchData, this, patch));
|
theHold.Put(new PatchSelRestore(patchData, this, patch));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int j = 0; j < patch->getNumPatches(); j++)
|
for (int j = 0; j < patch->getNumPatches(); j++)
|
||||||
{
|
{
|
||||||
if (patch->patchSel[j])
|
if (patch->patchSel[j])
|
||||||
{
|
{
|
||||||
patch->patches[j].smGroup &= ~which;
|
patch->patches[j].smGroup &= ~which;
|
||||||
patch->patches[j].smGroup |= bits&which;
|
patch->patches[j].smGroup |= bits&which;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
patchData->UpdateChanges(patch, rpatch, FALSE);
|
patchData->UpdateChanges(patch, rpatch, FALSE);
|
||||||
patchData->SetFlag(EPD_BEENDONE, TRUE);
|
patchData->SetFlag(EPD_BEENDONE, TRUE);
|
||||||
patchData->TempData(this)->Invalidate(PART_SELECT);
|
patchData->TempData(this)->Invalidate(PART_SELECT);
|
||||||
}
|
}
|
||||||
|
|
||||||
PatchSelChanged();
|
PatchSelChanged();
|
||||||
theHold.Accept(GetString(IDS_RB_SETSMOOTHGROUP));
|
theHold.Accept(GetString(IDS_RB_SETSMOOTHGROUP));
|
||||||
|
|
||||||
nodes.DisposeTemporary();
|
nodes.DisposeTemporary();
|
||||||
NotifyDependents(FOREVER, PART_TOPO, REFMSG_CHANGE);
|
NotifyDependents(FOREVER, PART_TOPO, REFMSG_CHANGE);
|
||||||
InvalidateSurfaceUI();
|
InvalidateSurfaceUI();
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#define PROMPT_TIME 2000
|
#define PROMPT_TIME 2000
|
||||||
|
|
||||||
extern AdvParams sParams;
|
extern AdvParams sParams;
|
||||||
INT_PTR CALLBACK AdvParametersDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
INT_PTR CALLBACK AdvParametersDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ void EditPatchMod::SetTessUI(HWND hDlg, TessApprox *tess)
|
||||||
{
|
{
|
||||||
CheckDlgButton(hDlg, IDC_TILE_MODE, TRUE);
|
CheckDlgButton(hDlg, IDC_TILE_MODE, TRUE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CheckDlgButton(hDlg, IDC_TILE_MODE, FALSE);
|
CheckDlgButton(hDlg, IDC_TILE_MODE, FALSE);
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ void EditPatchMod::SetTessUI(HWND hDlg, TessApprox *tess)
|
||||||
EnableWindow (GetDlgItem (hDlg, IDC_STEPSSPINNER), !bCheck);
|
EnableWindow (GetDlgItem (hDlg, IDC_STEPSSPINNER), !bCheck);
|
||||||
EnableWindow (GetDlgItem (hDlg, IDC_STEPS_RENDER), !bCheck);
|
EnableWindow (GetDlgItem (hDlg, IDC_STEPS_RENDER), !bCheck);
|
||||||
EnableWindow (GetDlgItem (hDlg, IDC_STEPSRENDERSPINNER), !bCheck);
|
EnableWindow (GetDlgItem (hDlg, IDC_STEPSRENDERSPINNER), !bCheck);
|
||||||
|
|
||||||
// New
|
// New
|
||||||
EnableWindow (GetDlgItem (hDlg, IDC_TILESTEPS), bCheck);
|
EnableWindow (GetDlgItem (hDlg, IDC_TILESTEPS), bCheck);
|
||||||
EnableWindow (GetDlgItem (hDlg, IDC_TILESTEPSSPINNER), bCheck);
|
EnableWindow (GetDlgItem (hDlg, IDC_TILESTEPSSPINNER), bCheck);
|
||||||
|
@ -76,7 +76,7 @@ void EditPatchMod::SetTessUI(HWND hDlg, TessApprox *tess)
|
||||||
|
|
||||||
if (keepMapping)
|
if (keepMapping)
|
||||||
CheckDlgButton(hDlg, IDC_KEEP_MAPPING, TRUE);
|
CheckDlgButton(hDlg, IDC_KEEP_MAPPING, TRUE);
|
||||||
else
|
else
|
||||||
CheckDlgButton(hDlg, IDC_KEEP_MAPPING, FALSE);
|
CheckDlgButton(hDlg, IDC_KEEP_MAPPING, FALSE);
|
||||||
|
|
||||||
switch (tess->type)
|
switch (tess->type)
|
||||||
|
@ -166,13 +166,13 @@ void EditPatchMod::SetTessUI(HWND hDlg, TessApprox *tess)
|
||||||
EnableWindow(GetDlgItem(hDlg, IDC_TESS_NORMALS), !GetViewTessWeld());
|
EnableWindow(GetDlgItem(hDlg, IDC_TESS_NORMALS), !GetViewTessWeld());
|
||||||
EnableWindow(GetDlgItem(hDlg, IDC_WELDTESS), tess->merge > 0.0f);
|
EnableWindow(GetDlgItem(hDlg, IDC_WELDTESS), tess->merge > 0.0f);
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
if (settingDisp)
|
if (settingDisp)
|
||||||
{
|
{
|
||||||
ShowWindow(GetDlgItem(hDlg, IDC_MESH), SW_SHOW);
|
ShowWindow(GetDlgItem(hDlg, IDC_MESH), SW_SHOW);
|
||||||
ShowWindow(GetDlgItem(hDlg, IDC_DISP), SW_SHOW);
|
ShowWindow(GetDlgItem(hDlg, IDC_DISP), SW_SHOW);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
if (tess->type != TESS_SET)
|
if (tess->type != TESS_SET)
|
||||||
{
|
{
|
||||||
|
@ -202,7 +202,7 @@ void EditPatchMod::SetTessUI(HWND hDlg, TessApprox *tess)
|
||||||
CheckDlgButton(hDlg, IDC_TESS_RENDERER, FALSE);
|
CheckDlgButton(hDlg, IDC_TESS_RENDERER, FALSE);
|
||||||
CheckDlgButton(hDlg, IDC_TESS_NORMALS, GetViewTessNormals());
|
CheckDlgButton(hDlg, IDC_TESS_NORMALS, GetViewTessNormals());
|
||||||
CheckDlgButton(hDlg, IDC_WELDTESS, GetViewTessWeld());
|
CheckDlgButton(hDlg, IDC_WELDTESS, GetViewTessWeld());
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
CheckDlgButton(hDlg, IDC_TESS_VIEW, FALSE);
|
CheckDlgButton(hDlg, IDC_TESS_VIEW, FALSE);
|
||||||
CheckDlgButton(hDlg, IDC_TESS_RENDERER, TRUE);
|
CheckDlgButton(hDlg, IDC_TESS_RENDERER, TRUE);
|
||||||
|
@ -213,28 +213,28 @@ void EditPatchMod::SetTessUI(HWND hDlg, TessApprox *tess)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
EditPatchMod *ep =(EditPatchMod *)GetWindowLongPtr(hDlg, GWLP_USERDATA);
|
EditPatchMod *ep =(EditPatchMod *)GetWindowLongPtr(hDlg, GWLP_USERDATA);
|
||||||
if (!ep && message != WM_INITDIALOG)
|
if (!ep && message != WM_INITDIALOG)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
{
|
{
|
||||||
|
|
||||||
ep =(EditPatchMod *)lParam;
|
ep =(EditPatchMod *)lParam;
|
||||||
ep->hSurfPanel = hDlg;
|
ep->hSurfPanel = hDlg;
|
||||||
SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)ep);
|
SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)ep);
|
||||||
if (!ep->settingViewportTess && ep->settingDisp && ep->GetProdTess().type == TESS_SET)
|
if (!ep->settingViewportTess && ep->settingDisp && ep->GetProdTess().type == TESS_SET)
|
||||||
ep->settingDisp = FALSE;
|
ep->settingDisp = FALSE;
|
||||||
TessApprox t;
|
TessApprox t;
|
||||||
if (ep->settingViewportTess)
|
if (ep->settingViewportTess)
|
||||||
{
|
{
|
||||||
t = ep->GetViewTess();
|
t = ep->GetViewTess();
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
if (ep->settingDisp)
|
if (ep->settingDisp)
|
||||||
t = ep->GetDispTess();
|
t = ep->GetDispTess();
|
||||||
|
@ -286,14 +286,14 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
ep->mergeSpin = NULL;
|
ep->mergeSpin = NULL;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
case CC_SPINNER_BUTTONUP:
|
case CC_SPINNER_BUTTONUP:
|
||||||
{
|
{
|
||||||
TessApprox tess;
|
TessApprox tess;
|
||||||
if (ep->settingViewportTess)
|
if (ep->settingViewportTess)
|
||||||
{
|
{
|
||||||
tess = ep->GetViewTess();
|
tess = ep->GetViewTess();
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
if (ep->settingDisp)
|
if (ep->settingDisp)
|
||||||
tess = ep->GetDispTess();
|
tess = ep->GetDispTess();
|
||||||
|
@ -304,7 +304,7 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CC_SPINNER_CHANGE:
|
case CC_SPINNER_CHANGE:
|
||||||
switch (LOWORD(wParam))
|
switch (LOWORD(wParam))
|
||||||
{
|
{
|
||||||
case IDC_TESS_U_SPINNER:
|
case IDC_TESS_U_SPINNER:
|
||||||
|
@ -318,7 +318,7 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
if (ep->settingViewportTess)
|
if (ep->settingViewportTess)
|
||||||
{
|
{
|
||||||
tess = ep->GetViewTess();
|
tess = ep->GetViewTess();
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
if (ep->settingDisp)
|
if (ep->settingDisp)
|
||||||
tess = ep->GetDispTess();
|
tess = ep->GetDispTess();
|
||||||
|
@ -349,7 +349,7 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
if (ep->settingViewportTess)
|
if (ep->settingViewportTess)
|
||||||
{
|
{
|
||||||
ep->SetViewTess(tess);
|
ep->SetViewTess(tess);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
if (ep->settingDisp)
|
if (ep->settingDisp)
|
||||||
ep->SetDispTess(tess);
|
ep->SetDispTess(tess);
|
||||||
|
@ -365,9 +365,9 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
|
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
switch (LOWORD(wParam))
|
switch (LOWORD(wParam))
|
||||||
{
|
{
|
||||||
// Tessellation
|
// Tessellation
|
||||||
case IDC_TESS_VIEW:
|
case IDC_TESS_VIEW:
|
||||||
{
|
{
|
||||||
ep->settingViewportTess = TRUE;
|
ep->settingViewportTess = TRUE;
|
||||||
TessApprox t = ep->GetViewTess();
|
TessApprox t = ep->GetViewTess();
|
||||||
|
@ -375,14 +375,14 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
EnableWindow(GetDlgItem(hDlg, IDC_TESS_VIEW_DEP), FALSE); // always off here
|
EnableWindow(GetDlgItem(hDlg, IDC_TESS_VIEW_DEP), FALSE); // always off here
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case IDC_TESS_RENDERER:
|
case IDC_TESS_RENDERER:
|
||||||
{
|
{
|
||||||
ep->settingViewportTess = FALSE;
|
ep->settingViewportTess = FALSE;
|
||||||
if (ep->settingDisp)
|
if (ep->settingDisp)
|
||||||
{
|
{
|
||||||
TessApprox t = ep->GetDispTess();
|
TessApprox t = ep->GetDispTess();
|
||||||
ep->SetTessUI(hDlg, &t);
|
ep->SetTessUI(hDlg, &t);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
TessApprox t = ep->GetProdTess();
|
TessApprox t = ep->GetProdTess();
|
||||||
ep->SetTessUI(hDlg, &t);
|
ep->SetTessUI(hDlg, &t);
|
||||||
|
@ -401,13 +401,13 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
{
|
{
|
||||||
BOOL bCheck=(IsDlgButtonChecked(hDlg, IDC_TILE_MODE)==BST_CHECKED);
|
BOOL bCheck=(IsDlgButtonChecked(hDlg, IDC_TILE_MODE)==BST_CHECKED);
|
||||||
ep->SetTileMode (bCheck!=0);
|
ep->SetTileMode (bCheck!=0);
|
||||||
|
|
||||||
// Old
|
// Old
|
||||||
EnableWindow (GetDlgItem (hDlg, IDC_STEPS), !bCheck);
|
EnableWindow (GetDlgItem (hDlg, IDC_STEPS), !bCheck);
|
||||||
EnableWindow (GetDlgItem (hDlg, IDC_STEPSSPINNER), !bCheck);
|
EnableWindow (GetDlgItem (hDlg, IDC_STEPSSPINNER), !bCheck);
|
||||||
EnableWindow (GetDlgItem (hDlg, IDC_STEPS_RENDER), !bCheck);
|
EnableWindow (GetDlgItem (hDlg, IDC_STEPS_RENDER), !bCheck);
|
||||||
EnableWindow (GetDlgItem (hDlg, IDC_STEPSRENDERSPINNER), !bCheck);
|
EnableWindow (GetDlgItem (hDlg, IDC_STEPSRENDERSPINNER), !bCheck);
|
||||||
|
|
||||||
// New
|
// New
|
||||||
EnableWindow (GetDlgItem (hDlg, IDC_TILESTEPS), bCheck);
|
EnableWindow (GetDlgItem (hDlg, IDC_TILESTEPS), bCheck);
|
||||||
EnableWindow (GetDlgItem (hDlg, IDC_TILESTEPSSPINNER), bCheck);
|
EnableWindow (GetDlgItem (hDlg, IDC_TILESTEPSSPINNER), bCheck);
|
||||||
|
@ -435,7 +435,7 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
if (ep->settingViewportTess)
|
if (ep->settingViewportTess)
|
||||||
{
|
{
|
||||||
tess = ep->GetViewTess();
|
tess = ep->GetViewTess();
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
if (ep->settingDisp)
|
if (ep->settingDisp)
|
||||||
tess = ep->GetDispTess();
|
tess = ep->GetDispTess();
|
||||||
|
@ -476,7 +476,7 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
if (ep->settingViewportTess)
|
if (ep->settingViewportTess)
|
||||||
{
|
{
|
||||||
ep->SetViewTess(tess);
|
ep->SetViewTess(tess);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
if (ep->settingDisp)
|
if (ep->settingDisp)
|
||||||
ep->SetDispTess(tess);
|
ep->SetDispTess(tess);
|
||||||
|
@ -486,7 +486,7 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
ep->SetTessUI(hDlg, &tess);
|
ep->SetTessUI(hDlg, &tess);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case IDC_TESS_VIEW_DEP:
|
case IDC_TESS_VIEW_DEP:
|
||||||
{
|
{
|
||||||
TessApprox tess;
|
TessApprox tess;
|
||||||
tess = ep->GetProdTess();
|
tess = ep->GetProdTess();
|
||||||
|
@ -502,7 +502,7 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
{
|
{
|
||||||
ep->SetViewTessNormals(IsDlgButtonChecked(hDlg, IDC_TESS_NORMALS));
|
ep->SetViewTessNormals(IsDlgButtonChecked(hDlg, IDC_TESS_NORMALS));
|
||||||
ep->SetTessUI(hDlg, &ep->GetViewTess());
|
ep->SetTessUI(hDlg, &ep->GetViewTess());
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
ep->SetProdTessNormals(IsDlgButtonChecked(hDlg, IDC_TESS_NORMALS));
|
ep->SetProdTessNormals(IsDlgButtonChecked(hDlg, IDC_TESS_NORMALS));
|
||||||
if (ep->settingDisp)
|
if (ep->settingDisp)
|
||||||
|
@ -516,7 +516,7 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
{
|
{
|
||||||
ep->SetViewTessWeld(IsDlgButtonChecked(hDlg, IDC_WELDTESS));
|
ep->SetViewTessWeld(IsDlgButtonChecked(hDlg, IDC_WELDTESS));
|
||||||
ep->SetTessUI(hDlg, &ep->GetViewTess());
|
ep->SetTessUI(hDlg, &ep->GetViewTess());
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
ep->SetProdTessWeld(IsDlgButtonChecked(hDlg, IDC_WELDTESS));
|
ep->SetProdTessWeld(IsDlgButtonChecked(hDlg, IDC_WELDTESS));
|
||||||
if (ep->settingDisp)
|
if (ep->settingDisp)
|
||||||
|
@ -525,13 +525,13 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
ep->SetTessUI(hDlg, &ep->GetProdTess());
|
ep->SetTessUI(hDlg, &ep->GetProdTess());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case IDC_ADVANCED_PARAMETERS:
|
case IDC_ADVANCED_PARAMETERS:
|
||||||
{
|
{
|
||||||
TessApprox tess;
|
TessApprox tess;
|
||||||
if (ep->settingViewportTess)
|
if (ep->settingViewportTess)
|
||||||
{
|
{
|
||||||
tess = ep->GetViewTess();
|
tess = ep->GetViewTess();
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
if (ep->settingDisp)
|
if (ep->settingDisp)
|
||||||
tess = ep->GetDispTess();
|
tess = ep->GetDispTess();
|
||||||
|
@ -557,7 +557,7 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
if (MessageBox(hDlg, warning, title,
|
if (MessageBox(hDlg, warning, title,
|
||||||
MB_YESNO | MB_ICONWARNING | MB_DEFBUTTON2) == IDYES)
|
MB_YESNO | MB_ICONWARNING | MB_DEFBUTTON2) == IDYES)
|
||||||
confirm = TRUE;
|
confirm = TRUE;
|
||||||
|
|
||||||
} else
|
} else
|
||||||
confirm = TRUE;
|
confirm = TRUE;
|
||||||
if (confirm)
|
if (confirm)
|
||||||
|
@ -570,7 +570,7 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
if (ep->settingViewportTess)
|
if (ep->settingViewportTess)
|
||||||
{
|
{
|
||||||
ep->SetViewTess(tess);
|
ep->SetViewTess(tess);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
if (ep->settingDisp)
|
if (ep->settingDisp)
|
||||||
ep->SetDispTess(tess);
|
ep->SetDispTess(tess);
|
||||||
|
@ -584,8 +584,8 @@ BOOL CALLBACK PatchObjSurfDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -602,7 +602,7 @@ AdvParametersDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
switch (uMsg)
|
switch (uMsg)
|
||||||
{
|
{
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
{
|
{
|
||||||
initing = TRUE;
|
initing = TRUE;
|
||||||
CenterWindow(hDlg, GetCOREInterface()->GetMAXHWnd());
|
CenterWindow(hDlg, GetCOREInterface()->GetMAXHWnd());
|
||||||
|
@ -628,7 +628,7 @@ AdvParametersDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
CheckDlgButton(hDlg, IDC_DELAUNAY, TRUE);
|
CheckDlgButton(hDlg, IDC_DELAUNAY, TRUE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
|
@ -706,27 +706,27 @@ AdvParametersDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
void EditPatchMod::SetViewTess(TessApprox &tess)
|
void EditPatchMod::SetViewTess(TessApprox &tess)
|
||||||
{
|
{
|
||||||
viewTess = tess;
|
viewTess = tess;
|
||||||
ModContextList mcList;
|
ModContextList mcList;
|
||||||
INodeTab nodes;
|
INodeTab nodes;
|
||||||
|
|
||||||
if (!ip)
|
if (!ip)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ip->GetModContexts(mcList, nodes);
|
ip->GetModContexts(mcList, nodes);
|
||||||
|
|
||||||
for (int i = 0; i < mcList.Count(); i++)
|
for (int i = 0; i < mcList.Count(); i++)
|
||||||
{
|
{
|
||||||
EditPatchData *patchData =(EditPatchData*)mcList[i]->localData;
|
EditPatchData *patchData =(EditPatchData*)mcList[i]->localData;
|
||||||
if (!patchData)
|
if (!patchData)
|
||||||
continue;
|
continue;
|
||||||
RPatchMesh *rpatch;
|
RPatchMesh *rpatch;
|
||||||
PatchMesh *patch = patchData->TempData(this)->GetPatch(ip->GetTime(),rpatch);
|
PatchMesh *patch = patchData->TempData(this)->GetPatch(ip->GetTime(),rpatch);
|
||||||
if (!patch)
|
if (!patch)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
patch->SetViewTess(tess);
|
patch->SetViewTess(tess);
|
||||||
patchData->viewTess = tess;
|
patchData->viewTess = tess;
|
||||||
//rpatch->rTess = rTess;
|
//rpatch->rTess = rTess;
|
||||||
|
@ -742,27 +742,27 @@ void EditPatchMod::SetViewTess(TessApprox &tess)
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
void EditPatchMod::SetProdTess(TessApprox &tess)
|
void EditPatchMod::SetProdTess(TessApprox &tess)
|
||||||
{
|
{
|
||||||
prodTess = tess;
|
prodTess = tess;
|
||||||
ModContextList mcList;
|
ModContextList mcList;
|
||||||
INodeTab nodes;
|
INodeTab nodes;
|
||||||
|
|
||||||
if (!ip)
|
if (!ip)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ip->GetModContexts(mcList, nodes);
|
ip->GetModContexts(mcList, nodes);
|
||||||
|
|
||||||
for (int i = 0; i < mcList.Count(); i++)
|
for (int i = 0; i < mcList.Count(); i++)
|
||||||
{
|
{
|
||||||
EditPatchData *patchData =(EditPatchData*)mcList[i]->localData;
|
EditPatchData *patchData =(EditPatchData*)mcList[i]->localData;
|
||||||
if (!patchData)
|
if (!patchData)
|
||||||
continue;
|
continue;
|
||||||
RPatchMesh *rpatch;
|
RPatchMesh *rpatch;
|
||||||
PatchMesh *patch = patchData->TempData(this)->GetPatch(ip->GetTime(),rpatch);
|
PatchMesh *patch = patchData->TempData(this)->GetPatch(ip->GetTime(),rpatch);
|
||||||
if (!patch)
|
if (!patch)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
patch->SetProdTess(tess);
|
patch->SetProdTess(tess);
|
||||||
patchData->prodTess = tess;
|
patchData->prodTess = tess;
|
||||||
if (patchData->tempData)
|
if (patchData->tempData)
|
||||||
|
@ -777,27 +777,27 @@ void EditPatchMod::SetProdTess(TessApprox &tess)
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
void EditPatchMod::SetDispTess(TessApprox &tess)
|
void EditPatchMod::SetDispTess(TessApprox &tess)
|
||||||
{
|
{
|
||||||
dispTess = tess;
|
dispTess = tess;
|
||||||
ModContextList mcList;
|
ModContextList mcList;
|
||||||
INodeTab nodes;
|
INodeTab nodes;
|
||||||
|
|
||||||
if (!ip)
|
if (!ip)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ip->GetModContexts(mcList, nodes);
|
ip->GetModContexts(mcList, nodes);
|
||||||
|
|
||||||
for (int i = 0; i < mcList.Count(); i++)
|
for (int i = 0; i < mcList.Count(); i++)
|
||||||
{
|
{
|
||||||
EditPatchData *patchData =(EditPatchData*)mcList[i]->localData;
|
EditPatchData *patchData =(EditPatchData*)mcList[i]->localData;
|
||||||
if (!patchData)
|
if (!patchData)
|
||||||
continue;
|
continue;
|
||||||
RPatchMesh *rpatch;
|
RPatchMesh *rpatch;
|
||||||
PatchMesh *patch = patchData->TempData(this)->GetPatch(ip->GetTime(),rpatch);
|
PatchMesh *patch = patchData->TempData(this)->GetPatch(ip->GetTime(),rpatch);
|
||||||
if (!patch)
|
if (!patch)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
patch->SetDispTess(tess);
|
patch->SetDispTess(tess);
|
||||||
patchData->dispTess = tess;
|
patchData->dispTess = tess;
|
||||||
if (patchData->tempData)
|
if (patchData->tempData)
|
||||||
|
@ -812,27 +812,27 @@ void EditPatchMod::SetDispTess(TessApprox &tess)
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
void EditPatchMod::SetViewTessNormals(BOOL use)
|
void EditPatchMod::SetViewTessNormals(BOOL use)
|
||||||
{
|
{
|
||||||
mViewTessNormals = use;
|
mViewTessNormals = use;
|
||||||
ModContextList mcList;
|
ModContextList mcList;
|
||||||
INodeTab nodes;
|
INodeTab nodes;
|
||||||
|
|
||||||
if (!ip)
|
if (!ip)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ip->GetModContexts(mcList, nodes);
|
ip->GetModContexts(mcList, nodes);
|
||||||
|
|
||||||
for (int i = 0; i < mcList.Count(); i++)
|
for (int i = 0; i < mcList.Count(); i++)
|
||||||
{
|
{
|
||||||
EditPatchData *patchData =(EditPatchData*)mcList[i]->localData;
|
EditPatchData *patchData =(EditPatchData*)mcList[i]->localData;
|
||||||
if (!patchData)
|
if (!patchData)
|
||||||
continue;
|
continue;
|
||||||
RPatchMesh *rpatch;
|
RPatchMesh *rpatch;
|
||||||
PatchMesh *patch = patchData->TempData(this)->GetPatch(ip->GetTime(),rpatch);
|
PatchMesh *patch = patchData->TempData(this)->GetPatch(ip->GetTime(),rpatch);
|
||||||
if (!patch)
|
if (!patch)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
patch->SetViewTessNormals(use);
|
patch->SetViewTessNormals(use);
|
||||||
patchData->mViewTessNormals = use;
|
patchData->mViewTessNormals = use;
|
||||||
if (patchData->tempData)
|
if (patchData->tempData)
|
||||||
|
@ -847,27 +847,27 @@ void EditPatchMod::SetViewTessNormals(BOOL use)
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
void EditPatchMod::SetProdTessNormals(BOOL use)
|
void EditPatchMod::SetProdTessNormals(BOOL use)
|
||||||
{
|
{
|
||||||
mProdTessNormals = use;
|
mProdTessNormals = use;
|
||||||
ModContextList mcList;
|
ModContextList mcList;
|
||||||
INodeTab nodes;
|
INodeTab nodes;
|
||||||
|
|
||||||
if (!ip)
|
if (!ip)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ip->GetModContexts(mcList, nodes);
|
ip->GetModContexts(mcList, nodes);
|
||||||
|
|
||||||
for (int i = 0; i < mcList.Count(); i++)
|
for (int i = 0; i < mcList.Count(); i++)
|
||||||
{
|
{
|
||||||
EditPatchData *patchData =(EditPatchData*)mcList[i]->localData;
|
EditPatchData *patchData =(EditPatchData*)mcList[i]->localData;
|
||||||
if (!patchData)
|
if (!patchData)
|
||||||
continue;
|
continue;
|
||||||
RPatchMesh *rpatch;
|
RPatchMesh *rpatch;
|
||||||
PatchMesh *patch = patchData->TempData(this)->GetPatch(ip->GetTime(),rpatch);
|
PatchMesh *patch = patchData->TempData(this)->GetPatch(ip->GetTime(),rpatch);
|
||||||
if (!patch)
|
if (!patch)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
patch->SetProdTessNormals(use);
|
patch->SetProdTessNormals(use);
|
||||||
patchData->mProdTessNormals = use;
|
patchData->mProdTessNormals = use;
|
||||||
if (patchData->tempData)
|
if (patchData->tempData)
|
||||||
|
@ -882,27 +882,27 @@ void EditPatchMod::SetProdTessNormals(BOOL use)
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
void EditPatchMod::SetViewTessWeld(BOOL weld)
|
void EditPatchMod::SetViewTessWeld(BOOL weld)
|
||||||
{
|
{
|
||||||
mViewTessWeld = weld;
|
mViewTessWeld = weld;
|
||||||
ModContextList mcList;
|
ModContextList mcList;
|
||||||
INodeTab nodes;
|
INodeTab nodes;
|
||||||
|
|
||||||
if (!ip)
|
if (!ip)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ip->GetModContexts(mcList, nodes);
|
ip->GetModContexts(mcList, nodes);
|
||||||
|
|
||||||
for (int i = 0; i < mcList.Count(); i++)
|
for (int i = 0; i < mcList.Count(); i++)
|
||||||
{
|
{
|
||||||
EditPatchData *patchData =(EditPatchData*)mcList[i]->localData;
|
EditPatchData *patchData =(EditPatchData*)mcList[i]->localData;
|
||||||
if (!patchData)
|
if (!patchData)
|
||||||
continue;
|
continue;
|
||||||
RPatchMesh *rpatch;
|
RPatchMesh *rpatch;
|
||||||
PatchMesh *patch = patchData->TempData(this)->GetPatch(ip->GetTime(),rpatch);
|
PatchMesh *patch = patchData->TempData(this)->GetPatch(ip->GetTime(),rpatch);
|
||||||
if (!patch)
|
if (!patch)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
patch->SetViewTessWeld(weld);
|
patch->SetViewTessWeld(weld);
|
||||||
patchData->mViewTessWeld = weld;
|
patchData->mViewTessWeld = weld;
|
||||||
if (patchData->tempData)
|
if (patchData->tempData)
|
||||||
|
@ -917,27 +917,27 @@ void EditPatchMod::SetViewTessWeld(BOOL weld)
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
void EditPatchMod::SetProdTessWeld(BOOL weld)
|
void EditPatchMod::SetProdTessWeld(BOOL weld)
|
||||||
{
|
{
|
||||||
mProdTessWeld = weld;
|
mProdTessWeld = weld;
|
||||||
ModContextList mcList;
|
ModContextList mcList;
|
||||||
INodeTab nodes;
|
INodeTab nodes;
|
||||||
|
|
||||||
if (!ip)
|
if (!ip)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ip->GetModContexts(mcList, nodes);
|
ip->GetModContexts(mcList, nodes);
|
||||||
|
|
||||||
for (int i = 0; i < mcList.Count(); i++)
|
for (int i = 0; i < mcList.Count(); i++)
|
||||||
{
|
{
|
||||||
EditPatchData *patchData =(EditPatchData*)mcList[i]->localData;
|
EditPatchData *patchData =(EditPatchData*)mcList[i]->localData;
|
||||||
if (!patchData)
|
if (!patchData)
|
||||||
continue;
|
continue;
|
||||||
RPatchMesh *rpatch;
|
RPatchMesh *rpatch;
|
||||||
PatchMesh *patch = patchData->TempData(this)->GetPatch(ip->GetTime(),rpatch);
|
PatchMesh *patch = patchData->TempData(this)->GetPatch(ip->GetTime(),rpatch);
|
||||||
if (!patch)
|
if (!patch)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
patch->SetProdTessWeld(weld);
|
patch->SetProdTessWeld(weld);
|
||||||
patchData->mProdTessWeld = weld;
|
patchData->mProdTessWeld = weld;
|
||||||
if (patchData->tempData)
|
if (patchData->tempData)
|
||||||
|
|
|
@ -26,7 +26,7 @@ int controlsInit = FALSE;
|
||||||
using namespace NLMISC;
|
using namespace NLMISC;
|
||||||
|
|
||||||
/** public functions **/
|
/** public functions **/
|
||||||
BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
|
BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
|
||||||
{
|
{
|
||||||
// initialize nel context
|
// initialize nel context
|
||||||
if (!NLMISC::INelContext::isContextInitialised())
|
if (!NLMISC::INelContext::isContextInitialised())
|
||||||
|
@ -40,11 +40,11 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
|
||||||
{
|
{
|
||||||
hInstance = hinstDLL;
|
hInstance = hinstDLL;
|
||||||
DisableThreadLibraryCalls(hInstance);
|
DisableThreadLibraryCalls(hInstance);
|
||||||
|
|
||||||
if (!controlsInit)
|
if (!controlsInit)
|
||||||
{
|
{
|
||||||
controlsInit = TRUE;
|
controlsInit = TRUE;
|
||||||
|
|
||||||
// jaguar controls
|
// jaguar controls
|
||||||
#if MAX_VERSION_MAJOR < 14
|
#if MAX_VERSION_MAJOR < 14
|
||||||
InitCustomControls(hInstance);
|
InitCustomControls(hInstance);
|
||||||
|
@ -55,12 +55,12 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
|
||||||
Ctl3dRegister(hinstDLL);
|
Ctl3dRegister(hinstDLL);
|
||||||
Ctl3dAutoSubclass(hinstDLL);
|
Ctl3dAutoSubclass(hinstDLL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// initialize Chicago controls
|
// initialize Chicago controls
|
||||||
InitCommonControls();
|
InitCommonControls();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,20 +68,20 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
|
||||||
//------------------------------------------------------
|
//------------------------------------------------------
|
||||||
// This is the interface to Jaguar:
|
// This is the interface to Jaguar:
|
||||||
//------------------------------------------------------
|
//------------------------------------------------------
|
||||||
__declspec( dllexport ) const TCHAR *LibDescription()
|
__declspec( dllexport ) const TCHAR *LibDescription()
|
||||||
{
|
{
|
||||||
return _T("NeL Patch Edit");
|
return _T("NeL Patch Edit");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// MUST CHANGE THIS NUMBER WHEN ADD NEW CLASS
|
/// MUST CHANGE THIS NUMBER WHEN ADD NEW CLASS
|
||||||
__declspec( dllexport ) int LibNumberClasses()
|
__declspec( dllexport ) int LibNumberClasses()
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
__declspec( dllexport ) ClassDesc *LibClassDesc(int i)
|
__declspec( dllexport ) ClassDesc *LibClassDesc(int i)
|
||||||
{
|
{
|
||||||
switch(i)
|
switch(i)
|
||||||
{
|
{
|
||||||
case 0: return GetEditPatchModDesc();
|
case 0: return GetEditPatchModDesc();
|
||||||
default: return NULL;
|
default: return NULL;
|
||||||
|
@ -90,7 +90,7 @@ __declspec( dllexport ) ClassDesc *LibClassDesc(int i)
|
||||||
|
|
||||||
// Return version so can detect obsolete DLLs
|
// Return version so can detect obsolete DLLs
|
||||||
__declspec( dllexport ) ULONG LibVersion()
|
__declspec( dllexport ) ULONG LibVersion()
|
||||||
{
|
{
|
||||||
return VERSION_3DSMAX;
|
return VERSION_3DSMAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ BOOL filterVerts = TRUE;
|
||||||
static BOOL filterVecs = TRUE;
|
static BOOL filterVecs = TRUE;
|
||||||
|
|
||||||
|
|
||||||
static void SetVertFilter()
|
static void SetVertFilter()
|
||||||
{
|
{
|
||||||
patchHitLevel[EP_VERTEX] =(filterVerts ? SUBHIT_PATCH_VERTS : 0) |(filterVecs ? SUBHIT_PATCH_VECS : 0);
|
patchHitLevel[EP_VERTEX] =(filterVerts ? SUBHIT_PATCH_VERTS : 0) |(filterVecs ? SUBHIT_PATCH_VECS : 0);
|
||||||
}
|
}
|
||||||
|
@ -40,10 +40,10 @@ INT_PTR CALLBACK PatchSelectDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPAR
|
||||||
ICustToolbar *iToolbar;
|
ICustToolbar *iToolbar;
|
||||||
if (!ep && message != WM_INITDIALOG)
|
if (!ep && message != WM_INITDIALOG)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
{
|
{
|
||||||
// Get the module path
|
// Get the module path
|
||||||
HMODULE hModule = hInstance;
|
HMODULE hModule = hInstance;
|
||||||
|
@ -75,9 +75,9 @@ INT_PTR CALLBACK PatchSelectDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPAR
|
||||||
// Setup version number
|
// Setup version number
|
||||||
TCHAR version[512];
|
TCHAR version[512];
|
||||||
_stprintf(version, _T("Version %d.%d.%d.%d"),
|
_stprintf(version, _T("Version %d.%d.%d.%d"),
|
||||||
info->dwFileVersionMS>>16,
|
info->dwFileVersionMS>>16,
|
||||||
info->dwFileVersionMS&0xffff,
|
info->dwFileVersionMS&0xffff,
|
||||||
info->dwFileVersionLS>>16,
|
info->dwFileVersionLS>>16,
|
||||||
info->dwFileVersionLS&0xffff);
|
info->dwFileVersionLS&0xffff);
|
||||||
SetWindowText (GetDlgItem (hDlg, IDC_VERSION), version);
|
SetWindowText (GetDlgItem (hDlg, IDC_VERSION), version);
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,7 @@ INT_PTR CALLBACK PatchSelectDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPAR
|
||||||
|
|
||||||
ep =(EditPatchMod *)lParam;
|
ep =(EditPatchMod *)lParam;
|
||||||
ep->hSelectPanel = hDlg;
|
ep->hSelectPanel = hDlg;
|
||||||
SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)ep);
|
SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)ep);
|
||||||
// Set up the editing level selector
|
// Set up the editing level selector
|
||||||
LoadImages();
|
LoadImages();
|
||||||
iToolbar = GetICustToolbar(GetDlgItem(hDlg, IDC_SELTYPE));
|
iToolbar = GetICustToolbar(GetDlgItem(hDlg, IDC_SELTYPE));
|
||||||
|
@ -137,7 +137,7 @@ INT_PTR CALLBACK PatchSelectDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPAR
|
||||||
{
|
{
|
||||||
BOOL needRedraw = FALSE;
|
BOOL needRedraw = FALSE;
|
||||||
switch (LOWORD(wParam))
|
switch (LOWORD(wParam))
|
||||||
{
|
{
|
||||||
case EP_VERTEX:
|
case EP_VERTEX:
|
||||||
if (ep->GetSubobjectLevel() == EP_VERTEX)
|
if (ep->GetSubobjectLevel() == EP_VERTEX)
|
||||||
ep->ip->SetSubObjectLevel(PO_OBJECT);
|
ep->ip->SetSubObjectLevel(PO_OBJECT);
|
||||||
|
@ -205,7 +205,7 @@ INT_PTR CALLBACK PatchSelectDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPAR
|
||||||
if (((LPNMHDR)lParam)->code == TTN_NEEDTEXT)
|
if (((LPNMHDR)lParam)->code == TTN_NEEDTEXT)
|
||||||
{
|
{
|
||||||
LPTOOLTIPTEXT lpttt;
|
LPTOOLTIPTEXT lpttt;
|
||||||
lpttt =(LPTOOLTIPTEXT)lParam;
|
lpttt =(LPTOOLTIPTEXT)lParam;
|
||||||
switch (lpttt->hdr.idFrom)
|
switch (lpttt->hdr.idFrom)
|
||||||
{
|
{
|
||||||
case EP_VERTEX:
|
case EP_VERTEX:
|
||||||
|
@ -225,19 +225,19 @@ INT_PTR CALLBACK PatchSelectDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPAR
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
void EditPatchMod::SetOpsDlgEnables()
|
void EditPatchMod::SetOpsDlgEnables()
|
||||||
{
|
{
|
||||||
if (!hOpsPanel)
|
if (!hOpsPanel)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
nlassert(ip);
|
nlassert(ip);
|
||||||
|
|
||||||
// Disconnect right-click and delete mechanisms
|
// Disconnect right-click and delete mechanisms
|
||||||
ip->GetRightClickMenuManager()->Unregister(&pMenu);
|
ip->GetRightClickMenuManager()->Unregister(&pMenu);
|
||||||
ip->UnRegisterDeleteUser(&pDel);
|
ip->UnRegisterDeleteUser(&pDel);
|
||||||
|
@ -333,7 +333,7 @@ void EditPatchMod::SetOpsDlgEnables()
|
||||||
|
|
||||||
// Enable/disable right-click and delete mechanisms
|
// Enable/disable right-click and delete mechanisms
|
||||||
if (!oType)
|
if (!oType)
|
||||||
{
|
{
|
||||||
pMenu.SetMod(this);
|
pMenu.SetMod(this);
|
||||||
ip->GetRightClickMenuManager()->Register(&pMenu);
|
ip->GetRightClickMenuManager()->Register(&pMenu);
|
||||||
pDel.SetMod(this);
|
pDel.SetMod(this);
|
||||||
|
@ -349,19 +349,19 @@ INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
if (!ep && message != WM_INITDIALOG)
|
if (!ep && message != WM_INITDIALOG)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
|
||||||
ISpinnerControl *spin;
|
ISpinnerControl *spin;
|
||||||
ICustButton *ebut;
|
ICustButton *ebut;
|
||||||
|
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
{
|
{
|
||||||
ep =(EditPatchMod *)lParam;
|
ep =(EditPatchMod *)lParam;
|
||||||
ep->hOpsPanel = hDlg;
|
ep->hOpsPanel = hDlg;
|
||||||
for (int i = IDC_SMOOTH_GRP1; i < IDC_SMOOTH_GRP1 + 32; i++)
|
for (int i = IDC_SMOOTH_GRP1; i < IDC_SMOOTH_GRP1 + 32; i++)
|
||||||
SendMessage(GetDlgItem(hDlg, i), CC_COMMAND, CC_CMD_SET_TYPE, CBT_CHECK);
|
SendMessage(GetDlgItem(hDlg, i), CC_COMMAND, CC_CMD_SET_TYPE, CBT_CHECK);
|
||||||
SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)ep);
|
SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)ep);
|
||||||
ICustButton *but = GetICustButton(GetDlgItem(hDlg, IDC_ATTACH));
|
ICustButton *but = GetICustButton(GetDlgItem(hDlg, IDC_ATTACH));
|
||||||
but->SetHighlightColor(GREEN_WASH);
|
but->SetHighlightColor(GREEN_WASH);
|
||||||
but->SetType(CBT_CHECK);
|
but->SetType(CBT_CHECK);
|
||||||
|
@ -401,12 +401,12 @@ INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
EnableWindow (GetDlgItem (hDlg, IDC_STEPSSPINNER), !IsDlgButtonChecked(hDlg, IDC_TILE_MODE));
|
EnableWindow (GetDlgItem (hDlg, IDC_STEPSSPINNER), !IsDlgButtonChecked(hDlg, IDC_TILE_MODE));
|
||||||
EnableWindow (GetDlgItem (hDlg, IDC_STEPS_RENDER), !IsDlgButtonChecked(hDlg, IDC_TILE_MODE));
|
EnableWindow (GetDlgItem (hDlg, IDC_STEPS_RENDER), !IsDlgButtonChecked(hDlg, IDC_TILE_MODE));
|
||||||
EnableWindow (GetDlgItem (hDlg, IDC_STEPSRENDERSPINNER), !IsDlgButtonChecked(hDlg, IDC_TILE_MODE));
|
EnableWindow (GetDlgItem (hDlg, IDC_STEPSRENDERSPINNER), !IsDlgButtonChecked(hDlg, IDC_TILE_MODE));
|
||||||
|
|
||||||
// New
|
// New
|
||||||
EnableWindow (GetDlgItem (hDlg, IDC_TILESTEPS), IsDlgButtonChecked(hDlg, IDC_TILE_MODE));
|
EnableWindow (GetDlgItem (hDlg, IDC_TILESTEPS), IsDlgButtonChecked(hDlg, IDC_TILE_MODE));
|
||||||
EnableWindow (GetDlgItem (hDlg, IDC_TILESTEPSSPINNER), IsDlgButtonChecked(hDlg, IDC_TILE_MODE));
|
EnableWindow (GetDlgItem (hDlg, IDC_TILESTEPSSPINNER), IsDlgButtonChecked(hDlg, IDC_TILE_MODE));
|
||||||
EnableWindow (GetDlgItem (hDlg, IDC_KEEP_MAPPING), IsDlgButtonChecked(hDlg, IDC_TILE_MODE));
|
EnableWindow (GetDlgItem (hDlg, IDC_KEEP_MAPPING), IsDlgButtonChecked(hDlg, IDC_TILE_MODE));
|
||||||
|
|
||||||
// New
|
// New
|
||||||
EnableWindow (GetDlgItem (hDlg, IDC_TRANSITION), IsDlgButtonChecked(hDlg, IDC_TILE_MODE));
|
EnableWindow (GetDlgItem (hDlg, IDC_TRANSITION), IsDlgButtonChecked(hDlg, IDC_TILE_MODE));
|
||||||
EnableWindow (GetDlgItem (hDlg, IDC_TRANSITIONSPINNER), IsDlgButtonChecked(hDlg, IDC_TILE_MODE));
|
EnableWindow (GetDlgItem (hDlg, IDC_TRANSITIONSPINNER), IsDlgButtonChecked(hDlg, IDC_TILE_MODE));
|
||||||
|
@ -494,7 +494,7 @@ INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
ep->ip->UnRegisterDeleteUser(&pDel);
|
ep->ip->UnRegisterDeleteUser(&pDel);
|
||||||
ep->ip->GetRightClickMenuManager()->Unregister(&pMenu);
|
ep->ip->GetRightClickMenuManager()->Unregister(&pMenu);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
case CC_SPINNER_CHANGE:
|
case CC_SPINNER_CHANGE:
|
||||||
switch (LOWORD(wParam))
|
switch (LOWORD(wParam))
|
||||||
{
|
{
|
||||||
|
@ -544,7 +544,7 @@ INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
}
|
}
|
||||||
|
|
||||||
ep->ip->RedrawViews(ep->ip->GetTime(), REDRAW_END);
|
ep->ip->RedrawViews(ep->ip->GetTime(), REDRAW_END);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
ep->ip->RedrawViews(ep->ip->GetTime(), REDRAW_INTERACTIVE);
|
ep->ip->RedrawViews(ep->ip->GetTime(), REDRAW_INTERACTIVE);
|
||||||
}
|
}
|
||||||
|
@ -562,18 +562,18 @@ INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
int sm =0;
|
int sm =0;
|
||||||
int sm2 = 0;
|
int sm2 = 0;
|
||||||
if (IsDlgButtonChecked(hDlg, IDC_EP_SM_SMOOTH))
|
if (IsDlgButtonChecked(hDlg, IDC_EP_SM_SMOOTH))
|
||||||
sm = 0;
|
sm = 0;
|
||||||
else if (IsDlgButtonChecked(hDlg, IDC_EP_SM_SMOOTH2))
|
else if (IsDlgButtonChecked(hDlg, IDC_EP_SM_SMOOTH2))
|
||||||
sm = 1;
|
sm = 1;
|
||||||
else if (IsDlgButtonChecked(hDlg, IDC_EP_SM_SMOOTH3))
|
else if (IsDlgButtonChecked(hDlg, IDC_EP_SM_SMOOTH3))
|
||||||
sm = 2;
|
sm = 2;
|
||||||
|
|
||||||
if (IsDlgButtonChecked(hDlg, IDC_EP_SM_SMOOTH4))
|
if (IsDlgButtonChecked(hDlg, IDC_EP_SM_SMOOTH4))
|
||||||
sm2 = 0;
|
sm2 = 0;
|
||||||
else if (IsDlgButtonChecked(hDlg, IDC_EP_SM_SMOOTH5))
|
else if (IsDlgButtonChecked(hDlg, IDC_EP_SM_SMOOTH5))
|
||||||
sm2 = 1;
|
sm2 = 1;
|
||||||
else if (IsDlgButtonChecked(hDlg, IDC_EP_SM_SMOOTH6))
|
else if (IsDlgButtonChecked(hDlg, IDC_EP_SM_SMOOTH6))
|
||||||
sm2 = 2;
|
sm2 = 2;
|
||||||
|
|
||||||
spin = GetISpinner(GetDlgItem(hDlg, IDC_EP_OUTLINESPINNER));
|
spin = GetISpinner(GetDlgItem(hDlg, IDC_EP_OUTLINESPINNER));
|
||||||
ep->Bevel(ep->ip->GetTime(), spin->GetFVal(), sm, sm2);
|
ep->Bevel(ep->ip->GetTime(), spin->GetFVal(), sm, sm2);
|
||||||
|
@ -588,7 +588,7 @@ INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
}
|
}
|
||||||
|
|
||||||
ep->ip->RedrawViews(ep->ip->GetTime(), REDRAW_END);
|
ep->ip->RedrawViews(ep->ip->GetTime(), REDRAW_END);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
ep->ip->RedrawViews(ep->ip->GetTime(), REDRAW_INTERACTIVE);
|
ep->ip->RedrawViews(ep->ip->GetTime(), REDRAW_INTERACTIVE);
|
||||||
}
|
}
|
||||||
|
@ -641,7 +641,7 @@ INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
|
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
switch (LOWORD(wParam))
|
switch (LOWORD(wParam))
|
||||||
{
|
{
|
||||||
// Subdivision
|
// Subdivision
|
||||||
// watje 3-18-99
|
// watje 3-18-99
|
||||||
case IDC_SHOW_INTERIOR_FACES:
|
case IDC_SHOW_INTERIOR_FACES:
|
||||||
|
@ -654,18 +654,18 @@ INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
{
|
{
|
||||||
BOOL bCheck=(IsDlgButtonChecked(hDlg, IDC_TILE_MODE)==BST_CHECKED);
|
BOOL bCheck=(IsDlgButtonChecked(hDlg, IDC_TILE_MODE)==BST_CHECKED);
|
||||||
ep->SetTileMode (bCheck!=0);
|
ep->SetTileMode (bCheck!=0);
|
||||||
|
|
||||||
// Old
|
// Old
|
||||||
EnableWindow (GetDlgItem (hDlg, IDC_STEPS), !bCheck);
|
EnableWindow (GetDlgItem (hDlg, IDC_STEPS), !bCheck);
|
||||||
EnableWindow (GetDlgItem (hDlg, IDC_STEPSSPINNER), !bCheck);
|
EnableWindow (GetDlgItem (hDlg, IDC_STEPSSPINNER), !bCheck);
|
||||||
EnableWindow (GetDlgItem (hDlg, IDC_STEPS_RENDER), !bCheck);
|
EnableWindow (GetDlgItem (hDlg, IDC_STEPS_RENDER), !bCheck);
|
||||||
EnableWindow (GetDlgItem (hDlg, IDC_STEPSRENDERSPINNER), !bCheck);
|
EnableWindow (GetDlgItem (hDlg, IDC_STEPSRENDERSPINNER), !bCheck);
|
||||||
|
|
||||||
// New
|
// New
|
||||||
EnableWindow (GetDlgItem (hDlg, IDC_TILESTEPS), bCheck);
|
EnableWindow (GetDlgItem (hDlg, IDC_TILESTEPS), bCheck);
|
||||||
EnableWindow (GetDlgItem (hDlg, IDC_TILESTEPSSPINNER), bCheck);
|
EnableWindow (GetDlgItem (hDlg, IDC_TILESTEPSSPINNER), bCheck);
|
||||||
EnableWindow (GetDlgItem (hDlg, IDC_KEEP_MAPPING), bCheck);
|
EnableWindow (GetDlgItem (hDlg, IDC_KEEP_MAPPING), bCheck);
|
||||||
|
|
||||||
// New
|
// New
|
||||||
EnableWindow (GetDlgItem (hDlg, IDC_TRANSITION), bCheck);
|
EnableWindow (GetDlgItem (hDlg, IDC_TRANSITION), bCheck);
|
||||||
EnableWindow (GetDlgItem (hDlg, IDC_TRANSITIONSPINNER), bCheck);
|
EnableWindow (GetDlgItem (hDlg, IDC_TRANSITIONSPINNER), bCheck);
|
||||||
|
@ -731,7 +731,7 @@ INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
ep->ip->SetStdCommandMode(CID_OBJMOVE);
|
ep->ip->SetStdCommandMode(CID_OBJMOVE);
|
||||||
else ep->ip->SetCommandMode(ep->bevelMode);
|
else ep->ip->SetCommandMode(ep->bevelMode);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IDC_TURN:
|
case IDC_TURN:
|
||||||
nlassert (ep->GetSubobjectLevel()==PO_PATCH);
|
nlassert (ep->GetSubobjectLevel()==PO_PATCH);
|
||||||
ep->DoPatchTurn(true);
|
ep->DoPatchTurn(true);
|
||||||
|
@ -772,7 +772,7 @@ INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
case IDC_DETACHREORIENT:
|
case IDC_DETACHREORIENT:
|
||||||
patchDetachReorient = IsDlgButtonChecked(hDlg, IDC_DETACHREORIENT);
|
patchDetachReorient = IsDlgButtonChecked(hDlg, IDC_DETACHREORIENT);
|
||||||
break;
|
break;
|
||||||
case IDC_ATTACH:
|
case IDC_ATTACH:
|
||||||
{
|
{
|
||||||
ModContextList mcList;
|
ModContextList mcList;
|
||||||
INodeTab nodes;
|
INodeTab nodes;
|
||||||
|
@ -798,7 +798,7 @@ INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ using namespace NLMISC;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** public functions **/
|
/** public functions **/
|
||||||
BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
|
BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
|
||||||
{
|
{
|
||||||
// initialize nel context
|
// initialize nel context
|
||||||
if (!NLMISC::INelContext::isContextInitialised())
|
if (!NLMISC::INelContext::isContextInitialised())
|
||||||
|
@ -25,13 +25,13 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
|
||||||
nldebug("NeL Patch Paint: DllMain");
|
nldebug("NeL Patch Paint: DllMain");
|
||||||
NLMISC::CSheetId::initWithoutSheet();
|
NLMISC::CSheetId::initWithoutSheet();
|
||||||
}
|
}
|
||||||
|
|
||||||
hInstance = hinstDLL;
|
hInstance = hinstDLL;
|
||||||
|
|
||||||
if ( !controlsInit )
|
if ( !controlsInit )
|
||||||
{
|
{
|
||||||
controlsInit = TRUE;
|
controlsInit = TRUE;
|
||||||
|
|
||||||
// jaguar controls
|
// jaguar controls
|
||||||
#if MAX_VERSION_MAJOR < 14
|
#if MAX_VERSION_MAJOR < 14
|
||||||
InitCustomControls(hInstance);
|
InitCustomControls(hInstance);
|
||||||
|
@ -42,7 +42,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
|
||||||
Ctl3dRegister(hinstDLL);
|
Ctl3dRegister(hinstDLL);
|
||||||
Ctl3dAutoSubclass(hinstDLL);
|
Ctl3dAutoSubclass(hinstDLL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// initialize Chicago controls
|
// initialize Chicago controls
|
||||||
InitCommonControls();
|
InitCommonControls();
|
||||||
}
|
}
|
||||||
|
@ -66,8 +66,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
|
||||||
//------------------------------------------------------
|
//------------------------------------------------------
|
||||||
|
|
||||||
__declspec( dllexport ) const TCHAR *
|
__declspec( dllexport ) const TCHAR *
|
||||||
LibDescription()
|
LibDescription()
|
||||||
{
|
{
|
||||||
return _T("NeL patch painter");
|
return _T("NeL patch painter");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ LibClassDesc(int i) {
|
||||||
|
|
||||||
|
|
||||||
// Return version so can detect obsolete DLLs
|
// Return version so can detect obsolete DLLs
|
||||||
__declspec( dllexport ) ULONG
|
__declspec( dllexport ) ULONG
|
||||||
LibVersion() { return VERSION_3DSMAX; }
|
LibVersion() { return VERSION_3DSMAX; }
|
||||||
|
|
||||||
// Let the plug-in register itself for deferred loading
|
// Let the plug-in register itself for deferred loading
|
||||||
|
|
|
@ -28,13 +28,13 @@ extern void LoadImages();
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
void PaintPatchMod::SetOpsDlgEnables()
|
void PaintPatchMod::SetOpsDlgEnables()
|
||||||
{
|
{
|
||||||
if (!hOpsPanel)
|
if (!hOpsPanel)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
nlassert(ip);
|
nlassert(ip);
|
||||||
|
|
||||||
ICustButton *but;
|
ICustButton *but;
|
||||||
|
|
||||||
but = GetICustButton(GetDlgItem(hOpsPanel, IDC_PAINT));
|
but = GetICustButton(GetDlgItem(hOpsPanel, IDC_PAINT));
|
||||||
|
@ -52,12 +52,12 @@ INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
|
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
{
|
{
|
||||||
ep =(PaintPatchMod *)lParam;
|
ep =(PaintPatchMod *)lParam;
|
||||||
ep->hOpsPanel = hDlg;
|
ep->hOpsPanel = hDlg;
|
||||||
|
|
||||||
SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)ep);
|
SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)ep);
|
||||||
|
|
||||||
CheckDlgButton(hDlg, IDC_INCLUDE_MESHES, ep->includeMeshes);
|
CheckDlgButton(hDlg, IDC_INCLUDE_MESHES, ep->includeMeshes);
|
||||||
CheckDlgButton(hDlg, IDC_PRELOAD_TILES, ep->preloadTiles);
|
CheckDlgButton(hDlg, IDC_PRELOAD_TILES, ep->preloadTiles);
|
||||||
|
@ -67,7 +67,7 @@ INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
|
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
switch (LOWORD(wParam))
|
switch (LOWORD(wParam))
|
||||||
{
|
{
|
||||||
case IDC_INCLUDE_MESHES:
|
case IDC_INCLUDE_MESHES:
|
||||||
{
|
{
|
||||||
BOOL bCheck=(IsDlgButtonChecked(hDlg, IDC_INCLUDE_MESHES)==BST_CHECKED);
|
BOOL bCheck=(IsDlgButtonChecked(hDlg, IDC_INCLUDE_MESHES)==BST_CHECKED);
|
||||||
|
@ -86,7 +86,7 @@ INT_PTR CALLBACK PatchOpsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue