mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-21 23:53:51 +00:00
Merge branch 'development' of https://github.com/GarageGames/Torque3D into memberMess
# Conflicts: # Engine/source/console/consoleFunctions.cpp
This commit is contained in:
commit
cbce2ee805
154 changed files with 2950 additions and 705 deletions
|
|
@ -2495,8 +2495,8 @@ DefineConsoleMethod(TerrainEditor, getTerrainBlocksMaterialList, const char *, (
|
|||
ret[0] = 0;
|
||||
for(U32 i = 0; i < list.size(); ++i)
|
||||
{
|
||||
dStrcat( ret, list[i] );
|
||||
dStrcat( ret, "\n" );
|
||||
dStrcat( ret, list[i], size );
|
||||
dStrcat( ret, "\n", size );
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
@ -2709,8 +2709,8 @@ DefineConsoleMethod(TerrainEditor, getMaterials, const char *, (), , "() gets th
|
|||
ret[0] = 0;
|
||||
for(U32 i = 0; i < terr->getMaterialCount(); i++)
|
||||
{
|
||||
dStrcat( ret, terr->getMaterialName(i) );
|
||||
dStrcat( ret, "\n" );
|
||||
dStrcat( ret, terr->getMaterialName(i), 4096 );
|
||||
dStrcat( ret, "\n", 4096 );
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
|||
|
|
@ -3927,15 +3927,38 @@ void WorldEditor::makeSelectionAMesh(const char *filename)
|
|||
OptimizedPolyList polyList;
|
||||
polyList.setBaseTransform(orientation);
|
||||
|
||||
ColladaUtils::ExportData exportData;
|
||||
|
||||
for (S32 i = 0; i < objectList.size(); i++)
|
||||
{
|
||||
SceneObject *pObj = objectList[i];
|
||||
if (!pObj->buildPolyList(PLC_Export, &polyList, pObj->getWorldBox(), pObj->getWorldSphere()))
|
||||
if (!pObj->buildExportPolyList(&exportData, pObj->getWorldBox(), pObj->getWorldSphere()))
|
||||
Con::warnf("colladaExportObjectList() - object %i returned no geometry.", pObj->getId());
|
||||
}
|
||||
|
||||
//Now that we have all of our mesh data, process it so we can correctly collapse everything.
|
||||
exportData.processData();
|
||||
|
||||
//recenter generated visual mesh results
|
||||
for (U32 dl = 0; dl < exportData.colMeshes.size(); dl++)
|
||||
{
|
||||
for (U32 pnt = 0; pnt < exportData.colMeshes[dl].mesh.mPoints.size(); pnt++)
|
||||
{
|
||||
exportData.colMeshes[dl].mesh.mPoints[pnt] -= centroid;
|
||||
}
|
||||
}
|
||||
|
||||
//recenter generated collision mesh results
|
||||
for (U32 dl = 0; dl < exportData.detailLevels.size(); dl++)
|
||||
{
|
||||
for (U32 pnt = 0; pnt < exportData.detailLevels[dl].mesh.mPoints.size(); pnt++)
|
||||
{
|
||||
exportData.detailLevels[dl].mesh.mPoints[pnt] -= centroid;
|
||||
}
|
||||
}
|
||||
|
||||
// Use a ColladaUtils function to do the actual export to a Collada file
|
||||
ColladaUtils::exportToCollada(filename, polyList);
|
||||
ColladaUtils::exportToCollada(filename, exportData);
|
||||
//
|
||||
|
||||
// Allocate TSStatic object and add to level.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue