From: Mikko Rasa Date: Wed, 14 Apr 2021 15:28:04 +0000 (+0300) Subject: Use ObjectInstance instead of AnimatedObject in Scene loader X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=a3a59b5ff2364ad657de1f385c99546c32b2bfb4;p=libs%2Fgl.git Use ObjectInstance instead of AnimatedObject in Scene loader Since ObjectInstance has a matrix now, there's no need to use AnimatedObject here. I may add another statement to include objects with actual animations later. --- diff --git a/source/render/scene.cpp b/source/render/scene.cpp index dd611536..b8cdc045 100644 --- a/source/render/scene.cpp +++ b/source/render/scene.cpp @@ -1,6 +1,6 @@ #include -#include "animatedobject.h" #include "camera.h" +#include "objectinstance.h" #include "orderedscene.h" #include "renderer.h" #include "scene.h" @@ -120,12 +120,12 @@ void Scene::Loader::object(const string &n) void Scene::Loader::object_tagged(const string &n, const string &t) { - RefPtr anob = new AnimatedObject(get_collection().get(n)); - load_sub(*anob); - obj.add(*anob); + RefPtr inst = new ObjectInstance(get_collection().get(n)); + load_sub(*inst); + obj.add(*inst); if(content && !t.empty()) - (*content)[t] = anob.get(); - obj.owned_data.push_back(anob.release()); + (*content)[t] = inst.get(); + obj.owned_data.push_back(inst.release()); }