}
+unsigned Scene::Loader::inline_counter = 0;
+
Scene::Loader::Loader(Scene &s, Collection &c, ContentMap *m):
DataFile::CollectionObjectLoader<Scene>(s, &c),
- content(m),
- inst_counter(0)
+ content(m)
{
add("object", &Loader::object);
add("object", &Loader::object_tagged);
{
RefPtr<ObjectInstance> inst = new ObjectInstance(get_collection().get<GL::Object>(n));
load_sub(*inst);
- get_collection().add(format("%s/%d.inst", FS::basename(get_source()), inst_counter++), inst.get());
+ get_collection().add(format("_scene_object_%d.inst", ++inline_counter), inst.get());
if(content && !t.empty())
(*content)[t] = inst.get();
obj.add(*inst.release());
private:
ContentMap *content;
- unsigned inst_counter;
+
+ static unsigned inline_counter;
public:
Loader(Scene &s, Collection &c): Loader(s, c, 0) { }