Makes it so prefabs can correctly 'export to collada' by running the buildPolyList function on it's children.

Also adds a 'Bake Selection to Mesh' option to the tools menu in the editor to export the selected mesh to a collada file, and then replaces the selection with a TSStatic.
This commit is contained in:
Areloch 2016-12-10 17:27:27 -06:00
parent 630949514a
commit 1d754cbbad
9 changed files with 244 additions and 1 deletions

View file

@ -525,6 +525,19 @@ bool Prefab::isValidChild( SimObject *simobj, bool logWarnings )
return true;
}
bool Prefab::buildPolyList(PolyListContext context, AbstractPolyList* polyList, const Box3F &box, const SphereF& sphere)
{
Vector<SceneObject*> foundObjects;
mChildGroup->findObjectByType(foundObjects);
for (S32 i = 0; i < foundObjects.size(); i++)
{
foundObjects[i]->buildPolyList(context, polyList, box, sphere);
}
return true;
}
ExplodePrefabUndoAction::ExplodePrefabUndoAction( Prefab *prefab )
: UndoAction( "Explode Prefab" )
{