#include "scene.h"
using namespace std;

Scene::Scene()
{

}

Scene::~Scene()
{
    for(vector<Mesh*>::iterator i = meshes.begin(); i != meshes.end(); i++)
        delete *i;
}

void Scene::ExportToBlender(std::ostream &os)
{
    os << "import bpy\n";
    os << "bpy.ops.object.delete()\n";
    os << "for item in bpy.data.meshes:\n";
    os << "  bpy.data.meshes.remove(item)\n\n";

    for(vector<Mesh*>::iterator i = meshes.begin(); i != meshes.end(); i++)
        (*i)->ExportToBlender(os);
}
