diff --git a/Gems/EMotionFX/Code/CMakeLists.txt b/Gems/EMotionFX/Code/CMakeLists.txt index dace02b2ae..67d0ba6d85 100644 --- a/Gems/EMotionFX/Code/CMakeLists.txt +++ b/Gems/EMotionFX/Code/CMakeLists.txt @@ -109,6 +109,8 @@ if (PAL_TRAIT_BUILD_HOST_TOOLS) AZ::AzToolsFramework Legacy::Editor.Headers 3rdParty::OpenGLInterface + Gem::AtomToolsFramework.Static + Gem::AtomToolsFramework.Editor COMPILE_DEFINITIONS PUBLIC EMFX_EMSTUDIOLYEMBEDDED diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/AtomRender/AnimViewportWidget.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/AtomRender/AnimViewportWidget.cpp new file mode 100644 index 0000000000..df8edeb324 --- /dev/null +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/AtomRender/AnimViewportWidget.cpp @@ -0,0 +1,18 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + +#include + +namespace EMStudio +{ + AnimViewportWidget::AnimViewportWidget(QWidget* parent) + : AtomToolsFramework::RenderViewportWidget(parent) + { + + } +} diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/AtomRender/AnimViewportWidget.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/AtomRender/AnimViewportWidget.h new file mode 100644 index 0000000000..59ea5c6680 --- /dev/null +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/AtomRender/AnimViewportWidget.h @@ -0,0 +1,20 @@ +/* + * Copyright (c) Contributors to the Open 3D Engine Project. + * For complete copyright and license terms please see the LICENSE at the root of this distribution. + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ +#pragma once + +#include + +namespace EMStudio +{ + class AnimViewportWidget + : public AtomToolsFramework::RenderViewportWidget + { + public: + AnimViewportWidget(QWidget* parent = nullptr); + }; +} diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/AtomRender/AtomRenderPlugin.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/AtomRender/AtomRenderPlugin.cpp index 6b64afd50b..6a95b83433 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/AtomRender/AtomRenderPlugin.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/AtomRender/AtomRenderPlugin.cpp @@ -7,12 +7,13 @@ */ #include +#include namespace EMStudio { AtomRenderPlugin::AtomRenderPlugin() + : DockWidgetPlugin() { - } AtomRenderPlugin::~AtomRenderPlugin() @@ -22,6 +23,16 @@ namespace EMStudio bool AtomRenderPlugin::Init() { + m_innerWidget = new QWidget(); + m_dock->setWidget(m_innerWidget); + + QVBoxLayout* verticalLayout = new QVBoxLayout(m_innerWidget); + verticalLayout->setSizeConstraint(QLayout::SetNoConstraint); + verticalLayout->setSpacing(1); + verticalLayout->setMargin(0); + + m_animViewportWidget = new AnimViewportWidget(m_innerWidget); + return true; } } diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/AtomRender/AtomRenderPlugin.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/AtomRender/AtomRenderPlugin.h index 59aabce3c3..d7605e276a 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/AtomRender/AtomRenderPlugin.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/Source/AtomRender/AtomRenderPlugin.h @@ -8,7 +8,11 @@ #pragma once +#if !defined(Q_MOC_RUN) #include +#include +#include +#endif namespace EMStudio { @@ -59,7 +63,7 @@ namespace EMStudio return false; } - bool Init(); + bool Init() override; EMStudioPlugin* Clone() { return new AtomRenderPlugin(); @@ -68,5 +72,9 @@ namespace EMStudio { return EMStudioPlugin::PLUGINTYPE_RENDERING; } + + private: + QWidget* m_innerWidget; + AnimViewportWidget* m_animViewportWidget; }; } diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/renderplugins_files.cmake b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/renderplugins_files.cmake index 339052823d..c184f708f2 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/renderplugins_files.cmake +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/RenderPlugins/renderplugins_files.cmake @@ -13,4 +13,6 @@ set(FILES Source/OpenGLRender/OpenGLRenderPlugin.cpp Source/AtomRender/AtomRenderPlugin.h Source/AtomRender/AtomRenderPlugin.cpp + Source/AtomRender/AnimViewportWidget.h + Source/AtomRender/AnimViewportWidget.cpp )