mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-25 15:14:46 +00:00
Adds logical check to skip animated statics when baking selection to mesh.
This commit is contained in:
parent
81777348c8
commit
b6a3fb05d9
|
|
@ -284,6 +284,8 @@ public:
|
|||
|
||||
void updateMaterials();
|
||||
|
||||
bool isAnimated() { return mPlayAmbient; }
|
||||
|
||||
private:
|
||||
virtual void onStaticModified(const char* slotName, const char* newValue = NULL);
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -3909,8 +3909,18 @@ bool WorldEditor::makeSelectionAMesh(const char *filename)
|
|||
for ( S32 i = 0; i < mSelected->size(); i++ )
|
||||
{
|
||||
SceneObject *pObj = dynamic_cast< SceneObject* >( ( *mSelected )[i] );
|
||||
if ( pObj )
|
||||
objectList.push_back( pObj );
|
||||
if (pObj)
|
||||
{
|
||||
//Minor sanity check to avoid baking animated shapes
|
||||
TSStatic* staticShape = dynamic_cast<TSStatic*>(pObj);
|
||||
if (staticShape)
|
||||
{
|
||||
if (staticShape->isAnimated() && staticShape->hasAnim())
|
||||
continue;
|
||||
}
|
||||
|
||||
objectList.push_back(pObj);
|
||||
}
|
||||
}
|
||||
|
||||
if ( objectList.empty() )
|
||||
|
|
@ -3956,6 +3966,7 @@ bool WorldEditor::makeSelectionAMesh(const char *filename)
|
|||
for (S32 i = 0; i < objectList.size(); i++)
|
||||
{
|
||||
SceneObject *pObj = objectList[i];
|
||||
|
||||
if (!pObj->buildExportPolyList(&exportData, pObj->getWorldBox(), pObj->getWorldSphere()))
|
||||
Con::warnf("colladaExportObjectList() - object %i returned no geometry.", pObj->getId());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue