Add skeleton class for animviewportwidget.
Signed-off-by: rhhong <rhhong@amazon.com>
This commit is contained in:
@@ -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
|
||||
|
||||
+18
@@ -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 <EMotionStudio/Plugins/RenderPlugins/Source/AtomRender/AnimViewportWidget.h>
|
||||
|
||||
namespace EMStudio
|
||||
{
|
||||
AnimViewportWidget::AnimViewportWidget(QWidget* parent)
|
||||
: AtomToolsFramework::RenderViewportWidget(parent)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
+20
@@ -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 <AtomToolsFramework/Viewport/RenderViewportWidget.h>
|
||||
|
||||
namespace EMStudio
|
||||
{
|
||||
class AnimViewportWidget
|
||||
: public AtomToolsFramework::RenderViewportWidget
|
||||
{
|
||||
public:
|
||||
AnimViewportWidget(QWidget* parent = nullptr);
|
||||
};
|
||||
}
|
||||
+12
-1
@@ -7,12 +7,13 @@
|
||||
*/
|
||||
|
||||
#include <EMotionStudio/Plugins/RenderPlugins/Source/AtomRender/AtomRenderPlugin.h>
|
||||
#include <QHBoxLayout>
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
+9
-1
@@ -8,7 +8,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#if !defined(Q_MOC_RUN)
|
||||
#include <EMotionStudio/EMStudioSDK/Source/DockWidgetPlugin.h>
|
||||
#include <EMotionStudio/Plugins/RenderPlugins/Source/AtomRender/AnimViewportWidget.h>
|
||||
#include <QWidget>
|
||||
#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;
|
||||
};
|
||||
}
|
||||
|
||||
+2
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user