mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-22 23:26:15 +00:00
Changed: Minor changes
This commit is contained in:
parent
6f5b64a669
commit
4795488385
19 changed files with 128 additions and 112 deletions
|
@ -1120,8 +1120,6 @@ void CPSConstraintMesh::getShapesNames(std::string *shapesNames) const
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
//====================================================================================
|
||||
void CPSConstraintMesh::setShape(uint index, const std::string &shapeName)
|
||||
{
|
||||
|
@ -1132,7 +1130,6 @@ void CPSConstraintMesh::setShape(uint index, const std::string &shapeName)
|
|||
_ValidBuild = 0;
|
||||
}
|
||||
|
||||
|
||||
//====================================================================================
|
||||
const std::string &CPSConstraintMesh::getShape(uint index) const
|
||||
{
|
||||
|
|
|
@ -287,6 +287,7 @@ void CAnimationSetDlg::refresh (BOOL update)
|
|||
|
||||
// Keyframer ?
|
||||
UTrackKeyframer *keyTrack=dynamic_cast<UTrackKeyframer *>(track);
|
||||
|
||||
if (keyTrack)
|
||||
{
|
||||
// Get number of keys
|
||||
|
@ -316,7 +317,7 @@ void CAnimationSetDlg::refresh (BOOL update)
|
|||
std::string name = NLMISC::CFile::getFilenameWithoutExtension(object->Saved.SWTFileName[i]);
|
||||
|
||||
// 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
|
||||
HTREEITEM item=SkelTree.InsertItem(utf8ToTStr(name));
|
||||
|
|
|
@ -104,8 +104,8 @@ public:
|
|||
// SchemeWrapper[k].S reference the atriobute maker being edited
|
||||
if (_EditedScheme->supportOp( (NL3D::CPSBinOp::BinOp) k))
|
||||
{
|
||||
sint index = m_BinOp.AddString(ops[k]) ;
|
||||
m_BinOp.SetItemData(index, k) ;
|
||||
sint index = m_BinOp.AddString(ops[k]);
|
||||
m_BinOp.SetItemData(index, k);
|
||||
if ((uint) _EditedScheme->getOp() == k)
|
||||
{
|
||||
m_BinOp.SetCurSel(k) ;
|
||||
|
|
|
@ -185,7 +185,6 @@ BOOL CLocatedTargetDlg::OnInitDialog()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
const sint posX = 5;
|
||||
sint posY = 180;
|
||||
|
||||
|
|
|
@ -111,8 +111,10 @@ void CMeshDlg::OnBrowseShape()
|
|||
{
|
||||
MessageBox(utf8ToTStr(e.what()), _T("shape loading error"));
|
||||
}
|
||||
|
||||
updateMeshErrorString();
|
||||
}
|
||||
|
||||
UpdateData(FALSE);
|
||||
}
|
||||
|
||||
|
|
|
@ -220,6 +220,7 @@ void CParticleSystemEdit::updateDieOnEventParams()
|
|||
{
|
||||
ew = FALSE;
|
||||
}
|
||||
|
||||
GetDlgItem(IDC_APPLY_AFTER_DELAY)->EnableWindow(ew);
|
||||
|
||||
CString out;
|
||||
|
@ -232,6 +233,7 @@ void CParticleSystemEdit::updateDieOnEventParams()
|
|||
{
|
||||
out = _T("???");
|
||||
}
|
||||
|
||||
GetDlgItem(IDC_APPLY_AFTER_DELAY)->SetWindowText(out);
|
||||
((CButton *) GetDlgItem(IDC_AUTO_DELAY))->SetCheck(autoDelay ? 1 : 0);
|
||||
}
|
||||
|
|
|
@ -386,6 +386,7 @@ CParticleWorkspace::CNode *CParticleWorkspace::addNode(const std::string &filena
|
|||
{
|
||||
relativePath = resultPath;
|
||||
}
|
||||
|
||||
if (relativePath.size() >= 2)
|
||||
{
|
||||
if (relativePath[0] == '\\' && relativePath[1] != '\\')
|
||||
|
@ -393,6 +394,7 @@ CParticleWorkspace::CNode *CParticleWorkspace::addNode(const std::string &filena
|
|||
relativePath = relativePath.substr(1);
|
||||
}
|
||||
}
|
||||
|
||||
CNode *newNode = new CNode;
|
||||
newNode->init(this);
|
||||
newNode->setRelativePath(relativePath);
|
||||
|
|
|
@ -199,12 +199,15 @@ void CSkeletonScaleDlg::setSkeletonToEdit(NL3D::CSkeletonModel *skel, const std
|
|||
{
|
||||
for(uint i=0;i<_SkeletonModel->Bones.size();i++)
|
||||
{
|
||||
const std::string tabStr= " ";
|
||||
std::string name= _SkeletonModel->Bones[i].getBoneName();
|
||||
const std::string tabStr = " ";
|
||||
std::string name = _SkeletonModel->Bones[i].getBoneName();
|
||||
|
||||
// append a tab for easy hierarchy
|
||||
uint boneId= i;
|
||||
uint boneId = i;
|
||||
|
||||
while((boneId=_SkeletonModel->Bones[boneId].getFatherId())!=-1)
|
||||
name= tabStr + name;
|
||||
name = tabStr + name;
|
||||
|
||||
// append to the list
|
||||
_BoneList.AddString(utf8ToTStr(name));
|
||||
}
|
||||
|
@ -1222,7 +1225,7 @@ void CSkeletonScaleDlg::OnSsdButtonSaveScale()
|
|||
return;
|
||||
|
||||
// choose the file
|
||||
std::string defaultFileName= _SkeletonFileName;
|
||||
std::string defaultFileName = _SkeletonFileName;
|
||||
NLMISC::strFindReplace(defaultFileName, ".skel", ".scale");
|
||||
|
||||
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 size;
|
||||
LONG result = RegQueryValueEx(hKey, name, NULL, &type, NULL, &size);
|
||||
|
||||
if (type != REG_SZ || result != ERROR_SUCCESS || size == 0)
|
||||
{
|
||||
dest = defaultStr;
|
||||
|
@ -144,18 +145,22 @@ template <class T, class U> void integralTypeFromRegistry(HKEY hKey, const TCHAR
|
|||
DWORD type;
|
||||
DWORD size;
|
||||
LONG result = RegQueryValueEx(hKey, name, NULL, &type, NULL, &size);
|
||||
|
||||
if (type != REG_DWORD || result != ERROR_SUCCESS || size == 0)
|
||||
{
|
||||
dest = (T) defaultValue;
|
||||
return;
|
||||
}
|
||||
|
||||
DWORD value;
|
||||
result = RegQueryValueEx(hKey, name, NULL, &type, LPBYTE(&value), &size);
|
||||
|
||||
if (result != ERROR_SUCCESS)
|
||||
{
|
||||
dest = defaultValue;
|
||||
return;
|
||||
}
|
||||
|
||||
dest = (T) value;
|
||||
}
|
||||
|
||||
|
@ -175,6 +180,7 @@ void CSnapshotToolDlg::fromRegistry()
|
|||
NLMISC::splitString(tStrToUtf8(filters), ",", filterList);
|
||||
|
||||
m_Filters.ResetContent();
|
||||
|
||||
for (uint k = 0; k < filterList.size(); ++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
|
||||
RECT 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);
|
||||
|
||||
GetWindowText (GetDlgItem (hwndDlg, IDC_REMANENCE_SLICE_NUMBER), tmp, 512);
|
||||
|
||||
uint rsn;
|
||||
if (NLMISC::fromString(tStrToUtf8(tmp), rsn))
|
||||
{
|
||||
currentParam->RemanenceSliceNumber = rsn;
|
||||
}
|
||||
|
||||
GetWindowText (GetDlgItem (hwndDlg, IDC_REMANENCE_SAMPLING_PERIOD), tmp, 512);
|
||||
toFloatMax(tmp, currentParam->RemanenceSamplingPeriod);
|
||||
GetWindowText (GetDlgItem (hwndDlg, IDC_REMANENCE_ROLLUP_RATIO), tmp, 512);
|
||||
|
|
|
@ -435,6 +435,7 @@ public:
|
|||
CBankManager ()
|
||||
{
|
||||
}
|
||||
|
||||
const NL3D::CTileBank& getBank (std::string& path=GetBankPathName ())
|
||||
{
|
||||
if (path!=_lastPath)
|
||||
|
|
|
@ -383,7 +383,7 @@ RefResult RGBAdd::NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget,
|
|||
break;
|
||||
}
|
||||
return(REF_SUCCEED);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#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);
|
||||
}
|
||||
|
||||
rect_txt.top = pt.y + sizetile_y + spacing_tile_text;
|
||||
rect_txt.bottom += rect_txt.top + sizetext_y;
|
||||
rect_txt.left -= spacing_x;
|
||||
|
|
|
@ -920,7 +920,6 @@ void CGraphPlugin::unsetDlgGraph()
|
|||
_PluginActive=false;
|
||||
}
|
||||
|
||||
|
||||
void CGraphPlugin::doSelection(const string& primPath)
|
||||
{
|
||||
IPrimitive *rootNode;
|
||||
|
|
|
@ -89,8 +89,10 @@ MissionCompilerMainWindow::MissionCompilerMainWindow(QWidget *parent) :
|
|||
settings->endGroup();
|
||||
|
||||
NLLIGO::Register();
|
||||
|
||||
// TODO try/catch exception. Crashes if path invalid.
|
||||
try{
|
||||
try
|
||||
{
|
||||
m_ligoConfig.readPrimitiveClass(NLMISC::CPath::lookup("world_editor_classes.xml").c_str(), false);
|
||||
}
|
||||
catch(const NLMISC::Exception &e)
|
||||
|
|
Loading…
Reference in a new issue