mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-25 10:20:54 +00:00
Changed: Minor changes
--HG-- branch : develop
This commit is contained in:
parent
5f5483a672
commit
b17da91efd
19 changed files with 128 additions and 112 deletions
|
@ -1120,8 +1120,6 @@ void CPSConstraintMesh::getShapesNames(std::string *shapesNames) const
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//====================================================================================
|
//====================================================================================
|
||||||
void CPSConstraintMesh::setShape(uint index, const std::string &shapeName)
|
void CPSConstraintMesh::setShape(uint index, const std::string &shapeName)
|
||||||
{
|
{
|
||||||
|
@ -1132,7 +1130,6 @@ void CPSConstraintMesh::setShape(uint index, const std::string &shapeName)
|
||||||
_ValidBuild = 0;
|
_ValidBuild = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//====================================================================================
|
//====================================================================================
|
||||||
const std::string &CPSConstraintMesh::getShape(uint index) const
|
const std::string &CPSConstraintMesh::getShape(uint index) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -287,6 +287,7 @@ void CAnimationSetDlg::refresh (BOOL update)
|
||||||
|
|
||||||
// Keyframer ?
|
// Keyframer ?
|
||||||
UTrackKeyframer *keyTrack=dynamic_cast<UTrackKeyframer *>(track);
|
UTrackKeyframer *keyTrack=dynamic_cast<UTrackKeyframer *>(track);
|
||||||
|
|
||||||
if (keyTrack)
|
if (keyTrack)
|
||||||
{
|
{
|
||||||
// Get number of keys
|
// Get number of keys
|
||||||
|
@ -316,7 +317,7 @@ void CAnimationSetDlg::refresh (BOOL update)
|
||||||
std::string name = NLMISC::CFile::getFilenameWithoutExtension(object->Saved.SWTFileName[i]);
|
std::string name = NLMISC::CFile::getFilenameWithoutExtension(object->Saved.SWTFileName[i]);
|
||||||
|
|
||||||
// Get the animation pointer
|
// Get the animation pointer
|
||||||
CSkeletonWeight *swt = object->AnimationSet.getSkeletonWeight (object->AnimationSet.getSkeletonWeightIdByName (name));
|
CSkeletonWeight *swt = object->AnimationSet.getSkeletonWeight(object->AnimationSet.getSkeletonWeightIdByName(name));
|
||||||
|
|
||||||
// Insert an intem
|
// Insert an intem
|
||||||
HTREEITEM item=SkelTree.InsertItem(utf8ToTStr(name));
|
HTREEITEM item=SkelTree.InsertItem(utf8ToTStr(name));
|
||||||
|
|
|
@ -104,8 +104,8 @@ public:
|
||||||
// SchemeWrapper[k].S reference the atriobute maker being edited
|
// SchemeWrapper[k].S reference the atriobute maker being edited
|
||||||
if (_EditedScheme->supportOp( (NL3D::CPSBinOp::BinOp) k))
|
if (_EditedScheme->supportOp( (NL3D::CPSBinOp::BinOp) k))
|
||||||
{
|
{
|
||||||
sint index = m_BinOp.AddString(ops[k]) ;
|
sint index = m_BinOp.AddString(ops[k]);
|
||||||
m_BinOp.SetItemData(index, k) ;
|
m_BinOp.SetItemData(index, k);
|
||||||
if ((uint) _EditedScheme->getOp() == k)
|
if ((uint) _EditedScheme->getOp() == k)
|
||||||
{
|
{
|
||||||
m_BinOp.SetCurSel(k) ;
|
m_BinOp.SetCurSel(k) ;
|
||||||
|
|
|
@ -185,7 +185,6 @@ BOOL CLocatedTargetDlg::OnInitDialog()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const sint posX = 5;
|
const sint posX = 5;
|
||||||
sint posY = 180;
|
sint posY = 180;
|
||||||
|
|
||||||
|
|
|
@ -111,8 +111,10 @@ void CMeshDlg::OnBrowseShape()
|
||||||
{
|
{
|
||||||
MessageBox(utf8ToTStr(e.what()), _T("shape loading error"));
|
MessageBox(utf8ToTStr(e.what()), _T("shape loading error"));
|
||||||
}
|
}
|
||||||
|
|
||||||
updateMeshErrorString();
|
updateMeshErrorString();
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateData(FALSE);
|
UpdateData(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -220,6 +220,7 @@ void CParticleSystemEdit::updateDieOnEventParams()
|
||||||
{
|
{
|
||||||
ew = FALSE;
|
ew = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
GetDlgItem(IDC_APPLY_AFTER_DELAY)->EnableWindow(ew);
|
GetDlgItem(IDC_APPLY_AFTER_DELAY)->EnableWindow(ew);
|
||||||
|
|
||||||
CString out;
|
CString out;
|
||||||
|
@ -232,6 +233,7 @@ void CParticleSystemEdit::updateDieOnEventParams()
|
||||||
{
|
{
|
||||||
out = _T("???");
|
out = _T("???");
|
||||||
}
|
}
|
||||||
|
|
||||||
GetDlgItem(IDC_APPLY_AFTER_DELAY)->SetWindowText(out);
|
GetDlgItem(IDC_APPLY_AFTER_DELAY)->SetWindowText(out);
|
||||||
((CButton *) GetDlgItem(IDC_AUTO_DELAY))->SetCheck(autoDelay ? 1 : 0);
|
((CButton *) GetDlgItem(IDC_AUTO_DELAY))->SetCheck(autoDelay ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -386,6 +386,7 @@ CParticleWorkspace::CNode *CParticleWorkspace::addNode(const std::string &filena
|
||||||
{
|
{
|
||||||
relativePath = resultPath;
|
relativePath = resultPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (relativePath.size() >= 2)
|
if (relativePath.size() >= 2)
|
||||||
{
|
{
|
||||||
if (relativePath[0] == '\\' && relativePath[1] != '\\')
|
if (relativePath[0] == '\\' && relativePath[1] != '\\')
|
||||||
|
@ -393,6 +394,7 @@ CParticleWorkspace::CNode *CParticleWorkspace::addNode(const std::string &filena
|
||||||
relativePath = relativePath.substr(1);
|
relativePath = relativePath.substr(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CNode *newNode = new CNode;
|
CNode *newNode = new CNode;
|
||||||
newNode->init(this);
|
newNode->init(this);
|
||||||
newNode->setRelativePath(relativePath);
|
newNode->setRelativePath(relativePath);
|
||||||
|
|
|
@ -199,12 +199,15 @@ void CSkeletonScaleDlg::setSkeletonToEdit(NL3D::CSkeletonModel *skel, const std
|
||||||
{
|
{
|
||||||
for(uint i=0;i<_SkeletonModel->Bones.size();i++)
|
for(uint i=0;i<_SkeletonModel->Bones.size();i++)
|
||||||
{
|
{
|
||||||
const std::string tabStr= " ";
|
const std::string tabStr = " ";
|
||||||
std::string name= _SkeletonModel->Bones[i].getBoneName();
|
std::string name = _SkeletonModel->Bones[i].getBoneName();
|
||||||
|
|
||||||
// append a tab for easy hierarchy
|
// append a tab for easy hierarchy
|
||||||
uint boneId= i;
|
uint boneId = i;
|
||||||
|
|
||||||
while((boneId=_SkeletonModel->Bones[boneId].getFatherId())!=-1)
|
while((boneId=_SkeletonModel->Bones[boneId].getFatherId())!=-1)
|
||||||
name= tabStr + name;
|
name = tabStr + name;
|
||||||
|
|
||||||
// append to the list
|
// append to the list
|
||||||
_BoneList.AddString(utf8ToTStr(name));
|
_BoneList.AddString(utf8ToTStr(name));
|
||||||
}
|
}
|
||||||
|
@ -1222,7 +1225,7 @@ void CSkeletonScaleDlg::OnSsdButtonSaveScale()
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// choose the file
|
// choose the file
|
||||||
std::string defaultFileName= _SkeletonFileName;
|
std::string defaultFileName = _SkeletonFileName;
|
||||||
NLMISC::strFindReplace(defaultFileName, ".skel", ".scale");
|
NLMISC::strFindReplace(defaultFileName, ".skel", ".scale");
|
||||||
|
|
||||||
CFileDialog fd(FALSE, _T("scale"), utf8ToTStr(defaultFileName), OFN_OVERWRITEPROMPT, _T("SkelScaleFiles (*.scale)|*.scale|All Files (*.*)|*.*||"), this) ;
|
CFileDialog fd(FALSE, _T("scale"), utf8ToTStr(defaultFileName), OFN_OVERWRITEPROMPT, _T("SkelScaleFiles (*.scale)|*.scale|All Files (*.*)|*.*||"), this) ;
|
||||||
|
|
|
@ -114,6 +114,7 @@ void CSnapshotToolDlg::stringFromRegistry(HKEY hKey, const TCHAR *name, CString
|
||||||
DWORD type;
|
DWORD type;
|
||||||
DWORD size;
|
DWORD size;
|
||||||
LONG result = RegQueryValueEx(hKey, name, NULL, &type, NULL, &size);
|
LONG result = RegQueryValueEx(hKey, name, NULL, &type, NULL, &size);
|
||||||
|
|
||||||
if (type != REG_SZ || result != ERROR_SUCCESS || size == 0)
|
if (type != REG_SZ || result != ERROR_SUCCESS || size == 0)
|
||||||
{
|
{
|
||||||
dest = defaultStr;
|
dest = defaultStr;
|
||||||
|
@ -144,18 +145,22 @@ template <class T, class U> void integralTypeFromRegistry(HKEY hKey, const TCHAR
|
||||||
DWORD type;
|
DWORD type;
|
||||||
DWORD size;
|
DWORD size;
|
||||||
LONG result = RegQueryValueEx(hKey, name, NULL, &type, NULL, &size);
|
LONG result = RegQueryValueEx(hKey, name, NULL, &type, NULL, &size);
|
||||||
|
|
||||||
if (type != REG_DWORD || result != ERROR_SUCCESS || size == 0)
|
if (type != REG_DWORD || result != ERROR_SUCCESS || size == 0)
|
||||||
{
|
{
|
||||||
dest = (T) defaultValue;
|
dest = (T) defaultValue;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD value;
|
DWORD value;
|
||||||
result = RegQueryValueEx(hKey, name, NULL, &type, LPBYTE(&value), &size);
|
result = RegQueryValueEx(hKey, name, NULL, &type, LPBYTE(&value), &size);
|
||||||
|
|
||||||
if (result != ERROR_SUCCESS)
|
if (result != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
dest = defaultValue;
|
dest = defaultValue;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
dest = (T) value;
|
dest = (T) value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,6 +180,7 @@ void CSnapshotToolDlg::fromRegistry()
|
||||||
NLMISC::splitString(tStrToUtf8(filters), ",", filterList);
|
NLMISC::splitString(tStrToUtf8(filters), ",", filterList);
|
||||||
|
|
||||||
m_Filters.ResetContent();
|
m_Filters.ResetContent();
|
||||||
|
|
||||||
for (uint k = 0; k < filterList.size(); ++k)
|
for (uint k = 0; k < filterList.size(); ++k)
|
||||||
{
|
{
|
||||||
m_Filters.AddString(utf8ToTStr(filterList[k]));
|
m_Filters.AddString(utf8ToTStr(filterList[k]));
|
||||||
|
@ -431,7 +437,6 @@ void CSnapshotToolDlg::OnGo()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// make sure that the screen can contains the window client area
|
// make sure that the screen can contains the window client area
|
||||||
RECT desktopSize;
|
RECT desktopSize;
|
||||||
::GetClientRect(::GetDesktopWindow(), &desktopSize);
|
::GetClientRect(::GetDesktopWindow(), &desktopSize);
|
||||||
|
|
|
@ -2372,11 +2372,13 @@ INT_PTR CALLBACK MiscDialogCallback (
|
||||||
currentParam->RemanenceShiftingTexture = SendMessage (GetDlgItem (hwndDlg, IDC_REMANENCE_SHIFTING_TEXTURE), BM_GETCHECK, 0, 0);
|
currentParam->RemanenceShiftingTexture = SendMessage (GetDlgItem (hwndDlg, IDC_REMANENCE_SHIFTING_TEXTURE), BM_GETCHECK, 0, 0);
|
||||||
|
|
||||||
GetWindowText (GetDlgItem (hwndDlg, IDC_REMANENCE_SLICE_NUMBER), tmp, 512);
|
GetWindowText (GetDlgItem (hwndDlg, IDC_REMANENCE_SLICE_NUMBER), tmp, 512);
|
||||||
|
|
||||||
uint rsn;
|
uint rsn;
|
||||||
if (NLMISC::fromString(tStrToUtf8(tmp), rsn))
|
if (NLMISC::fromString(tStrToUtf8(tmp), rsn))
|
||||||
{
|
{
|
||||||
currentParam->RemanenceSliceNumber = rsn;
|
currentParam->RemanenceSliceNumber = rsn;
|
||||||
}
|
}
|
||||||
|
|
||||||
GetWindowText (GetDlgItem (hwndDlg, IDC_REMANENCE_SAMPLING_PERIOD), tmp, 512);
|
GetWindowText (GetDlgItem (hwndDlg, IDC_REMANENCE_SAMPLING_PERIOD), tmp, 512);
|
||||||
toFloatMax(tmp, currentParam->RemanenceSamplingPeriod);
|
toFloatMax(tmp, currentParam->RemanenceSamplingPeriod);
|
||||||
GetWindowText (GetDlgItem (hwndDlg, IDC_REMANENCE_ROLLUP_RATIO), tmp, 512);
|
GetWindowText (GetDlgItem (hwndDlg, IDC_REMANENCE_ROLLUP_RATIO), tmp, 512);
|
||||||
|
|
|
@ -435,6 +435,7 @@ public:
|
||||||
CBankManager ()
|
CBankManager ()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
const NL3D::CTileBank& getBank (std::string& path=GetBankPathName ())
|
const NL3D::CTileBank& getBank (std::string& path=GetBankPathName ())
|
||||||
{
|
{
|
||||||
if (path!=_lastPath)
|
if (path!=_lastPath)
|
||||||
|
|
|
@ -371,19 +371,19 @@ RefResult RGBAdd::NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget,
|
||||||
case REFMSG_CHANGE:
|
case REFMSG_CHANGE:
|
||||||
ivalid.SetEmpty();
|
ivalid.SetEmpty();
|
||||||
if (hTarget == pblock)
|
if (hTarget == pblock)
|
||||||
{
|
{
|
||||||
// see if this message came from a changing parameter in the pblock,
|
// see if this message came from a changing parameter in the pblock,
|
||||||
// if so, limit rollout update to the changing item and update any active viewport texture
|
// if so, limit rollout update to the changing item and update any active viewport texture
|
||||||
ParamID changing_param = pblock->LastNotifyParamID();
|
ParamID changing_param = pblock->LastNotifyParamID();
|
||||||
RGBAdd_param_blk.InvalidateUI(changing_param);
|
RGBAdd_param_blk.InvalidateUI(changing_param);
|
||||||
// notify our dependents that we've changed
|
// notify our dependents that we've changed
|
||||||
// NotifyChanged(); //DS this is redundant
|
// NotifyChanged(); //DS this is redundant
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
return(REF_SUCCEED);
|
|
||||||
}
|
}
|
||||||
|
return(REF_SUCCEED);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#define MTL_HDR_CHUNK 0x4000
|
#define MTL_HDR_CHUNK 0x4000
|
||||||
|
|
|
@ -1296,6 +1296,7 @@ void CTView::DrawTile(tilelist::iterator i,CDC *pDC,int clear, int n)
|
||||||
{
|
{
|
||||||
Name = NLMISC::toString("%d", i->id);
|
Name = NLMISC::toString("%d", i->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
rect_txt.top = pt.y + sizetile_y + spacing_tile_text;
|
rect_txt.top = pt.y + sizetile_y + spacing_tile_text;
|
||||||
rect_txt.bottom += rect_txt.top + sizetext_y;
|
rect_txt.bottom += rect_txt.top + sizetext_y;
|
||||||
rect_txt.left -= spacing_x;
|
rect_txt.left -= spacing_x;
|
||||||
|
|
|
@ -920,7 +920,6 @@ void CGraphPlugin::unsetDlgGraph()
|
||||||
_PluginActive=false;
|
_PluginActive=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CGraphPlugin::doSelection(const string& primPath)
|
void CGraphPlugin::doSelection(const string& primPath)
|
||||||
{
|
{
|
||||||
IPrimitive *rootNode;
|
IPrimitive *rootNode;
|
||||||
|
|
|
@ -89,8 +89,10 @@ MissionCompilerMainWindow::MissionCompilerMainWindow(QWidget *parent) :
|
||||||
settings->endGroup();
|
settings->endGroup();
|
||||||
|
|
||||||
NLLIGO::Register();
|
NLLIGO::Register();
|
||||||
|
|
||||||
// TODO try/catch exception. Crashes if path invalid.
|
// TODO try/catch exception. Crashes if path invalid.
|
||||||
try{
|
try
|
||||||
|
{
|
||||||
m_ligoConfig.readPrimitiveClass(NLMISC::CPath::lookup("world_editor_classes.xml").c_str(), false);
|
m_ligoConfig.readPrimitiveClass(NLMISC::CPath::lookup("world_editor_classes.xml").c_str(), false);
|
||||||
}
|
}
|
||||||
catch(const NLMISC::Exception &e)
|
catch(const NLMISC::Exception &e)
|
||||||
|
|
Loading…
Reference in a new issue