From 43f14b3f763aa5610a4e651d4f301f9d7589552f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 24 Sep 2021 19:30:59 +0200 Subject: [PATCH] AnySceneImporter: adapt to SceneData redesign. --- src/MagnumPlugins/AnySceneImporter/AnySceneImporter.cpp | 7 +++++++ src/MagnumPlugins/AnySceneImporter/AnySceneImporter.h | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/src/MagnumPlugins/AnySceneImporter/AnySceneImporter.cpp b/src/MagnumPlugins/AnySceneImporter/AnySceneImporter.cpp index 12d60b569c..457cd7f577 100644 --- a/src/MagnumPlugins/AnySceneImporter/AnySceneImporter.cpp +++ b/src/MagnumPlugins/AnySceneImporter/AnySceneImporter.cpp @@ -174,8 +174,11 @@ Containers::Optional AnySceneImporter::doAnimation(const Unsigned Int AnySceneImporter::doDefaultScene() const { return _in->defaultScene(); } UnsignedInt AnySceneImporter::doSceneCount() const { return _in->sceneCount(); } +UnsignedLong AnySceneImporter::doObjectCount() const { return _in->objectCount(); } Int AnySceneImporter::doSceneForName(const std::string& name) { return _in->sceneForName(name); } +Long AnySceneImporter::doObjectForName(const std::string& name) { return _in->objectForName(name); } std::string AnySceneImporter::doSceneName(const UnsignedInt id) { return _in->sceneName(id); } +std::string AnySceneImporter::doObjectName(const UnsignedLong id) { return _in->objectName(id); } Containers::Optional AnySceneImporter::doScene(const UnsignedInt id) { return _in->scene(id); } UnsignedInt AnySceneImporter::doLightCount() const { return _in->lightCount(); } @@ -188,6 +191,8 @@ Int AnySceneImporter::doCameraForName(const std::string& name) { return _in->cam std::string AnySceneImporter::doCameraName(const UnsignedInt id) { return _in->cameraName(id); } Containers::Optional AnySceneImporter::doCamera(const UnsignedInt id) { return _in->camera(id); } +#ifdef MAGNUM_BUILD_DEPRECATED +CORRADE_IGNORE_DEPRECATED_PUSH UnsignedInt AnySceneImporter::doObject2DCount() const { return _in->object2DCount(); } Int AnySceneImporter::doObject2DForName(const std::string& name) { return _in->object2DForName(name); } std::string AnySceneImporter::doObject2DName(const UnsignedInt id) { return _in->object2DName(id); } @@ -197,6 +202,8 @@ UnsignedInt AnySceneImporter::doObject3DCount() const { return _in->object3DCoun Int AnySceneImporter::doObject3DForName(const std::string& name) { return _in->object3DForName(name); } std::string AnySceneImporter::doObject3DName(const UnsignedInt id) { return _in->object3DName(id); } Containers::Pointer AnySceneImporter::doObject3D(const UnsignedInt id) { return _in->object3D(id); } +CORRADE_IGNORE_DEPRECATED_POP +#endif UnsignedInt AnySceneImporter::doSkin2DCount() const { return _in->skin2DCount(); } Int AnySceneImporter::doSkin2DForName(const std::string& name) { return _in->skin2DForName(name); } diff --git a/src/MagnumPlugins/AnySceneImporter/AnySceneImporter.h b/src/MagnumPlugins/AnySceneImporter/AnySceneImporter.h index 836d504d67..bb84c95cfe 100644 --- a/src/MagnumPlugins/AnySceneImporter/AnySceneImporter.h +++ b/src/MagnumPlugins/AnySceneImporter/AnySceneImporter.h @@ -167,8 +167,11 @@ class MAGNUM_ANYSCENEIMPORTER_EXPORT AnySceneImporter: public AbstractImporter { MAGNUM_ANYSCENEIMPORTER_LOCAL Int doDefaultScene() const override; MAGNUM_ANYSCENEIMPORTER_LOCAL UnsignedInt doSceneCount() const override; + MAGNUM_ANYSCENEIMPORTER_LOCAL UnsignedLong doObjectCount() const override; MAGNUM_ANYSCENEIMPORTER_LOCAL Int doSceneForName(const std::string& name) override; + MAGNUM_ANYSCENEIMPORTER_LOCAL Long doObjectForName(const std::string& name) override; MAGNUM_ANYSCENEIMPORTER_LOCAL std::string doSceneName(UnsignedInt id) override; + MAGNUM_ANYSCENEIMPORTER_LOCAL std::string doObjectName(UnsignedLong id) override; MAGNUM_ANYSCENEIMPORTER_LOCAL Containers::Optional doScene(UnsignedInt id) override; MAGNUM_ANYSCENEIMPORTER_LOCAL UnsignedInt doLightCount() const override; @@ -181,15 +184,21 @@ class MAGNUM_ANYSCENEIMPORTER_EXPORT AnySceneImporter: public AbstractImporter { MAGNUM_ANYSCENEIMPORTER_LOCAL std::string doCameraName(UnsignedInt id) override; MAGNUM_ANYSCENEIMPORTER_LOCAL Containers::Optional doCamera(UnsignedInt id) override; + #ifdef MAGNUM_BUILD_DEPRECATED MAGNUM_ANYSCENEIMPORTER_LOCAL UnsignedInt doObject2DCount() const override; MAGNUM_ANYSCENEIMPORTER_LOCAL Int doObject2DForName(const std::string& name) override; MAGNUM_ANYSCENEIMPORTER_LOCAL std::string doObject2DName(UnsignedInt id) override; + CORRADE_IGNORE_DEPRECATED_PUSH MAGNUM_ANYSCENEIMPORTER_LOCAL Containers::Pointer doObject2D(UnsignedInt id) override; + CORRADE_IGNORE_DEPRECATED_POP MAGNUM_ANYSCENEIMPORTER_LOCAL UnsignedInt doObject3DCount() const override; MAGNUM_ANYSCENEIMPORTER_LOCAL Int doObject3DForName(const std::string& name) override; MAGNUM_ANYSCENEIMPORTER_LOCAL std::string doObject3DName(UnsignedInt id) override; + CORRADE_IGNORE_DEPRECATED_PUSH MAGNUM_ANYSCENEIMPORTER_LOCAL Containers::Pointer doObject3D(UnsignedInt id) override; + CORRADE_IGNORE_DEPRECATED_POP + #endif MAGNUM_ANYSCENEIMPORTER_LOCAL UnsignedInt doSkin2DCount() const override; MAGNUM_ANYSCENEIMPORTER_LOCAL Int doSkin2DForName(const std::string& name) override;