Merge pull request #4246 from aws-lumberyard-dev/Atom/guthadam/atomtools_support_ly_set_gem_variant_to_load

AtomTools support ly_set_gem_variant_to_load and other cmake deletions
This commit is contained in:
Guthrie Adams
2021-09-22 11:59:27 -05:00
committed by GitHub
37 changed files with 80 additions and 459 deletions
@@ -176,7 +176,10 @@ namespace AZ
m_isAssetCatalogLoaded = true;
RPI::RPISystemInterface::Get()->InitializeSystemAssets();
if (!RPI::RPISystemInterface::Get()->IsInitialized())
{
RPI::RPISystemInterface::Get()->InitializeSystemAssets();
}
if (!RPI::RPISystemInterface::Get()->IsInitialized())
{
@@ -87,6 +87,7 @@ namespace AtomToolsFramework
AtomToolsApplication ::~AtomToolsApplication()
{
m_styleManager.reset();
AtomToolsMainWindowNotificationBus::Handler::BusDisconnect();
AzToolsFramework::AssetDatabase::AssetDatabaseRequestsBus::Handler::BusDisconnect();
AzToolsFramework::EditorPythonConsoleNotificationBus::Handler::BusDisconnect();
@@ -174,12 +175,14 @@ namespace AtomToolsFramework
AZ::Data::AssetCatalogRequestBus::Broadcast(&AZ::Data::AssetCatalogRequestBus::Events::LoadCatalog, "@assets@/assetcatalog.xml");
AZ::RPI::RPISystemInterface::Get()->InitializeSystemAssets();
if (!AZ::RPI::RPISystemInterface::Get()->IsInitialized())
{
AZ::RPI::RPISystemInterface::Get()->InitializeSystemAssets();
}
LoadSettings();
AtomToolsMainWindowNotificationBus::Handler::BusConnect();
AtomToolsMainWindowFactoryRequestBus::Broadcast(&AtomToolsMainWindowFactoryRequestBus::Handler::CreateMainWindow);
auto editorPythonEventsInterface = AZ::Interface<AzToolsFramework::EditorPythonEventsInterface>::Get();
@@ -206,6 +209,7 @@ namespace AtomToolsFramework
{
// before modules are unloaded, destroy UI to free up any assets it cached
AtomToolsMainWindowFactoryRequestBus::Broadcast(&AtomToolsMainWindowFactoryRequestBus::Handler::DestroyMainWindow);
m_styleManager.reset();
AzToolsFramework::EditorPythonConsoleNotificationBus::Handler::BusDisconnect();
AzToolsFramework::AssetDatabase::AssetDatabaseRequestsBus::Handler::BusDisconnect();
@@ -461,6 +465,7 @@ namespace AtomToolsFramework
void AtomToolsApplication::Stop()
{
AtomToolsMainWindowFactoryRequestBus::Broadcast(&AtomToolsMainWindowFactoryRequestBus::Handler::DestroyMainWindow);
m_styleManager.reset();
UnloadSettings();
Base::Stop();
@@ -468,7 +473,7 @@ namespace AtomToolsFramework
void AtomToolsApplication::QueryApplicationType(AZ::ApplicationTypeQuery& appType) const
{
appType.m_maskValue = AZ::ApplicationTypeQuery::Masks::Game;
appType.m_maskValue = AZ::ApplicationTypeQuery::Masks::Tool;
}
void AtomToolsApplication::OnTraceMessage([[maybe_unused]] AZStd::string_view message)
@@ -93,12 +93,14 @@ ly_add_target(
AUTOMOC
FILES_CMAKE
materialeditor_files.cmake
Source/Platform/${PAL_PLATFORM_NAME}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
${pal_source_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
PLATFORM_INCLUDE_FILES
${pal_source_dir}/tool_dependencies_${PAL_PLATFORM_NAME_LOWERCASE}.cmake
INCLUDE_DIRECTORIES
PRIVATE
.
Source
Source/Platform/${PAL_PLATFORM_NAME}
${pal_source_dir}
PUBLIC
Include
BUILD_DEPENDENCIES
@@ -108,8 +110,14 @@ ly_add_target(
Gem::MaterialEditor.Window
Gem::MaterialEditor.Viewport
Gem::MaterialEditor.Document
RUNTIME_DEPENDENCIES
Gem::AtomToolsFramework.Editor
Gem::EditorPythonBindings.Editor
Gem::ImageProcessingAtom.Editor
)
ly_set_gem_variant_to_load(TARGETS MaterialEditor VARIANTS Tools)
# Add a 'builders' alias to allow the MaterialEditor root gem path to be added to the generated
# cmake_dependencies.<project>.assetprocessor.setreg to allow the asset scan folder for it to be added
ly_create_alias(NAME MaterialEditor.Builders NAMESPACE Gem)
@@ -118,26 +126,6 @@ ly_create_alias(NAME MaterialEditor.Builders NAMESPACE Gem)
# Editor opens up the MaterialEditor
ly_add_dependencies(Editor Gem::MaterialEditor)
ly_add_target_files(
TARGETS
MaterialEditor
FILES
${CMAKE_CURRENT_LIST_DIR}/../MaterialEditor.xml
OUTPUT_SUBDIRECTORY
Gems/Atom/Tools/MaterialEditor
)
ly_add_target_dependencies(
TARGETS
MaterialEditor
DEPENDENCIES_FILES
tool_dependencies.cmake
Source/Platform/${PAL_PLATFORM_NAME}/tool_dependencies_${PAL_PLATFORM_NAME_LOWERCASE}.cmake
# The Material Editor needs the LyShine "Tools" gem variant for the custom LyShine pass
DEPENDENT_TARGETS
Gem::LyShine.Tools
)
# Inject the project path into the MaterialEditor VS debugger command arguments if the build system being invoked
# in a project centric view
if(NOT PROJECT_NAME STREQUAL "O3DE")
@@ -1,38 +0,0 @@
/*
* 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 <AzCore/std/string/string.h>
#include <QWidget>
#include <AzFramework/Windowing/WindowBus.h>
namespace Platform
{
void LoadPluginDependencies()
{
AZ_Warning("Material Editor", false, "LoadPluginDependencies() function is not implemented");
}
void ProcessInput(void* message)
{
AZ_Warning("Material Editor", false, "ProcessInput() function is not implemented");
}
AzFramework::NativeWindowHandle GetWindowHandle(WId winId)
{
AZ_Warning("Material Editor", false, "GetWindowHandle() function is not implemented");
AZ_UNUSED(winId);
return nullptr;
}
AzFramework::WindowSize GetClientAreaSize(AzFramework::NativeWindowHandle window)
{
AZ_Warning("Material Editor", false, "GetClientAreaSize() function is not implemented");
AZ_UNUSED(window);
return AzFramework::WindowSize{1,1};
}
}
@@ -9,5 +9,4 @@
set(FILES
MaterialEditor_Traits_Platform.h
MaterialEditor_Traits_Linux.h
MaterialEditor_Linux.cpp
)
@@ -6,5 +6,5 @@
#
#
set(GEM_DEPENDENCIES
set(LY_RUNTIME_DEPENDENCIES
)
@@ -1,38 +0,0 @@
/*
* 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 <AzCore/std/string/string.h>
#include <QWidget>
#include <AzFramework/Windowing/WindowBus.h>
namespace Platform
{
void LoadPluginDependencies()
{
AZ_Warning("Material Editor", false, "LoadPluginDependencies() function is not implemented");
}
void ProcessInput(void* message)
{
AZ_Warning("Material Editor", false, "ProcessInput() function is not implemented");
}
AzFramework::NativeWindowHandle GetWindowHandle(WId winId)
{
AZ_Warning("Material Editor", false, "GetWindowHandle() function is not implemented");
AZ_UNUSED(winId);
return nullptr;
}
AzFramework::WindowSize GetClientAreaSize(AzFramework::NativeWindowHandle window)
{
AZ_Warning("Material Editor", false, "GetClientAreaSize() function is not implemented");
AZ_UNUSED(window);
return AzFramework::WindowSize{1,1};
}
}
@@ -9,5 +9,4 @@
set(FILES
MaterialEditor_Traits_Platform.h
MaterialEditor_Traits_Mac.h
MaterialEditor_Mac.cpp
)
@@ -6,5 +6,5 @@
#
#
set(GEM_DEPENDENCIES
set(LY_RUNTIME_DEPENDENCIES
)
@@ -1,58 +0,0 @@
/*
* 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 <AzCore/std/string/string.h>
#include <AzFramework/API/ApplicationAPI.h>
#include <QDir>
#include <QWidget>
#include <MaterialEditor_Traits_Platform.h>
namespace Platform
{
void ProcessInput(void* message)
{
MSG* msg = (MSG*)message;
// Ensure that the Windows WM_INPUT messages get passed through to the AzFramework input system,
// but only while in game mode so we don't accumulate raw input events before we start actually
// ticking the input devices, otherwise the queued events will get sent when entering game mode.
if (msg->message == WM_INPUT)
{
UINT rawInputSize;
const UINT rawInputHeaderSize = sizeof(RAWINPUTHEADER);
GetRawInputData((HRAWINPUT)msg->lParam, RID_INPUT, NULL, &rawInputSize, rawInputHeaderSize);
LPBYTE rawInputBytes = new BYTE[rawInputSize];
GetRawInputData((HRAWINPUT)msg->lParam, RID_INPUT, rawInputBytes, &rawInputSize, rawInputHeaderSize);
RAWINPUT* rawInput = (RAWINPUT*)rawInputBytes;
AzFramework::RawInputNotificationBusWindows::Broadcast(
&AzFramework::RawInputNotificationBusWindows::Events::OnRawInputEvent, *rawInput);
}
}
AzFramework::NativeWindowHandle GetWindowHandle(WId winId)
{
return reinterpret_cast<HWND>(winId);
}
AzFramework::WindowSize GetClientAreaSize(AzFramework::NativeWindowHandle window)
{
RECT r;
if (GetWindowRect(reinterpret_cast<HWND>(window), &r))
{
return AzFramework::WindowSize{aznumeric_cast<uint32_t>(r.right - r.left), aznumeric_cast<uint32_t>(r.bottom - r.top)};
}
else
{
AZ_Assert(false, "Failed to get dimensions for window");
return AzFramework::WindowSize{};
}
}
}
@@ -9,6 +9,5 @@
set(FILES
MaterialEditor_Traits_Platform.h
MaterialEditor_Traits_Windows.h
MaterialEditor_Windows.cpp
MaterialEditor.rc
)
@@ -6,6 +6,6 @@
#
#
set(GEM_DEPENDENCIES
set(LY_RUNTIME_DEPENDENCIES
Gem::QtForPython.Editor
)
@@ -231,12 +231,10 @@ namespace MaterialEditor
MaterialViewportNotificationBus::Handler::BusConnect();
AZ::TickBus::Handler::BusConnect();
AZ::TransformNotificationBus::MultiHandler::BusConnect(m_cameraEntity->GetId());
AzFramework::WindowSystemRequestBus::Handler::BusConnect();
}
MaterialViewportRenderer::~MaterialViewportRenderer()
{
AzFramework::WindowSystemRequestBus::Handler::BusDisconnect();
AZ::TransformNotificationBus::MultiHandler::BusDisconnect();
AZ::TickBus::Handler::BusDisconnect();
AtomToolsFramework::AtomToolsDocumentNotificationBus::Handler::BusDisconnect();
@@ -287,11 +285,6 @@ namespace MaterialEditor
return m_viewportController;
}
AzFramework::NativeWindowHandle MaterialViewportRenderer::GetDefaultWindowHandle()
{
return (m_windowContext) ? m_windowContext->GetWindowHandle() : nullptr;
}
void MaterialViewportRenderer::OnDocumentOpened(const AZ::Uuid& documentId)
{
AZ::Data::Instance<AZ::RPI::Material> materialInstance;
@@ -16,7 +16,6 @@
#include <AtomToolsFramework/Document/AtomToolsDocumentNotificationBus.h>
#include <AzCore/Component/TickBus.h>
#include <AzCore/Component/TransformBus.h>
#include <AzFramework/Windowing/WindowBus.h>
#include <Viewport/InputController/MaterialEditorViewportInputController.h>
namespace AZ
@@ -46,7 +45,6 @@ namespace MaterialEditor
, public AtomToolsFramework::AtomToolsDocumentNotificationBus::Handler
, public MaterialViewportNotificationBus::Handler
, public AZ::TransformNotificationBus::MultiHandler
, public AzFramework::WindowSystemRequestBus::Handler
{
public:
AZ_CLASS_ALLOCATOR(MaterialViewportRenderer, AZ::SystemAllocator, 0);
@@ -81,9 +79,6 @@ namespace MaterialEditor
// AZ::TransformNotificationBus::MultiHandler overrides...
void OnTransformChanged(const AZ::Transform&, const AZ::Transform&) override;
// AzFramework::WindowSystemRequestBus::Handler overrides ...
AzFramework::NativeWindowHandle GetDefaultWindowHandle() override;
using DirectionalLightHandle = AZ::Render::DirectionalLightFeatureProcessorInterface::LightHandle;
AZ::Data::Instance<AZ::RPI::SwapChainPass> m_swapChainPass;
@@ -13,24 +13,16 @@
#include <Atom/RPI.Public/ViewportContextBus.h>
#include <Atom/RPI.Public/WindowContext.h>
#include <Source/Viewport/MaterialViewportRenderer.h>
#include <Source/Viewport/MaterialViewportWidget.h>
#include <Viewport/MaterialViewportRenderer.h>
#include <Viewport/MaterialViewportWidget.h>
AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") // disable warnings spawned by QT
#include <QAbstractEventDispatcher>
#include <QWindow>
#include "Source/Viewport/ui_MaterialViewportWidget.h"
#include "Viewport/ui_MaterialViewportWidget.h"
AZ_POP_DISABLE_WARNING
#include <AzCore/PlatformIncl.h>
#include <AzFramework/Viewport/ViewportControllerList.h>
namespace Platform
{
void ProcessInput(void* message);
}
namespace MaterialEditor
{
@@ -40,11 +32,6 @@ namespace MaterialEditor
{
m_ui->setupUi(this);
if (auto dispatcher = QAbstractEventDispatcher::instance())
{
dispatcher->installNativeEventFilter(this);
}
// The viewport context created by AtomToolsFramework::RenderViewportWidget has no name.
// Systems like frame capturing and post FX expect there to be a context with DefaultViewportContextName
auto viewportContextManager = AZ::Interface<AZ::RPI::ViewportContextRequestsInterface>::Get();
@@ -54,13 +41,4 @@ namespace MaterialEditor
m_renderer = AZStd::make_unique<MaterialViewportRenderer>(GetViewportContext()->GetWindowContext());
GetControllerList()->Add(m_renderer->GetController());
}
// This is a temporary fix to get input working in Qt window, otherwise it wont receive input events
// This will later be handled on the QApplication subclass level
bool MaterialViewportWidget::nativeEventFilter(const QByteArray& /*eventType*/, void* message, long* /*result*/)
{
Platform::ProcessInput(message);
return false;
}
} // namespace MaterialEditor
@@ -8,12 +8,10 @@
#pragma once
#if !defined(Q_MOC_RUN)
#include <AzCore/Asset/AssetCommon.h>
#include <AzFramework/Windowing/WindowBus.h>
AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") // disable warnings spawned by QT
#include <QWidget>
#include <QAbstractNativeEventFilter>
AZ_POP_DISABLE_WARNING
#endif
@@ -38,14 +36,11 @@ namespace MaterialEditor
class MaterialViewportWidget
: public AtomToolsFramework::RenderViewportWidget
, public QAbstractNativeEventFilter
{
public:
MaterialViewportWidget(QWidget* parent = nullptr);
QScopedPointer<Ui::MaterialViewportWidget> m_ui;
AZStd::unique_ptr<MaterialViewportRenderer> m_renderer;
bool nativeEventFilter(const QByteArray& eventType, void* message, long* result) override;
};
} // namespace MaterialEditor
@@ -10,5 +10,4 @@ set(FILES
Source/main.cpp
Source/MaterialEditorApplication.cpp
Source/MaterialEditorApplication.h
tool_dependencies.cmake
)
@@ -1,22 +0,0 @@
#
# 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
#
#
set(GEM_DEPENDENCIES
Gem::Atom_RHI_Null.Private
Gem::Atom_RHI_DX12.Private
Gem::Atom_RHI_Vulkan.Private
Gem::Atom_RHI.Private
Gem::Atom_Component_DebugCamera
Gem::Atom_RPI.Editor
Gem::Atom_RPI.Builders
Gem::Atom_Feature_Common.Editor
Gem::AtomToolsFramework.Editor
Gem::AtomLyIntegration_CommonFeatures.Editor
Gem::EditorPythonBindings.Editor
Gem::ImageProcessingAtom.Editor
)
@@ -1,69 +0,0 @@
<ObjectStream version="3">
<Class name="ComponentApplication::Descriptor" version="2" type="{70277A3E-2AF5-4309-9BBF-6161AFBDE792}">
<Class name="bool" field="useExistingAllocator" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="bool" field="grabAllMemory" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="bool" field="allocationRecords" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="bool" field="allocationRecordsSaveNames" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="bool" field="allocationRecordsAttemptDecodeImmediately" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="int" field="recordingMode" value="2" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AZ::u64" field="stackRecordLevels" value="5" type="{D6597933-47CD-4FC8-B911-63F3E2B0993A}"/>
<Class name="bool" field="autoIntegrityCheck" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="bool" field="markUnallocatedMemory" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="bool" field="doNotUsePools" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="bool" field="enableScriptReflection" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="unsigned int" field="pageSize" value="65536" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="unsigned int" field="poolPageSize" value="4096" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="unsigned int" field="blockAlignment" value="65536" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZ::u64" field="blockSize" value="0" type="{D6597933-47CD-4FC8-B911-63F3E2B0993A}"/>
<Class name="AZ::u64" field="reservedOS" value="0" type="{D6597933-47CD-4FC8-B911-63F3E2B0993A}"/>
<Class name="AZ::u64" field="reservedDebug" value="0" type="{D6597933-47CD-4FC8-B911-63F3E2B0993A}"/>
<Class name="bool" field="enableDrilling" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="AZStd::vector" field="modules" type="{8E779F80-AEAA-565B-ABB1-DE10B18CF995}">
<Class name="DynamicModuleDescriptor" field="element" type="{D2932FA3-9942-4FD2-A703-2E750F57C003}">
<Class name="AZStd::string" field="dynamicLibraryPath" value="Gem.Atom_RHI_DX12.Private.e011969cf32442fdaac2443a960ab5ff.v0.1.0" type="{189CC2ED-FDDE-5680-91D4-9F630A79187F}"/>
</Class>
<Class name="DynamicModuleDescriptor" field="element" type="{D2932FA3-9942-4FD2-A703-2E750F57C003}">
<Class name="AZStd::string" field="dynamicLibraryPath" value="Gem.Atom_RHI_Vulkan.Private.150d40d376124d98a388dfe890551c03.v0.1.0" type="{189CC2ED-FDDE-5680-91D4-9F630A79187F}"/>
</Class>
<Class name="DynamicModuleDescriptor" field="element" type="{D2932FA3-9942-4FD2-A703-2E750F57C003}">
<Class name="AZStd::string" field="dynamicLibraryPath" value="Gem.Atom_RHI.Private.fb7f322c8bdb42228d9e155c954f98bd.v0.1.0" type="{189CC2ED-FDDE-5680-91D4-9F630A79187F}"/>
</Class>
<Class name="DynamicModuleDescriptor" field="element" type="{D2932FA3-9942-4FD2-A703-2E750F57C003}">
<Class name="AZStd::string" field="dynamicLibraryPath" value="Gem.Atom_RHI_DX12.Private.e011969cf32442fdaac2443a960ab5ff.v0.1.0" type="{189CC2ED-FDDE-5680-91D4-9F630A79187F}"/>
</Class>
<Class name="DynamicModuleDescriptor" field="element" type="{D2932FA3-9942-4FD2-A703-2E750F57C003}">
<Class name="AZStd::string" field="dynamicLibraryPath" value="Gem.Atom_RHI.Private.fb7f322c8bdb42228d9e155c954f98bd.v0.1.0" type="{189CC2ED-FDDE-5680-91D4-9F630A79187F}"/>
</Class>
<Class name="DynamicModuleDescriptor" field="element" type="{D2932FA3-9942-4FD2-A703-2E750F57C003}">
<Class name="AZStd::string" field="dynamicLibraryPath" value="Gem.Atom_RPI.Private.a218db9eb2114477b46600fea4441a6c.v0.1.0" type="{189CC2ED-FDDE-5680-91D4-9F630A79187F}"/>
</Class>
<Class name="DynamicModuleDescriptor" field="element" type="{D2932FA3-9942-4FD2-A703-2E750F57C003}">
<Class name="AZStd::string" field="dynamicLibraryPath" value="Gem.Atom_Component_DebugCamera.013d1b42ad314c929b292c143bcbf045.v0.1.0" type="{189CC2ED-FDDE-5680-91D4-9F630A79187F}"/>
</Class>
<Class name="DynamicModuleDescriptor" field="element" type="{D2932FA3-9942-4FD2-A703-2E750F57C003}">
<Class name="AZStd::string" field="dynamicLibraryPath" value="Gem.Atom_RPI.Builders.a218db9eb2114477b46600fea4441a6c.v0.1.0" type="{189CC2ED-FDDE-5680-91D4-9F630A79187F}"/>
</Class>
<Class name="DynamicModuleDescriptor" field="element" type="{D2932FA3-9942-4FD2-A703-2E750F57C003}">
<Class name="AZStd::string" field="dynamicLibraryPath" value="Gem.Atom_Feature_Common.Editor.b58e5eed0901428ca78544b04dbd61bd.v0.1.0" type="{189CC2ED-FDDE-5680-91D4-9F630A79187F}"/>
</Class>
<Class name="DynamicModuleDescriptor" field="element" type="{D2932FA3-9942-4FD2-A703-2E750F57C003}">
<Class name="AZStd::string" field="dynamicLibraryPath" value="Gem.AtomLyIntegration_CommonFeatures.Editor.4e981f3b17394f5d84d674fff0f54f4f.v0.1.0" type="{189CC2ED-FDDE-5680-91D4-9F630A79187F}"/>
</Class>
<Class name="DynamicModuleDescriptor" field="element" type="{D2932FA3-9942-4FD2-A703-2E750F57C003}">
<Class name="AZStd::string" field="dynamicLibraryPath" value="Gem.EditorPythonBindings.Editor.b658359393884c4381c2fe2952b1472a.v0.1.0" type="{189CC2ED-FDDE-5680-91D4-9F630A79187F}"/>
</Class>
<Class name="DynamicModuleDescriptor" field="element" type="{D2932FA3-9942-4FD2-A703-2E750F57C003}">
<Class name="AZStd::string" field="dynamicLibraryPath" value="Gem.ImageProcessingAtom.Editor.9d10b00be96045caa64c705e5772cb64.v0.1.0" type="{189CC2ED-FDDE-5680-91D4-9F630A79187F}"/>
</Class>
</Class>
</Class>
<Class name="AZ::Entity" version="2" type="{75651658-8663-478D-9090-2432DFCAFA44}">
<Class name="EntityId" field="Id" version="1" type="{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}">
<Class name="AZ::u64" field="id" value="0" type="{D6597933-47CD-4FC8-B911-63F3E2B0993A}"/>
</Class>
<Class name="AZStd::string" field="Name" value="SystemEntity" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="AZStd::vector" field="Components" type="{0D23B755-6E8F-5C6C-B7C9-A352A55DC1DF}"/>
<Class name="bool" field="IsDependencyReady" value="false" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
<Class name="bool" field="IsRuntimeActive" value="true" type="{A0CA880C-AFE4-43CB-926C-59AC48496112}"/>
</Class>
</ObjectStream>
@@ -43,6 +43,7 @@ ly_add_target(
NAMESPACE Gem
AUTOMOC
AUTOUIC
AUTORCC
FILES_CMAKE
shadermanagementconsolewindow_files.cmake
INCLUDE_DIRECTORIES
@@ -64,6 +65,8 @@ ly_add_target(
FILES_CMAKE
shadermanagementconsole_files.cmake
${pal_source_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
PLATFORM_INCLUDE_FILES
${pal_source_dir}/tool_dependencies_${PAL_PLATFORM_NAME_LOWERCASE}.cmake
INCLUDE_DIRECTORIES
PRIVATE
.
@@ -78,27 +81,16 @@ ly_add_target(
Gem::ShaderManagementConsole.Window
Gem::ShaderManagementConsole.Document
RUNTIME_DEPENDENCIES
Gem::Atom_RHI_DX12.Private
Gem::Atom_RHI_Vulkan.Private
Gem::Atom_RHI.Private
Gem::Atom_RPI.Private
Gem::Atom_RPI.Builders
Gem::Atom_Feature_Common.Editor
Gem::AtomToolsFramework.Editor
Gem::EditorPythonBindings.Editor
)
ly_set_gem_variant_to_load(TARGETS ShaderManagementConsole VARIANTS Tools)
# Add build dependency to Editor for the ShaderManagementConsole application since
# Editor opens up the ShaderManagementConsole
ly_add_dependencies(Editor Gem::ShaderManagementConsole)
ly_add_target_dependencies(
TARGETS
ShaderManagementConsole
DEPENDENCIES_FILES
tool_dependencies.cmake
Source/Platform/${PAL_PLATFORM_NAME}/tool_dependencies_${PAL_PLATFORM_NAME_LOWERCASE}.cmake
)
# Inject the project path into the ShaderManagementConsole VS debugger command arguments if the build system being invoked
# in a project centric view
if(NOT PROJECT_NAME STREQUAL "O3DE")
@@ -108,9 +100,14 @@ endif()
# Adds the ShaderManagementConsole target as a C preprocessor define so that it can be used as a Settings Registry
# specialization in order to look up the generated .setreg which contains the dependencies
# specified for the target.
set_source_files_properties(
Source/ShaderManagementConsoleApplication.cpp
PROPERTIES
COMPILE_DEFINITIONS
LY_CMAKE_TARGET="ShaderManagementConsole"
)
if(TARGET ShaderManagementConsole)
set_source_files_properties(
Source/ShaderManagementConsoleApplication.cpp
PROPERTIES
COMPILE_DEFINITIONS
LY_CMAKE_TARGET="ShaderManagementConsole"
)
else()
message(FATAL_ERROR "Cannot set LY_CMAKE_TARGET define to ShaderManagementConsole as the target doesn't exist anymore."
" Perhaps it has been renamed")
endif()
@@ -1,10 +0,0 @@
#
# 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
#
#
set(GEM_DEPENDENCIES
)
@@ -6,4 +6,4 @@
#
#
set(PAL_TRAIT_ATOM_SHADER_MANAGEMENT_CONSOLE_APPLICATION_SUPPORTED FALSE)
set(PAL_TRAIT_ATOM_SHADER_MANAGEMENT_CONSOLE_APPLICATION_SUPPORTED TRUE)
@@ -0,0 +1,11 @@
/*
* 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
#define AZ_TRAIT_SHADER_MANAGEMENT_CONSOLE_EXT ""
@@ -0,0 +1,10 @@
/*
* 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 <ShaderManagementConsole_Traits_Linux.h>
@@ -7,4 +7,6 @@
#
set(FILES
ShaderManagementConsole_Traits_Platform.h
ShaderManagementConsole_Traits_Linux.h
)
@@ -6,5 +6,5 @@
#
#
set(GEM_DEPENDENCIES
set(LY_RUNTIME_DEPENDENCIES
)
@@ -1,33 +0,0 @@
/*
* 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 <AzCore/std/string/string.h>
#include <QWidget>
#include <AzFramework/Windowing/WindowBus.h>
namespace Platform
{
void ProcessInput(void* message)
{
AZ_Warning("Shader Management Console", false, "ProcessInput() function is not implemented");
}
AzFramework::NativeWindowHandle GetWindowHandle(WId winId)
{
AZ_Warning("Shader Management Console", false, "GetWindowHandle() function is not implemented");
AZ_UNUSED(winId);
return nullptr;
}
AzFramework::WindowSize GetClientAreaSize(AzFramework::NativeWindowHandle window)
{
AZ_Warning("Shader Management Console", false, "GetClientAreaSize() function is not implemented");
AZ_UNUSED(window);
return AzFramework::WindowSize{1,1};
}
}
@@ -9,5 +9,4 @@
set(FILES
ShaderManagementConsole_Traits_Platform.h
ShaderManagementConsole_Traits_Mac.h
ShaderManagementConsole_Mac.cpp
)
@@ -6,5 +6,5 @@
#
#
set(GEM_DEPENDENCIES
set(LY_RUNTIME_DEPENDENCIES
)
@@ -1,56 +0,0 @@
/*
* 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 <AzCore/std/string/string.h>
#include <QWidget>
#include <ShaderManagementConsole_Traits_Platform.h>
namespace Platform
{
void ProcessInput(void* message)
{
MSG* msg = (MSG*)message;
// Ensure that the Windows WM_INPUT messages get passed through to the AzFramework input system,
// but only while in game mode so we don't accumulate raw input events before we start actually
// ticking the input devices, otherwise the queued events will get sent when entering game mode.
if (msg->message == WM_INPUT)
{
UINT rawInputSize;
const UINT rawInputHeaderSize = sizeof(RAWINPUTHEADER);
GetRawInputData((HRAWINPUT)msg->lParam, RID_INPUT, NULL, &rawInputSize, rawInputHeaderSize);
LPBYTE rawInputBytes = new BYTE[rawInputSize];
GetRawInputData((HRAWINPUT)msg->lParam, RID_INPUT, rawInputBytes, &rawInputSize, rawInputHeaderSize);
RAWINPUT* rawInput = (RAWINPUT*)rawInputBytes;
AzFramework::RawInputNotificationBusWindows::Broadcast(
&AzFramework::RawInputNotificationBusWindows::Events::OnRawInputEvent, *rawInput);
}
}
AzFramework::NativeWindowHandle GetWindowHandle(WId winId)
{
return reinterpret_cast<HWND>(winId);
}
AzFramework::WindowSize GetClientAreaSize(AzFramework::NativeWindowHandle window)
{
RECT r;
if (GetWindowRect(reinterpret_cast<HWND>(window), &r))
{
return AzFramework::WindowSize{aznumeric_cast<uint32_t>(r.right - r.left), aznumeric_cast<uint32_t>(r.bottom - r.top)};
}
else
{
AZ_Assert(false, "Failed to get dimensions for window");
return AzFramework::WindowSize{};
}
}
}
@@ -9,6 +9,5 @@
set(FILES
ShaderManagementConsole_Traits_Platform.h
ShaderManagementConsole_Traits_Windows.h
ShaderManagementConsole_Windows.cpp
ShaderManagementConsole.rc
)
@@ -6,6 +6,6 @@
#
#
set(GEM_DEPENDENCIES
set(LY_RUNTIME_DEPENDENCIES
Gem::QtForPython.Editor
)
@@ -1,10 +0,0 @@
#
# 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
#
#
set(GEM_DEPENDENCIES
)
@@ -1,22 +0,0 @@
#
# 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
#
#
set(GEM_DEPENDENCIES
Gem::Atom_RHI_Null.Private
Gem::Atom_RHI_DX12.Private
Gem::Atom_RHI_Vulkan.Private
Gem::Atom_RHI.Private
Gem::Atom_Component_DebugCamera
Gem::Atom_RPI.Editor
Gem::Atom_RPI.Builders
Gem::Atom_Feature_Common.Editor
Gem::AtomToolsFramework.Editor
Gem::AtomLyIntegration_CommonFeatures.Editor
Gem::EditorPythonBindings.Editor
Gem::ImageProcessingAtom.Editor
)
@@ -82,6 +82,8 @@ namespace AZ::Render
void AtomViewportDisplayIconsSystemComponent::Activate()
{
m_drawContextRegistered = false;
AzToolsFramework::EditorViewportIconDisplay::Register(this);
Bootstrap::NotificationBus::Handler::BusConnect();
@@ -97,9 +99,10 @@ namespace AZ::Render
{
return;
}
if (perViewportDynamicDrawInterface)
if (perViewportDynamicDrawInterface && m_drawContextRegistered)
{
perViewportDynamicDrawInterface->UnregisterDynamicDrawContext(m_drawContextName);
m_drawContextRegistered = false;
}
AzToolsFramework::EditorViewportIconDisplay::Unregister(this);
@@ -367,6 +370,8 @@ namespace AZ::Render
drawContext->EndInit();
});
m_drawContextRegistered = true;
Data::AssetBus::Handler::BusDisconnect();
}
} // namespace AZ::Render
@@ -77,6 +77,8 @@ namespace AZ
};
AZStd::unordered_map<IconId, IconData> m_iconData;
IconId m_currentId = 0;
bool m_drawContextRegistered = false;
};
} // namespace Render
} // namespace AZ
@@ -49,7 +49,6 @@ namespace HttpRequestor
{
m_thread.join();
}
}
void Manager::AddRequest(Parameters && httpRequestParameters)