Atom Tools: Removing unnecessary modules, components, and dead code from ME
• Working toward creating a standalone application template Removing application level modules and system components that make it difficult to navigate the project and add a lot of boilerplate code • Temporarily keeping viewport module and components because shutting down the application deactivates module entities before system entities without respecting component service dependency order. This caused several RPI assets and names to leak because they were not being destroyed in the correct order. • Fixing include paths not referenced source folders • Mostly cleanup and reorganization, no behavioral changes Signed-off-by: Guthrie Adams <guthadam@amazon.com>
This commit is contained in:
@@ -158,6 +158,7 @@ namespace AtomToolsFramework
|
||||
components.end(),
|
||||
{
|
||||
azrtti_typeid<AzToolsFramework::AssetBrowser::AssetBrowserComponent>(),
|
||||
azrtti_typeid<AzToolsFramework::AssetSystem::AssetSystemComponent>(),
|
||||
azrtti_typeid<AzToolsFramework::Thumbnailer::ThumbnailerComponent>(),
|
||||
azrtti_typeid<AzToolsFramework::Components::PropertyManagerComponent>(),
|
||||
azrtti_typeid<AzToolsFramework::PerforceComponent>(),
|
||||
@@ -187,6 +188,9 @@ namespace AtomToolsFramework
|
||||
AzToolsFramework::AssetBrowser::AssetDatabaseLocationNotificationBus::Broadcast(
|
||||
&AzToolsFramework::AssetBrowser::AssetDatabaseLocationNotifications::OnDatabaseInitialized);
|
||||
|
||||
AzToolsFramework::SourceControlConnectionRequestBus::Broadcast(
|
||||
&AzToolsFramework::SourceControlConnectionRequests::EnableSourceControl, true);
|
||||
|
||||
if (!AZ::RPI::RPISystemInterface::Get()->IsInitialized())
|
||||
{
|
||||
AZ::RPI::RPISystemInterface::Get()->InitializeSystemAssets();
|
||||
|
||||
+3
-3
@@ -30,7 +30,7 @@ namespace AtomToolsFramework
|
||||
{
|
||||
ec->Class<AtomToolsFrameworkSystemComponent>("AtomToolsFrameworkSystemComponent", "")
|
||||
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
|
||||
->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("System", 0xc94d118b))
|
||||
->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC_CE("System"))
|
||||
->Attribute(AZ::Edit::Attributes::AutoExpand, true)
|
||||
;
|
||||
}
|
||||
@@ -39,12 +39,12 @@ namespace AtomToolsFramework
|
||||
|
||||
void AtomToolsFrameworkSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
|
||||
{
|
||||
provided.push_back(AZ_CRC("AtomToolsFrameworkSystemService"));
|
||||
provided.push_back(AZ_CRC_CE("AtomToolsFrameworkSystemService"));
|
||||
}
|
||||
|
||||
void AtomToolsFrameworkSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
|
||||
{
|
||||
incompatible.push_back(AZ_CRC("AtomToolsFrameworkSystemService"));
|
||||
incompatible.push_back(AZ_CRC_CE("AtomToolsFrameworkSystemService"));
|
||||
}
|
||||
|
||||
void AtomToolsFrameworkSystemComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required)
|
||||
|
||||
@@ -160,7 +160,7 @@ namespace AtomToolsFramework
|
||||
ApplyRangeEditDataAttributes<float>();
|
||||
break;
|
||||
case DynamicPropertyType::Color:
|
||||
AddEditDataAttribute(AZ_CRC("ColorEditorConfiguration", 0xc8b9510e), AZ::RPI::ColorUtils::GetRgbEditorConfig());
|
||||
AddEditDataAttribute(AZ_CRC_CE("ColorEditorConfiguration"), AZ::RPI::ColorUtils::GetRgbEditorConfig());
|
||||
break;
|
||||
case DynamicPropertyType::Enum:
|
||||
m_editData.m_elementId = AZ::Edit::UIHandlers::ComboBox;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <AtomToolsFramework/Inspector/InspectorGroupHeaderWidget.h>
|
||||
#include <AtomToolsFramework/Inspector/InspectorGroupWidget.h>
|
||||
#include <AtomToolsFramework/Inspector/InspectorWidget.h>
|
||||
#include <Source/Inspector/ui_InspectorWidget.h>
|
||||
#include <Inspector/ui_InspectorWidget.h>
|
||||
|
||||
namespace AtomToolsFramework
|
||||
{
|
||||
|
||||
@@ -18,78 +18,12 @@ if(NOT PAL_TRAIT_ATOM_MATERIAL_EDITOR_APPLICATION_SUPPORTED)
|
||||
return()
|
||||
endif()
|
||||
|
||||
|
||||
ly_add_target(
|
||||
NAME MaterialEditor.Document STATIC
|
||||
NAMESPACE Gem
|
||||
AUTOMOC
|
||||
FILES_CMAKE
|
||||
materialeditordocument_files.cmake
|
||||
INCLUDE_DIRECTORIES
|
||||
PRIVATE
|
||||
.
|
||||
Source
|
||||
PUBLIC
|
||||
Include
|
||||
BUILD_DEPENDENCIES
|
||||
PUBLIC
|
||||
Gem::AtomToolsFramework.Static
|
||||
Gem::AtomToolsFramework.Editor
|
||||
Gem::Atom_RPI.Edit
|
||||
Gem::Atom_RPI.Public
|
||||
Gem::Atom_RHI.Reflect
|
||||
)
|
||||
|
||||
ly_add_target(
|
||||
NAME MaterialEditor.Window STATIC
|
||||
NAMESPACE Gem
|
||||
AUTOMOC
|
||||
AUTOUIC
|
||||
AUTORCC
|
||||
FILES_CMAKE
|
||||
materialeditorwindow_files.cmake
|
||||
INCLUDE_DIRECTORIES
|
||||
PRIVATE
|
||||
.
|
||||
Source
|
||||
PUBLIC
|
||||
Include
|
||||
BUILD_DEPENDENCIES
|
||||
PUBLIC
|
||||
Gem::AtomToolsFramework.Static
|
||||
Gem::AtomToolsFramework.Editor
|
||||
Gem::Atom_RPI.Public
|
||||
Gem::Atom_Feature_Common.Public
|
||||
)
|
||||
|
||||
ly_add_target(
|
||||
NAME MaterialEditor.Viewport STATIC
|
||||
NAMESPACE Gem
|
||||
AUTOMOC
|
||||
AUTOUIC
|
||||
FILES_CMAKE
|
||||
materialeditorviewport_files.cmake
|
||||
INCLUDE_DIRECTORIES
|
||||
PRIVATE
|
||||
.
|
||||
Source
|
||||
Public
|
||||
Include
|
||||
BUILD_DEPENDENCIES
|
||||
PUBLIC
|
||||
Gem::AtomToolsFramework.Static
|
||||
Gem::AtomToolsFramework.Editor
|
||||
Gem::Atom_RHI.Public
|
||||
Gem::Atom_RPI.Public
|
||||
Gem::Atom_Feature_Common.Static
|
||||
Gem::Atom_Component_DebugCamera.Static
|
||||
Gem::AtomLyIntegration_CommonFeatures.Static
|
||||
)
|
||||
|
||||
ly_add_target(
|
||||
NAME MaterialEditor EXECUTABLE
|
||||
NAMESPACE Gem
|
||||
AUTOMOC
|
||||
AUTOUIC
|
||||
AUTORCC
|
||||
FILES_CMAKE
|
||||
materialeditor_files.cmake
|
||||
${pal_source_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
|
||||
@@ -106,9 +40,13 @@ ly_add_target(
|
||||
PRIVATE
|
||||
Gem::AtomToolsFramework.Static
|
||||
Gem::AtomToolsFramework.Editor
|
||||
Gem::MaterialEditor.Window
|
||||
Gem::MaterialEditor.Viewport
|
||||
Gem::MaterialEditor.Document
|
||||
Gem::Atom_RHI.Public
|
||||
Gem::Atom_RHI.Reflect
|
||||
Gem::Atom_RPI.Edit
|
||||
Gem::Atom_RPI.Public
|
||||
Gem::Atom_Feature_Common.Public
|
||||
Gem::Atom_Component_DebugCamera.Static
|
||||
Gem::AtomLyIntegration_CommonFeatures.Static
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::AtomToolsFramework.Editor
|
||||
Gem::EditorPythonBindings.Editor
|
||||
|
||||
@@ -1,29 +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
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/Module/Module.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
//! Entry point for Material Editor Document library. This module is responsible for registering dependencies and logic needed
|
||||
//! for the Material Document API
|
||||
class MaterialDocumentModule
|
||||
: public AZ::Module
|
||||
{
|
||||
public:
|
||||
AZ_RTTI(MaterialDocumentModule, "{81D7A170-9284-4DE9-8D92-B6B94E8A2BDF}", AZ::Module);
|
||||
AZ_CLASS_ALLOCATOR(MaterialDocumentModule, AZ::SystemAllocator, 0);
|
||||
|
||||
MaterialDocumentModule();
|
||||
|
||||
//! Add required SystemComponents to the SystemEntity.
|
||||
AZ::ComponentTypeList GetRequiredSystemComponents() const override;
|
||||
};
|
||||
}
|
||||
@@ -1,28 +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
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/Module/Module.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
//! Entry point for Material Editor Window library.
|
||||
class MaterialEditorWindowModule
|
||||
: public AZ::Module
|
||||
{
|
||||
public:
|
||||
AZ_RTTI(MaterialEditorWindowModule, "{57D6239C-AE03-4ED8-9125-35C5B1625503}", AZ::Module);
|
||||
AZ_CLASS_ALLOCATOR(MaterialEditorWindowModule, AZ::SystemAllocator, 0);
|
||||
|
||||
MaterialEditorWindowModule();
|
||||
|
||||
//! Add required SystemComponents to the SystemEntity.
|
||||
AZ::ComponentTypeList GetRequiredSystemComponents() const override;
|
||||
};
|
||||
}
|
||||
@@ -7,18 +7,17 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/RTTI/RTTI.h>
|
||||
#include <AzCore/Asset/AssetCommon.h>
|
||||
#include <AzCore/Component/TickBus.h>
|
||||
#include <AzCore/Asset/AssetCommon.h>
|
||||
#include <AzCore/RTTI/RTTI.h>
|
||||
#include <AzToolsFramework/API/EditorAssetSystemAPI.h>
|
||||
|
||||
#include <Atom/RPI.Reflect/Material/MaterialAsset.h>
|
||||
#include <Atom/RPI.Edit/Material/MaterialSourceData.h>
|
||||
#include <Atom/RPI.Edit/Material/MaterialTypeSourceData.h>
|
||||
#include <Atom/RPI.Public/Material/Material.h>
|
||||
#include <Atom/Document/MaterialDocumentRequestBus.h>
|
||||
#include <Atom/RPI.Reflect/Material/MaterialAsset.h>
|
||||
#include <AtomToolsFramework/Document/AtomToolsDocument.h>
|
||||
#include <Document/MaterialDocumentRequestBus.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
|
||||
@@ -1,30 +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 <Atom/Document/MaterialDocumentModule.h>
|
||||
#include <AzToolsFramework/Asset/AssetSystemComponent.h>
|
||||
#include <Document/MaterialDocumentSystemComponent.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
MaterialDocumentModule::MaterialDocumentModule()
|
||||
{
|
||||
// Push results of [MyComponent]::CreateDescriptor() into m_descriptors here.
|
||||
m_descriptors.insert(m_descriptors.end(), {
|
||||
MaterialDocumentSystemComponent::CreateDescriptor(),
|
||||
});
|
||||
}
|
||||
|
||||
AZ::ComponentTypeList MaterialDocumentModule::GetRequiredSystemComponents() const
|
||||
{
|
||||
return AZ::ComponentTypeList{
|
||||
azrtti_typeid<AzToolsFramework::AssetSystem::AssetSystemComponent>(),
|
||||
azrtti_typeid<MaterialDocumentSystemComponent>(),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -6,9 +6,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Atom/Document/MaterialDocumentSettings.h>
|
||||
#include <AzCore/RTTI/BehaviorContext.h>
|
||||
#include <AzCore/Serialization/EditContext.h>
|
||||
#include <Document/MaterialDocumentSettings.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
|
||||
-85
@@ -1,85 +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 <Atom/Document/MaterialDocumentRequestBus.h>
|
||||
#include <Atom/Document/MaterialDocumentSettings.h>
|
||||
#include <AtomToolsFramework/Document/AtomToolsDocumentSystemRequestBus.h>
|
||||
#include <AzCore/RTTI/BehaviorContext.h>
|
||||
#include <AzCore/Serialization/EditContext.h>
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
#include <Document/MaterialDocument.h>
|
||||
#include <Document/MaterialDocumentSystemComponent.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
void MaterialDocumentSystemComponent::Reflect(AZ::ReflectContext* context)
|
||||
{
|
||||
MaterialDocumentSettings::Reflect(context);
|
||||
|
||||
if (AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context))
|
||||
{
|
||||
serialize->Class<MaterialDocumentSystemComponent, AZ::Component>()
|
||||
->Version(0);
|
||||
|
||||
if (AZ::EditContext* ec = serialize->GetEditContext())
|
||||
{
|
||||
ec->Class<MaterialDocumentSystemComponent>("MaterialDocumentSystemComponent", "Tool for editing Atom material files")
|
||||
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
|
||||
->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC_CE("System"))
|
||||
->Attribute(AZ::Edit::Attributes::AutoExpand, true)
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
if (AZ::BehaviorContext* behaviorContext = azrtti_cast<AZ::BehaviorContext*>(context))
|
||||
{
|
||||
behaviorContext->EBus<MaterialDocumentRequestBus>("MaterialDocumentRequestBus")
|
||||
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common)
|
||||
->Attribute(AZ::Script::Attributes::Category, "Editor")
|
||||
->Attribute(AZ::Script::Attributes::Module, "materialeditor")
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
void MaterialDocumentSystemComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required)
|
||||
{
|
||||
required.push_back(AZ_CRC_CE("AtomToolsDocumentSystemService"));
|
||||
required.push_back(AZ_CRC_CE("AssetProcessorToolsConnection"));
|
||||
required.push_back(AZ_CRC_CE("AssetDatabaseService"));
|
||||
required.push_back(AZ_CRC_CE("PropertyManagerService"));
|
||||
required.push_back(AZ_CRC_CE("RPISystem"));
|
||||
}
|
||||
|
||||
void MaterialDocumentSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
|
||||
{
|
||||
provided.push_back(AZ_CRC_CE("MaterialDocumentSystemService"));
|
||||
}
|
||||
|
||||
void MaterialDocumentSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
|
||||
{
|
||||
incompatible.push_back(AZ_CRC_CE("MaterialDocumentSystemService"));
|
||||
}
|
||||
|
||||
void MaterialDocumentSystemComponent::Init()
|
||||
{
|
||||
}
|
||||
|
||||
void MaterialDocumentSystemComponent::Activate()
|
||||
{
|
||||
AtomToolsFramework::AtomToolsDocumentSystemRequestBus::Broadcast(
|
||||
&AtomToolsFramework::AtomToolsDocumentSystemRequestBus::Handler::RegisterDocumentType,
|
||||
[]()
|
||||
{
|
||||
return aznew MaterialDocument();
|
||||
});
|
||||
}
|
||||
|
||||
void MaterialDocumentSystemComponent::Deactivate()
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,41 +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
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/Component/Component.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
//! MaterialDocumentSystemComponent
|
||||
class MaterialDocumentSystemComponent
|
||||
: public AZ::Component
|
||||
{
|
||||
public:
|
||||
AZ_COMPONENT(MaterialDocumentSystemComponent, "{E011DA51-855D-45FA-87A3-1C1CD6379091}");
|
||||
|
||||
MaterialDocumentSystemComponent() = default;
|
||||
~MaterialDocumentSystemComponent() = default;
|
||||
MaterialDocumentSystemComponent(const MaterialDocumentSystemComponent&) = delete;
|
||||
MaterialDocumentSystemComponent& operator=(const MaterialDocumentSystemComponent&) = delete;
|
||||
|
||||
static void Reflect(AZ::ReflectContext* context);
|
||||
|
||||
static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
|
||||
static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
|
||||
static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
|
||||
|
||||
private:
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// AZ::Component interface implementation
|
||||
void Init() override;
|
||||
void Activate() override;
|
||||
void Deactivate() override;
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
};
|
||||
} // namespace MaterialEditor
|
||||
@@ -6,22 +6,73 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Atom/Document/MaterialDocumentModule.h>
|
||||
#include <Atom/Viewport/MaterialViewportModule.h>
|
||||
#include <Atom/Window/MaterialEditorWindowModule.h>
|
||||
#include <AtomToolsFramework/Document/AtomToolsDocumentSystemRequestBus.h>
|
||||
#include <AzCore/RTTI/BehaviorContext.h>
|
||||
#include <AzCore/Serialization/EditContext.h>
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
#include <AzCore/Settings/SettingsRegistryMergeUtils.h>
|
||||
#include <AzToolsFramework/API/ToolsApplicationAPI.h>
|
||||
#include <Document/MaterialDocument.h>
|
||||
#include <Document/MaterialDocumentRequestBus.h>
|
||||
#include <Document/MaterialDocumentSettings.h>
|
||||
#include <MaterialEditorApplication.h>
|
||||
#include <MaterialEditor_Traits_Platform.h>
|
||||
#include <Viewport/MaterialViewportModule.h>
|
||||
#include <Window/MaterialEditorWindow.h>
|
||||
#include <Window/MaterialEditorWindowSettings.h>
|
||||
|
||||
void InitMaterialEditorResources()
|
||||
{
|
||||
// Must register qt resources from other modules
|
||||
Q_INIT_RESOURCE(MaterialEditor);
|
||||
Q_INIT_RESOURCE(InspectorWidget);
|
||||
Q_INIT_RESOURCE(AtomToolsAssetBrowser);
|
||||
}
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
//! This function returns the build system target name of "MaterialEditor"
|
||||
AZStd::string MaterialEditorApplication::GetBuildTargetName() const
|
||||
MaterialEditorApplication::MaterialEditorApplication(int* argc, char*** argv)
|
||||
: Base(argc, argv)
|
||||
{
|
||||
#if !defined(LY_CMAKE_TARGET)
|
||||
#error "LY_CMAKE_TARGET must be defined in order to add this source file to a CMake executable target"
|
||||
#endif
|
||||
return AZStd::string{ LY_CMAKE_TARGET };
|
||||
InitMaterialEditorResources();
|
||||
|
||||
QApplication::setApplicationName("O3DE Material Editor");
|
||||
|
||||
// The settings registry has been created at this point, so add the CMake target
|
||||
AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddBuildSystemTargetSpecialization(
|
||||
*AZ::SettingsRegistry::Get(), GetBuildTargetName());
|
||||
|
||||
AzToolsFramework::EditorWindowRequestBus::Handler::BusConnect();
|
||||
AtomToolsFramework::AtomToolsMainWindowFactoryRequestBus::Handler::BusConnect();
|
||||
}
|
||||
|
||||
MaterialEditorApplication::~MaterialEditorApplication()
|
||||
{
|
||||
AtomToolsFramework::AtomToolsMainWindowFactoryRequestBus::Handler::BusDisconnect();
|
||||
AzToolsFramework::EditorWindowRequestBus::Handler::BusDisconnect();
|
||||
m_window.reset();
|
||||
}
|
||||
|
||||
void MaterialEditorApplication::Reflect(AZ::ReflectContext* context)
|
||||
{
|
||||
Base::Reflect(context);
|
||||
MaterialDocumentSettings::Reflect(context);
|
||||
MaterialEditorWindowSettings::Reflect(context);
|
||||
|
||||
if (AZ::BehaviorContext* behaviorContext = azrtti_cast<AZ::BehaviorContext*>(context))
|
||||
{
|
||||
behaviorContext->EBus<MaterialDocumentRequestBus>("MaterialDocumentRequestBus")
|
||||
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common)
|
||||
->Attribute(AZ::Script::Attributes::Category, "Editor")
|
||||
->Attribute(AZ::Script::Attributes::Module, "materialeditor")
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
void MaterialEditorApplication::CreateStaticModules(AZStd::vector<AZ::Module*>& outModules)
|
||||
{
|
||||
Base::CreateStaticModules(outModules);
|
||||
outModules.push_back(aznew MaterialViewportModule);
|
||||
}
|
||||
|
||||
const char* MaterialEditorApplication::GetCurrentConfigurationName() const
|
||||
@@ -35,26 +86,42 @@ namespace MaterialEditor
|
||||
#endif
|
||||
}
|
||||
|
||||
MaterialEditorApplication::MaterialEditorApplication(int* argc, char*** argv)
|
||||
: Base(argc, argv)
|
||||
void MaterialEditorApplication::StartCommon(AZ::Entity* systemEntity)
|
||||
{
|
||||
QApplication::setApplicationName("O3DE Material Editor");
|
||||
Base::StartCommon(systemEntity);
|
||||
|
||||
// The settings registry has been created at this point, so add the CMake target
|
||||
AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddBuildSystemTargetSpecialization(
|
||||
*AZ::SettingsRegistry::Get(), GetBuildTargetName());
|
||||
AtomToolsFramework::AtomToolsDocumentSystemRequestBus::Broadcast(
|
||||
&AtomToolsFramework::AtomToolsDocumentSystemRequestBus::Handler::RegisterDocumentType,
|
||||
[]() { return aznew MaterialDocument(); });
|
||||
}
|
||||
|
||||
void MaterialEditorApplication::CreateStaticModules(AZStd::vector<AZ::Module*>& outModules)
|
||||
AZStd::string MaterialEditorApplication::GetBuildTargetName() const
|
||||
{
|
||||
Base::CreateStaticModules(outModules);
|
||||
outModules.push_back(aznew MaterialDocumentModule);
|
||||
outModules.push_back(aznew MaterialViewportModule);
|
||||
outModules.push_back(aznew MaterialEditorWindowModule);
|
||||
#if !defined(LY_CMAKE_TARGET)
|
||||
#error "LY_CMAKE_TARGET must be defined in order to add this source file to a CMake executable target"
|
||||
#endif
|
||||
//! Returns the build system target name of "MaterialEditor"
|
||||
return AZStd::string{ LY_CMAKE_TARGET };
|
||||
}
|
||||
|
||||
AZStd::vector<AZStd::string> MaterialEditorApplication::GetCriticalAssetFilters() const
|
||||
{
|
||||
return AZStd::vector<AZStd::string>({ "passes/", "config/", "MaterialEditor/" });
|
||||
}
|
||||
|
||||
void MaterialEditorApplication::CreateMainWindow()
|
||||
{
|
||||
m_materialEditorBrowserInteractions.reset(aznew MaterialEditorBrowserInteractions);
|
||||
m_window.reset(aznew MaterialEditorWindow);
|
||||
}
|
||||
|
||||
void MaterialEditorApplication::DestroyMainWindow()
|
||||
{
|
||||
m_window.reset();
|
||||
}
|
||||
|
||||
QWidget* MaterialEditorApplication::GetAppMainWindow()
|
||||
{
|
||||
return m_window.get();
|
||||
}
|
||||
} // namespace MaterialEditor
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <AtomToolsFramework/Document/AtomToolsDocumentApplication.h>
|
||||
#include <AtomToolsFramework/Window/AtomToolsMainWindowFactoryRequestBus.h>
|
||||
#include <AzToolsFramework/API/EditorWindowRequestBus.h>
|
||||
#include <Window/MaterialEditorBrowserInteractions.h>
|
||||
#include <Window/MaterialEditorWindow.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
@@ -16,6 +20,8 @@ namespace MaterialEditor
|
||||
|
||||
class MaterialEditorApplication
|
||||
: public AtomToolsFramework::AtomToolsDocumentApplication
|
||||
, private AzToolsFramework::EditorWindowRequestBus::Handler
|
||||
, private AtomToolsFramework::AtomToolsMainWindowFactoryRequestBus::Handler
|
||||
{
|
||||
public:
|
||||
AZ_TYPE_INFO(MaterialEditor::MaterialEditorApplication, "{30F90CA5-1253-49B5-8143-19CEE37E22BB}");
|
||||
@@ -23,13 +29,26 @@ namespace MaterialEditor
|
||||
using Base = AtomToolsFramework::AtomToolsDocumentApplication;
|
||||
|
||||
MaterialEditorApplication(int* argc, char*** argv);
|
||||
~MaterialEditorApplication();
|
||||
|
||||
// AzFramework::Application overrides...
|
||||
void Reflect(AZ::ReflectContext* context) override;
|
||||
void CreateStaticModules(AZStd::vector<AZ::Module*>& outModules) override;
|
||||
const char* GetCurrentConfigurationName() const override;
|
||||
void StartCommon(AZ::Entity* systemEntity) override;
|
||||
|
||||
// AtomToolsFramework::AtomToolsApplication overrides...
|
||||
AZStd::string GetBuildTargetName() const override;
|
||||
AZStd::vector<AZStd::string> GetCriticalAssetFilters() const override;
|
||||
|
||||
// AtomToolsMainWindowFactoryRequestBus::Handler overrides...
|
||||
void CreateMainWindow() override;
|
||||
void DestroyMainWindow() override;
|
||||
|
||||
// AzToolsFramework::EditorWindowRequests::Bus::Handler
|
||||
QWidget* GetAppMainWindow() override;
|
||||
|
||||
AZStd::unique_ptr<MaterialEditorWindow> m_window;
|
||||
AZStd::unique_ptr<MaterialEditorBrowserInteractions> m_materialEditorBrowserInteractions;
|
||||
};
|
||||
} // namespace MaterialEditor
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <AzCore/Math/Vector3.h>
|
||||
#include <AzCore/Component/TransformBus.h>
|
||||
|
||||
#include <Source/Viewport/InputController/Behavior.h>
|
||||
#include <AzCore/Math/Vector3.h>
|
||||
#include <Viewport/InputController/Behavior.h>
|
||||
#include <Viewport/InputController/MaterialEditorViewportInputController.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
|
||||
+2
-2
@@ -6,11 +6,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <AzCore/Component/TransformBus.h>
|
||||
#include <AzCore/Math/MathUtils.h>
|
||||
#include <AzCore/Math/Vector3.h>
|
||||
#include <AzCore/Component/TransformBus.h>
|
||||
#include <Viewport/InputController/DollyCameraBehavior.h>
|
||||
#include <Viewport/InputController/MaterialEditorViewportInputController.h>
|
||||
#include <Source/Viewport/InputController/DollyCameraBehavior.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <Source/Viewport/InputController/Behavior.h>
|
||||
#include <Viewport/InputController/Behavior.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Source/Viewport/InputController/IdleBehavior.h>
|
||||
#include <Viewport/InputController/IdleBehavior.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <Source/Viewport/InputController/Behavior.h>
|
||||
#include <Viewport/InputController/Behavior.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
|
||||
+12
-12
@@ -9,30 +9,30 @@
|
||||
#include <QApplication>
|
||||
#include <QWidget>
|
||||
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
#include <AzCore/Component/TransformBus.h>
|
||||
#include <AzCore/Math/Matrix4x4.h>
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
|
||||
#include <AzFramework/Components/CameraBus.h>
|
||||
#include <AzFramework/Input/Devices/Keyboard/InputDeviceKeyboard.h>
|
||||
#include <AzFramework/Input/Devices/Mouse/InputDeviceMouse.h>
|
||||
#include <AzFramework/Components/CameraBus.h>
|
||||
#include <AzFramework/Viewport/ScreenGeometry.h>
|
||||
#include <AzToolsFramework/Viewport/ViewportMessages.h>
|
||||
|
||||
#include <AtomLyIntegration/CommonFeatures/Mesh/MeshComponentBus.h>
|
||||
#include <Atom/Feature/SkyBox/SkyBoxFeatureProcessorInterface.h>
|
||||
#include <Atom/RPI.Public/RPISystemInterface.h>
|
||||
#include <Atom/RPI.Public/Scene.h>
|
||||
#include <Atom/RPI.Reflect/Model/ModelAsset.h>
|
||||
#include <Atom/Feature/SkyBox/SkyBoxFeatureProcessorInterface.h>
|
||||
#include <AtomLyIntegration/CommonFeatures/Mesh/MeshComponentBus.h>
|
||||
|
||||
#include <Source/Viewport/InputController/MaterialEditorViewportInputController.h>
|
||||
#include <Source/Viewport/InputController/IdleBehavior.h>
|
||||
#include <Source/Viewport/InputController/PanCameraBehavior.h>
|
||||
#include <Source/Viewport/InputController/OrbitCameraBehavior.h>
|
||||
#include <Source/Viewport/InputController/MoveCameraBehavior.h>
|
||||
#include <Source/Viewport/InputController/DollyCameraBehavior.h>
|
||||
#include <Source/Viewport/InputController/RotateModelBehavior.h>
|
||||
#include <Source/Viewport/InputController/RotateEnvironmentBehavior.h>
|
||||
#include <Viewport/InputController/DollyCameraBehavior.h>
|
||||
#include <Viewport/InputController/IdleBehavior.h>
|
||||
#include <Viewport/InputController/MaterialEditorViewportInputController.h>
|
||||
#include <Viewport/InputController/MoveCameraBehavior.h>
|
||||
#include <Viewport/InputController/OrbitCameraBehavior.h>
|
||||
#include <Viewport/InputController/PanCameraBehavior.h>
|
||||
#include <Viewport/InputController/RotateEnvironmentBehavior.h>
|
||||
#include <Viewport/InputController/RotateModelBehavior.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
|
||||
+2
-2
@@ -9,8 +9,8 @@
|
||||
|
||||
#include <AzFramework/Input/Events/InputChannelEventListener.h>
|
||||
#include <AzFramework/Viewport/SingleViewportController.h>
|
||||
#include <Atom/Viewport/InputController/MaterialEditorViewportInputControllerBus.h>
|
||||
#include <Source/Viewport/InputController/Behavior.h>
|
||||
#include <Viewport/InputController/Behavior.h>
|
||||
#include <Viewport/InputController/MaterialEditorViewportInputControllerBus.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
|
||||
+3
-3
@@ -6,10 +6,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <AzCore/Math/Vector3.h>
|
||||
#include <AzCore/Component/TransformBus.h>
|
||||
#include <Atom/Viewport/InputController/MaterialEditorViewportInputControllerBus.h>
|
||||
#include <Source/Viewport/InputController/MoveCameraBehavior.h>
|
||||
#include <AzCore/Math/Vector3.h>
|
||||
#include <Viewport/InputController/MaterialEditorViewportInputControllerBus.h>
|
||||
#include <Viewport/InputController/MoveCameraBehavior.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <Source/Viewport/InputController/Behavior.h>
|
||||
#include <Viewport/InputController/Behavior.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
|
||||
+1
-1
@@ -7,8 +7,8 @@
|
||||
*/
|
||||
|
||||
#include <AzCore/Component/TransformBus.h>
|
||||
#include <Source/Viewport/InputController/OrbitCameraBehavior.h>
|
||||
#include <Viewport/InputController/MaterialEditorViewportInputController.h>
|
||||
#include <Viewport/InputController/OrbitCameraBehavior.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <Source/Viewport/InputController/Behavior.h>
|
||||
#include <Viewport/InputController/Behavior.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
|
||||
+4
-4
@@ -6,11 +6,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <AzCore/Math/Vector3.h>
|
||||
#include <AzCore/Math/Quaternion.h>
|
||||
#include <AzCore/Component/TransformBus.h>
|
||||
#include <Atom/Viewport/InputController/MaterialEditorViewportInputControllerBus.h>
|
||||
#include <Source/Viewport/InputController/PanCameraBehavior.h>
|
||||
#include <AzCore/Math/Quaternion.h>
|
||||
#include <AzCore/Math/Vector3.h>
|
||||
#include <Viewport/InputController/MaterialEditorViewportInputControllerBus.h>
|
||||
#include <Viewport/InputController/PanCameraBehavior.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <Source/Viewport/InputController/Behavior.h>
|
||||
#include <Viewport/InputController/Behavior.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
#include <Atom/RPI.Public/Scene.h>
|
||||
|
||||
#include <Viewport/InputController/MaterialEditorViewportInputController.h>
|
||||
#include <Source/Viewport/InputController/RotateEnvironmentBehavior.h>
|
||||
#include <Viewport/InputController/RotateEnvironmentBehavior.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <Source/Viewport/InputController/Behavior.h>
|
||||
#include <Viewport/InputController/Behavior.h>
|
||||
|
||||
namespace AZ
|
||||
{
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
|
||||
#include <AzCore/Component/TransformBus.h>
|
||||
#include <Viewport/InputController/MaterialEditorViewportInputController.h>
|
||||
#include <Source/Viewport/InputController/RotateModelBehavior.h>
|
||||
#include <Viewport/InputController/RotateModelBehavior.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <Source/Viewport/InputController/Behavior.h>
|
||||
#include <Viewport/InputController/Behavior.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
|
||||
@@ -9,19 +9,19 @@
|
||||
#include <Atom/RPI.Edit/Common/AssetUtils.h>
|
||||
#include <Atom/RPI.Edit/Common/JsonUtils.h>
|
||||
#include <Atom/RPI.Reflect/Asset/AssetUtils.h>
|
||||
#include <Atom/Viewport/MaterialViewportNotificationBus.h>
|
||||
#include <Atom/Viewport/MaterialViewportSettings.h>
|
||||
#include <AzCore/Component/TickBus.h>
|
||||
#include <AzCore/RTTI/BehaviorContext.h>
|
||||
#include <AzCore/Serialization/EditContext.h>
|
||||
#include <AzCore/Serialization/Json/JsonUtils.h>
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
#include <AzCore/StringFunc/StringFunc.h>
|
||||
#include <AzFramework/Asset/AssetSystemBus.h>
|
||||
#include <AzFramework/IO/LocalFileIO.h>
|
||||
#include <AzCore/StringFunc/StringFunc.h>
|
||||
#include <AzToolsFramework/API/EditorAssetSystemAPI.h>
|
||||
#include <AzToolsFramework/AssetBrowser/AssetBrowserEntry.h>
|
||||
#include <Viewport/MaterialViewportComponent.h>
|
||||
#include <Viewport/MaterialViewportNotificationBus.h>
|
||||
#include <Viewport/MaterialViewportSettings.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
@@ -42,7 +42,7 @@ namespace MaterialEditor
|
||||
{
|
||||
editContext->Class<MaterialViewportComponent>("MaterialViewport", "Manages configurations for lighting and models displayed in the viewport")
|
||||
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
|
||||
->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("System", 0xc94d118b))
|
||||
->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC_CE("System"))
|
||||
->Attribute(AZ::Edit::Attributes::AutoExpand, true)
|
||||
;
|
||||
}
|
||||
@@ -103,18 +103,19 @@ namespace MaterialEditor
|
||||
|
||||
void MaterialViewportComponent::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required)
|
||||
{
|
||||
required.push_back(AZ_CRC("PerformanceMonitorService", 0x6a44241a));
|
||||
required.push_back(AZ_CRC("AtomImageBuilderService", 0x76ded592));
|
||||
required.push_back(AZ_CRC_CE("RPISystem"));
|
||||
required.push_back(AZ_CRC_CE("AssetDatabaseService"));
|
||||
required.push_back(AZ_CRC_CE("PerformanceMonitorService"));
|
||||
}
|
||||
|
||||
void MaterialViewportComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
|
||||
{
|
||||
provided.push_back(AZ_CRC("MaterialViewportService", 0xed9b44d7));
|
||||
provided.push_back(AZ_CRC_CE("MaterialViewportService"));
|
||||
}
|
||||
|
||||
void MaterialViewportComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
|
||||
{
|
||||
incompatible.push_back(AZ_CRC("MaterialViewportService", 0xed9b44d7));
|
||||
incompatible.push_back(AZ_CRC_CE("MaterialViewportService"));
|
||||
}
|
||||
|
||||
void MaterialViewportComponent::Init()
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
#include <Atom/Feature/Utils/LightingPreset.h>
|
||||
#include <Atom/Feature/Utils/ModelPreset.h>
|
||||
#include <Atom/RPI.Reflect/System/AnyAsset.h>
|
||||
#include <Atom/Viewport/MaterialViewportRequestBus.h>
|
||||
#include <Atom/Viewport/MaterialViewportSettings.h>
|
||||
#include <AzCore/Asset/AssetCommon.h>
|
||||
#include <AzCore/Component/Component.h>
|
||||
#include <AzFramework/Asset/AssetCatalogBus.h>
|
||||
#include <Viewport/MaterialViewportRequestBus.h>
|
||||
#include <Viewport/MaterialViewportSettings.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Atom/Viewport/MaterialViewportModule.h>
|
||||
#include <Viewport/MaterialViewportComponent.h>
|
||||
#include <Viewport/MaterialViewportModule.h>
|
||||
#include <Viewport/PerformanceMonitorComponent.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
|
||||
@@ -8,51 +8,51 @@
|
||||
|
||||
#undef RC_INVOKED
|
||||
|
||||
#include <AzCore/Component/Entity.h>
|
||||
#include <AzCore/Component/Component.h>
|
||||
#include <AzCore/Component/Entity.h>
|
||||
|
||||
#include <AzFramework/Components/TransformComponent.h>
|
||||
#include <AzFramework/Components/NonUniformScaleComponent.h>
|
||||
#include <AzFramework/Components/TransformComponent.h>
|
||||
#include <AzFramework/Entity/GameEntityContextBus.h>
|
||||
|
||||
#include <AtomCore/Instance/InstanceDatabase.h>
|
||||
|
||||
#include <Atom/RPI.Public/WindowContext.h>
|
||||
#include <Atom/RPI.Public/Image/StreamingImage.h>
|
||||
#include <Atom/RPI.Public/Material/Material.h>
|
||||
#include <Atom/RPI.Public/Pass/Specific/SwapChainPass.h>
|
||||
#include <Atom/RPI.Public/RPISystemInterface.h>
|
||||
#include <Atom/RPI.Public/RenderPipeline.h>
|
||||
#include <Atom/RPI.Public/Scene.h>
|
||||
#include <Atom/RPI.Public/Material/Material.h>
|
||||
#include <Atom/RPI.Public/Image/StreamingImage.h>
|
||||
#include <Atom/RPI.Public/WindowContext.h>
|
||||
#include <Atom/RPI.Reflect/Asset/AssetUtils.h>
|
||||
|
||||
#include <Atom/Component/DebugCamera/CameraComponent.h>
|
||||
#include <Atom/Feature/PostProcessing/PostProcessingConstants.h>
|
||||
#include <Atom/Feature/PostProcess/PostProcessFeatureProcessorInterface.h>
|
||||
#include <Atom/Feature/ImageBasedLights/ImageBasedLightFeatureProcessorInterface.h>
|
||||
#include <Atom/Feature/ACES/AcesDisplayMapperFeatureProcessor.h>
|
||||
#include <Atom/Component/DebugCamera/NoClipControllerComponent.h>
|
||||
#include <Atom/Feature/ACES/AcesDisplayMapperFeatureProcessor.h>
|
||||
#include <Atom/Feature/ImageBasedLights/ImageBasedLightFeatureProcessorInterface.h>
|
||||
#include <Atom/Feature/PostProcess/PostProcessFeatureProcessorInterface.h>
|
||||
#include <Atom/Feature/PostProcessing/PostProcessingConstants.h>
|
||||
|
||||
#include <Atom/Document/MaterialDocumentRequestBus.h>
|
||||
#include <Atom/Feature/Utils/LightingPreset.h>
|
||||
#include <Atom/Feature/Utils/ModelPreset.h>
|
||||
#include <Atom/Viewport/MaterialViewportRequestBus.h>
|
||||
#include <Atom/Viewport/PerformanceMonitorRequestBus.h>
|
||||
#include <Atom/Viewport/MaterialViewportSettings.h>
|
||||
|
||||
#include <AtomLyIntegration/CommonFeatures/Grid/GridComponentConstants.h>
|
||||
#include <AtomLyIntegration/CommonFeatures/Grid/GridComponentConfig.h>
|
||||
#include <AtomLyIntegration/CommonFeatures/Grid/GridComponentConstants.h>
|
||||
#include <AtomLyIntegration/CommonFeatures/ImageBasedLights/ImageBasedLightComponentBus.h>
|
||||
#include <AtomLyIntegration/CommonFeatures/ImageBasedLights/ImageBasedLightComponentConstants.h>
|
||||
#include <AtomLyIntegration/CommonFeatures/Material/MaterialComponentConstants.h>
|
||||
#include <AtomLyIntegration/CommonFeatures/Material/MaterialComponentBus.h>
|
||||
#include <AtomLyIntegration/CommonFeatures/Mesh/MeshComponentConstants.h>
|
||||
#include <AtomLyIntegration/CommonFeatures/Material/MaterialComponentConstants.h>
|
||||
#include <AtomLyIntegration/CommonFeatures/Mesh/MeshComponentBus.h>
|
||||
#include <AtomLyIntegration/CommonFeatures/PostProcess/PostFxLayerComponentConstants.h>
|
||||
#include <AtomLyIntegration/CommonFeatures/Mesh/MeshComponentConstants.h>
|
||||
#include <AtomLyIntegration/CommonFeatures/PostProcess/ExposureControl/ExposureControlBus.h>
|
||||
#include <AtomLyIntegration/CommonFeatures/PostProcess/ExposureControl/ExposureControlComponentConstants.h>
|
||||
#include <AtomLyIntegration/CommonFeatures/PostProcess/PostFxLayerComponentConstants.h>
|
||||
|
||||
#include <Source/Viewport/MaterialViewportRenderer.h>
|
||||
#include <Document/MaterialDocumentRequestBus.h>
|
||||
#include <Viewport/MaterialViewportRenderer.h>
|
||||
#include <Viewport/MaterialViewportRequestBus.h>
|
||||
#include <Viewport/MaterialViewportSettings.h>
|
||||
#include <Viewport/PerformanceMonitorRequestBus.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
#include <Atom/Feature/CoreLights/DirectionalLightFeatureProcessorInterface.h>
|
||||
#include <Atom/Feature/SkyBox/SkyBoxFeatureProcessorInterface.h>
|
||||
#include <Atom/RPI.Public/Base.h>
|
||||
#include <Atom/Viewport/MaterialViewportNotificationBus.h>
|
||||
#include <AtomCore/Instance/Instance.h>
|
||||
#include <AtomToolsFramework/Document/AtomToolsDocumentNotificationBus.h>
|
||||
#include <AzCore/Component/TickBus.h>
|
||||
#include <AzCore/Component/TransformBus.h>
|
||||
#include <Viewport/InputController/MaterialEditorViewportInputController.h>
|
||||
#include <Viewport/MaterialViewportNotificationBus.h>
|
||||
|
||||
namespace AZ
|
||||
{
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Atom/Viewport/MaterialViewportSettings.h>
|
||||
#include <AzCore/RTTI/BehaviorContext.h>
|
||||
#include <AzCore/Serialization/EditContext.h>
|
||||
#include <Viewport/MaterialViewportSettings.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace MaterialEditor
|
||||
|
||||
void PerformanceMonitorComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
|
||||
{
|
||||
provided.push_back(AZ_CRC("PerformanceMonitorService", 0x6a44241a));
|
||||
provided.push_back(AZ_CRC_CE("PerformanceMonitorService"));
|
||||
}
|
||||
|
||||
void PerformanceMonitorComponent::Init()
|
||||
|
||||
@@ -8,11 +8,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Atom/RPI.Public/Pass/Pass.h>
|
||||
#include <AzCore/Component/Component.h>
|
||||
#include <AzCore/Statistics/RunningStatistic.h>
|
||||
|
||||
#include <Atom/RPI.Public/Pass/Pass.h>
|
||||
#include <Atom/Viewport/PerformanceMonitorRequestBus.h>
|
||||
#include <Viewport/PerformanceMonitorRequestBus.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
|
||||
+1
-2
@@ -8,8 +8,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/EBus/EBus.h>
|
||||
|
||||
#include <Atom/Viewport/PerformanceMetrics.h>
|
||||
#include <Viewport/PerformanceMetrics.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
+1
-1
@@ -6,7 +6,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Atom/Document/MaterialDocumentSettings.h>
|
||||
#include <Atom/RPI.Edit/Common/AssetUtils.h>
|
||||
#include <Atom/RPI.Edit/Material/MaterialSourceData.h>
|
||||
#include <Atom/RPI.Edit/Material/MaterialTypeSourceData.h>
|
||||
@@ -15,6 +14,7 @@
|
||||
#include <AzFramework/Application/Application.h>
|
||||
#include <AzFramework/StringFunc/StringFunc.h>
|
||||
#include <AzQtComponents/Components/Widgets/FileDialog.h>
|
||||
#include <Document/MaterialDocumentSettings.h>
|
||||
#include <Window/CreateMaterialDialog/CreateMaterialDialog.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
|
||||
#include <AzCore/std/containers/vector.h>
|
||||
|
||||
#include <Source/Window/CreateMaterialDialog/ui_CreateMaterialDialog.h>
|
||||
#include <Window/CreateMaterialDialog/ui_CreateMaterialDialog.h>
|
||||
|
||||
#include <QFileInfo>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Source/Window/HelpDialog/HelpDialog.h>
|
||||
#include <Window/HelpDialog/HelpDialog.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
@@ -20,4 +20,4 @@ namespace MaterialEditor
|
||||
HelpDialog::~HelpDialog() = default;
|
||||
} // namespace MaterialEditor
|
||||
|
||||
#include <Source/Window/HelpDialog/moc_HelpDialog.cpp>
|
||||
#include <Window/HelpDialog/moc_HelpDialog.cpp>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") // disable warnings spawned by QT
|
||||
#include <QDialog>
|
||||
#include <Source/Window/HelpDialog/ui_HelpDialog.h>
|
||||
#include <Window/HelpDialog/ui_HelpDialog.h>
|
||||
AZ_POP_DISABLE_WARNING
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,19 +6,19 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Atom/Document/MaterialDocumentRequestBus.h>
|
||||
#include <Atom/RHI/Factory.h>
|
||||
#include <Atom/RPI.Edit/Material/MaterialSourceData.h>
|
||||
#include <Atom/RPI.Edit/Material/MaterialTypeSourceData.h>
|
||||
#include <Atom/Window/MaterialEditorWindowSettings.h>
|
||||
#include <AtomToolsFramework/Document/AtomToolsDocumentSystemRequestBus.h>
|
||||
#include <AtomToolsFramework/Util/Util.h>
|
||||
#include <AzQtComponents/Components/StyleManager.h>
|
||||
#include <AzQtComponents/Components/WindowDecorationWrapper.h>
|
||||
#include <Document/MaterialDocumentRequestBus.h>
|
||||
#include <Viewport/MaterialViewportWidget.h>
|
||||
#include <Window/CreateMaterialDialog/CreateMaterialDialog.h>
|
||||
#include <Window/HelpDialog/HelpDialog.h>
|
||||
#include <Window/MaterialEditorWindow.h>
|
||||
#include <Window/MaterialEditorWindowSettings.h>
|
||||
#include <Window/MaterialInspector/MaterialInspector.h>
|
||||
#include <Window/PerformanceMonitor/PerformanceMonitorWidget.h>
|
||||
#include <Window/SettingsDialog/SettingsDialog.h>
|
||||
|
||||
@@ -1,89 +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 <AtomToolsFramework/Window/AtomToolsMainWindowFactoryRequestBus.h>
|
||||
#include <AtomToolsFramework/Window/AtomToolsMainWindowRequestBus.h>
|
||||
#include <AzCore/RTTI/BehaviorContext.h>
|
||||
#include <AzCore/Serialization/EditContext.h>
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
#include <AzToolsFramework/API/EditorAssetSystemAPI.h>
|
||||
#include <AzToolsFramework/API/ToolsApplicationAPI.h>
|
||||
#include <AzToolsFramework/API/ViewPaneOptions.h>
|
||||
#include <AzToolsFramework/UI/UICore/QWidgetSavedState.h>
|
||||
#include <Window/MaterialEditorWindow.h>
|
||||
#include <Window/MaterialEditorWindowComponent.h>
|
||||
#include <Window/ViewportSettingsInspector/ViewportSettingsInspector.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
void MaterialEditorWindowComponent::Reflect(AZ::ReflectContext* context)
|
||||
{
|
||||
MaterialEditorWindowSettings::Reflect(context);
|
||||
|
||||
if (AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context))
|
||||
{
|
||||
serialize->Class<MaterialEditorWindowComponent, AZ::Component>()
|
||||
->Version(0);
|
||||
}
|
||||
}
|
||||
|
||||
void MaterialEditorWindowComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required)
|
||||
{
|
||||
required.push_back(AZ_CRC_CE("AssetBrowserService"));
|
||||
required.push_back(AZ_CRC_CE("PropertyManagerService"));
|
||||
required.push_back(AZ_CRC_CE("SourceControlService"));
|
||||
required.push_back(AZ_CRC_CE("AtomToolsMainWindowSystemService"));
|
||||
}
|
||||
|
||||
void MaterialEditorWindowComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
|
||||
{
|
||||
provided.push_back(AZ_CRC_CE("MaterialEditorWindowService"));
|
||||
}
|
||||
|
||||
void MaterialEditorWindowComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
|
||||
{
|
||||
incompatible.push_back(AZ_CRC_CE("MaterialEditorWindowService"));
|
||||
}
|
||||
|
||||
void MaterialEditorWindowComponent::Init()
|
||||
{
|
||||
}
|
||||
|
||||
void MaterialEditorWindowComponent::Activate()
|
||||
{
|
||||
AzToolsFramework::EditorWindowRequestBus::Handler::BusConnect();
|
||||
AtomToolsFramework::AtomToolsMainWindowFactoryRequestBus::Handler::BusConnect();
|
||||
AzToolsFramework::SourceControlConnectionRequestBus::Broadcast(&AzToolsFramework::SourceControlConnectionRequests::EnableSourceControl, true);
|
||||
}
|
||||
|
||||
void MaterialEditorWindowComponent::Deactivate()
|
||||
{
|
||||
AtomToolsFramework::AtomToolsMainWindowFactoryRequestBus::Handler::BusDisconnect();
|
||||
AzToolsFramework::EditorWindowRequestBus::Handler::BusDisconnect();
|
||||
|
||||
m_window.reset();
|
||||
}
|
||||
|
||||
void MaterialEditorWindowComponent::CreateMainWindow()
|
||||
{
|
||||
m_materialEditorBrowserInteractions.reset(aznew MaterialEditorBrowserInteractions);
|
||||
|
||||
m_window.reset(aznew MaterialEditorWindow);
|
||||
}
|
||||
|
||||
void MaterialEditorWindowComponent::DestroyMainWindow()
|
||||
{
|
||||
m_window.reset();
|
||||
}
|
||||
|
||||
QWidget* MaterialEditorWindowComponent::GetAppMainWindow()
|
||||
{
|
||||
return m_window.get();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/Component/Component.h>
|
||||
#include <AzToolsFramework/API/EditorWindowRequestBus.h>
|
||||
|
||||
#include <AtomToolsFramework/Window/AtomToolsMainWindowFactoryRequestBus.h>
|
||||
#include <Source/Window/MaterialEditorBrowserInteractions.h>
|
||||
#include <Source/Window/MaterialEditorWindow.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
//! MaterialEditorWindowComponent is the entry point for the Material Editor gem user interface, and is mainly
|
||||
//! used for initialization and registration of other classes, including MaterialEditorWindow.
|
||||
class MaterialEditorWindowComponent
|
||||
: public AZ::Component
|
||||
, private AzToolsFramework::EditorWindowRequestBus::Handler
|
||||
, private AtomToolsFramework::AtomToolsMainWindowFactoryRequestBus::Handler
|
||||
{
|
||||
public:
|
||||
AZ_COMPONENT(MaterialEditorWindowComponent, "{03976F19-3C74-49FE-A15F-7D3CADBA616C}");
|
||||
|
||||
static void Reflect(AZ::ReflectContext* context);
|
||||
|
||||
static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
|
||||
static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
|
||||
static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
|
||||
|
||||
private:
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// AtomToolsMainWindowFactoryRequestBus::Handler overrides...
|
||||
void CreateMainWindow() override;
|
||||
void DestroyMainWindow() override;
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// AzToolsFramework::EditorWindowRequests::Bus::Handler
|
||||
QWidget* GetAppMainWindow() override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// AZ::Component interface implementation
|
||||
void Init() override;
|
||||
void Activate() override;
|
||||
void Deactivate() override;
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
AZStd::unique_ptr<MaterialEditorWindow> m_window;
|
||||
AZStd::unique_ptr<MaterialEditorBrowserInteractions> m_materialEditorBrowserInteractions;
|
||||
};
|
||||
}
|
||||
@@ -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 <Atom/Window/MaterialEditorWindowModule.h>
|
||||
#include <Window/MaterialEditorWindowComponent.h>
|
||||
|
||||
void InitMaterialEditorResources()
|
||||
{
|
||||
//Must register qt resources from other modules
|
||||
Q_INIT_RESOURCE(MaterialEditor);
|
||||
Q_INIT_RESOURCE(InspectorWidget);
|
||||
Q_INIT_RESOURCE(AtomToolsAssetBrowser);
|
||||
}
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
MaterialEditorWindowModule::MaterialEditorWindowModule()
|
||||
{
|
||||
InitMaterialEditorResources();
|
||||
|
||||
// Push results of [MyComponent]::CreateDescriptor() into m_descriptors here.
|
||||
m_descriptors.insert(m_descriptors.end(), {
|
||||
MaterialEditorWindowComponent::CreateDescriptor(),
|
||||
});
|
||||
}
|
||||
|
||||
AZ::ComponentTypeList MaterialEditorWindowModule::GetRequiredSystemComponents() const
|
||||
{
|
||||
return AZ::ComponentTypeList{
|
||||
azrtti_typeid<MaterialEditorWindowComponent>(),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -6,9 +6,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Atom/Window/MaterialEditorWindowSettings.h>
|
||||
#include <AzCore/RTTI/BehaviorContext.h>
|
||||
#include <AzCore/Serialization/EditContext.h>
|
||||
#include <Window/MaterialEditorWindowSettings.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
|
||||
+1
-1
@@ -6,7 +6,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Atom/Document/MaterialDocumentRequestBus.h>
|
||||
#include <Atom/RPI.Edit/Common/AssetUtils.h>
|
||||
#include <Atom/RPI.Edit/Material/MaterialPropertyId.h>
|
||||
#include <Atom/RPI.Edit/Material/MaterialTypeSourceData.h>
|
||||
@@ -15,6 +14,7 @@
|
||||
#include <AtomToolsFramework/DynamicProperty/DynamicPropertyGroup.h>
|
||||
#include <AtomToolsFramework/Inspector/InspectorPropertyGroupWidget.h>
|
||||
#include <AtomToolsFramework/Util/MaterialPropertyUtil.h>
|
||||
#include <Document/MaterialDocumentRequestBus.h>
|
||||
#include <Window/MaterialInspector/MaterialInspector.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
|
||||
+1
-1
@@ -9,12 +9,12 @@
|
||||
#pragma once
|
||||
|
||||
#if !defined(Q_MOC_RUN)
|
||||
#include <Atom/Window/MaterialEditorWindowSettings.h>
|
||||
#include <AtomToolsFramework/Document/AtomToolsDocumentNotificationBus.h>
|
||||
#include <AtomToolsFramework/DynamicProperty/DynamicPropertyGroup.h>
|
||||
#include <AtomToolsFramework/Inspector/InspectorWidget.h>
|
||||
#include <AzCore/std/containers/unordered_map.h>
|
||||
#include <AzToolsFramework/UI/PropertyEditor/PropertyEditorAPI_Internals.h>
|
||||
#include <Window/MaterialEditorWindowSettings.h>
|
||||
#endif
|
||||
|
||||
namespace MaterialEditor
|
||||
|
||||
+4
-5
@@ -6,10 +6,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Atom/Viewport/PerformanceMonitorRequestBus.h>
|
||||
|
||||
#include <Source/Window/PerformanceMonitor/PerformanceMonitorWidget.h>
|
||||
#include <Source/Window/PerformanceMonitor/ui_PerformanceMonitorWidget.h>
|
||||
#include <Viewport/PerformanceMonitorRequestBus.h>
|
||||
#include <Window/PerformanceMonitor/PerformanceMonitorWidget.h>
|
||||
#include <Window/PerformanceMonitor/ui_PerformanceMonitorWidget.h>
|
||||
|
||||
#include <QTimer>
|
||||
|
||||
@@ -55,4 +54,4 @@ namespace MaterialEditor
|
||||
}
|
||||
} // namespace MaterialEditor
|
||||
|
||||
#include <Source/Window/PerformanceMonitor/moc_PerformanceMonitorWidget.cpp>
|
||||
#include <Window/PerformanceMonitor/moc_PerformanceMonitorWidget.cpp>
|
||||
|
||||
+1
-1
@@ -8,9 +8,9 @@
|
||||
|
||||
#include <Atom/Feature/Utils/LightingPreset.h>
|
||||
#include <Atom/RPI.Edit/Common/AssetUtils.h>
|
||||
#include <Atom/Viewport/MaterialViewportRequestBus.h>
|
||||
#include <AtomToolsFramework/Util/Util.h>
|
||||
#include <AzFramework/Application/Application.h>
|
||||
#include <Viewport/MaterialViewportRequestBus.h>
|
||||
#include <Window/PresetBrowserDialogs/LightingPresetBrowserDialog.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
|
||||
+1
-1
@@ -10,8 +10,8 @@
|
||||
|
||||
#if !defined(Q_MOC_RUN)
|
||||
#include <Atom/Feature/Utils/LightingPreset.h>
|
||||
#include <Atom/Viewport/MaterialViewportNotificationBus.h>
|
||||
#include <AzCore/std/containers/vector.h>
|
||||
#include <Viewport/MaterialViewportNotificationBus.h>
|
||||
#endif
|
||||
|
||||
#include <Window/PresetBrowserDialogs/PresetBrowserDialog.h>
|
||||
|
||||
+1
-1
@@ -7,9 +7,9 @@
|
||||
*/
|
||||
|
||||
#include <Atom/Feature/Utils/ModelPreset.h>
|
||||
#include <Atom/Viewport/MaterialViewportRequestBus.h>
|
||||
#include <AtomToolsFramework/Util/Util.h>
|
||||
#include <AzFramework/Application/Application.h>
|
||||
#include <Viewport/MaterialViewportRequestBus.h>
|
||||
#include <Window/PresetBrowserDialogs/ModelPresetBrowserDialog.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
|
||||
+1
-1
@@ -10,8 +10,8 @@
|
||||
|
||||
#if !defined(Q_MOC_RUN)
|
||||
#include <Atom/Feature/Utils/ModelPreset.h>
|
||||
#include <Atom/Viewport/MaterialViewportNotificationBus.h>
|
||||
#include <AzCore/std/containers/vector.h>
|
||||
#include <Viewport/MaterialViewportNotificationBus.h>
|
||||
#endif
|
||||
|
||||
#include <Window/PresetBrowserDialogs/PresetBrowserDialog.h>
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
#pragma once
|
||||
|
||||
#if !defined(Q_MOC_RUN)
|
||||
#include <Atom/Document/MaterialDocumentSettings.h>
|
||||
#include <AtomToolsFramework/Document/AtomToolsDocumentSystemSettings.h>
|
||||
#include <AtomToolsFramework/Inspector/InspectorWidget.h>
|
||||
#include <AzToolsFramework/UI/PropertyEditor/PropertyEditorAPI_Internals.h>
|
||||
#include <Document/MaterialDocumentSettings.h>
|
||||
#endif
|
||||
|
||||
namespace MaterialEditor
|
||||
|
||||
+3
-3
@@ -6,9 +6,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Source/Window/ToolBar/LightingPresetComboBox.h>
|
||||
#include <Atom/Viewport/MaterialViewportRequestBus.h>
|
||||
#include <Atom/Feature/Utils/LightingPreset.h>
|
||||
#include <Viewport/MaterialViewportRequestBus.h>
|
||||
#include <Window/ToolBar/LightingPresetComboBox.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
@@ -102,4 +102,4 @@ namespace MaterialEditor
|
||||
|
||||
} // namespace MaterialEditor
|
||||
|
||||
#include <Source/Window/ToolBar/moc_LightingPresetComboBox.cpp>
|
||||
#include <Window/ToolBar/moc_LightingPresetComboBox.cpp>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#if !defined(Q_MOC_RUN)
|
||||
#include <QComboBox>
|
||||
#include <Atom/Viewport/MaterialViewportNotificationBus.h>
|
||||
#include <Viewport/MaterialViewportNotificationBus.h>
|
||||
#endif
|
||||
|
||||
namespace MaterialEditor
|
||||
|
||||
@@ -6,21 +6,21 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Atom/Viewport/MaterialViewportNotificationBus.h>
|
||||
#include <Atom/Viewport/MaterialViewportRequestBus.h>
|
||||
#include <Atom/Viewport/MaterialViewportSettings.h>
|
||||
#include <AzCore/std/containers/vector.h>
|
||||
#include <Viewport/MaterialViewportNotificationBus.h>
|
||||
#include <Viewport/MaterialViewportRequestBus.h>
|
||||
#include <Viewport/MaterialViewportSettings.h>
|
||||
#include <Window/ToolBar/LightingPresetComboBox.h>
|
||||
#include <Window/ToolBar/MaterialEditorToolBar.h>
|
||||
#include <Window/ToolBar/ModelPresetComboBox.h>
|
||||
|
||||
AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") // disable warnings spawned by QT
|
||||
#include <AzQtComponents/Components/Widgets/ToolBar.h>
|
||||
#include <QAbstractItemView>
|
||||
#include <QAction>
|
||||
#include <QIcon>
|
||||
#include <QMenu>
|
||||
#include <QToolButton>
|
||||
#include <QAbstractItemView>
|
||||
AZ_POP_DISABLE_WARNING
|
||||
|
||||
namespace MaterialEditor
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#if !defined(Q_MOC_RUN)
|
||||
#include <QAction>
|
||||
#include <QToolBar>
|
||||
#include <Atom/Viewport/MaterialViewportNotificationBus.h>
|
||||
#include <Viewport/MaterialViewportNotificationBus.h>
|
||||
#endif
|
||||
|
||||
namespace MaterialEditor
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Source/Window/ToolBar/ModelPresetComboBox.h>
|
||||
#include <Atom/Viewport/MaterialViewportRequestBus.h>
|
||||
#include <Atom/Feature/Utils/ModelPreset.h>
|
||||
#include <Viewport/MaterialViewportRequestBus.h>
|
||||
#include <Window/ToolBar/ModelPresetComboBox.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
@@ -102,4 +102,4 @@ namespace MaterialEditor
|
||||
|
||||
} // namespace MaterialEditor
|
||||
|
||||
#include <Source/Window/ToolBar/moc_ModelPresetComboBox.cpp>
|
||||
#include <Window/ToolBar/moc_ModelPresetComboBox.cpp>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#if !defined(Q_MOC_RUN)
|
||||
#include <QComboBox>
|
||||
#include <Atom/Viewport/MaterialViewportNotificationBus.h>
|
||||
#include <Viewport/MaterialViewportNotificationBus.h>
|
||||
#endif
|
||||
|
||||
namespace MaterialEditor
|
||||
|
||||
+2
-2
@@ -7,10 +7,10 @@
|
||||
*/
|
||||
|
||||
#include <Atom/RPI.Reflect/Model/ModelAsset.h>
|
||||
#include <Atom/Viewport/MaterialViewportRequestBus.h>
|
||||
#include <AtomToolsFramework/Inspector/InspectorPropertyGroupWidget.h>
|
||||
#include <AtomToolsFramework/Util/Util.h>
|
||||
#include <AzCore/Utils/Utils.h>
|
||||
#include <Viewport/MaterialViewportRequestBus.h>
|
||||
#include <Window/PresetBrowserDialogs/LightingPresetBrowserDialog.h>
|
||||
#include <Window/PresetBrowserDialogs/ModelPresetBrowserDialog.h>
|
||||
#include <Window/ViewportSettingsInspector/ViewportSettingsInspector.h>
|
||||
@@ -376,4 +376,4 @@ namespace MaterialEditor
|
||||
|
||||
} // namespace MaterialEditor
|
||||
|
||||
#include <Source/Window/ViewportSettingsInspector/moc_ViewportSettingsInspector.cpp>
|
||||
#include <Window/ViewportSettingsInspector/moc_ViewportSettingsInspector.cpp>
|
||||
|
||||
+3
-3
@@ -12,11 +12,11 @@
|
||||
#include <ACES/Aces.h>
|
||||
#include <Atom/Feature/Utils/LightingPreset.h>
|
||||
#include <Atom/Feature/Utils/ModelPreset.h>
|
||||
#include <Atom/Viewport/MaterialViewportNotificationBus.h>
|
||||
#include <Atom/Viewport/MaterialViewportSettings.h>
|
||||
#include <Atom/Window/MaterialEditorWindowSettings.h>
|
||||
#include <AtomToolsFramework/Inspector/InspectorWidget.h>
|
||||
#include <AzToolsFramework/UI/PropertyEditor/PropertyEditorAPI_Internals.h>
|
||||
#include <Viewport/MaterialViewportNotificationBus.h>
|
||||
#include <Viewport/MaterialViewportSettings.h>
|
||||
#include <Window/MaterialEditorWindowSettings.h>
|
||||
#endif
|
||||
|
||||
namespace MaterialEditor
|
||||
|
||||
@@ -10,4 +10,86 @@ set(FILES
|
||||
Source/main.cpp
|
||||
Source/MaterialEditorApplication.cpp
|
||||
Source/MaterialEditorApplication.h
|
||||
|
||||
Source/Document/MaterialDocumentRequestBus.h
|
||||
Source/Document/MaterialDocumentSettings.h
|
||||
Source/Document/MaterialDocument.cpp
|
||||
Source/Document/MaterialDocument.h
|
||||
Source/Document/MaterialDocumentSettings.cpp
|
||||
|
||||
Source/Viewport/MaterialViewportModule.h
|
||||
Source/Viewport/MaterialViewportModule.cpp
|
||||
Source/Viewport/InputController/MaterialEditorViewportInputControllerBus.h
|
||||
Source/Viewport/MaterialViewportSettings.h
|
||||
Source/Viewport/MaterialViewportRequestBus.h
|
||||
Source/Viewport/MaterialViewportNotificationBus.h
|
||||
Source/Viewport/PerformanceMetrics.h
|
||||
Source/Viewport/PerformanceMonitorRequestBus.h
|
||||
Source/Viewport/InputController/MaterialEditorViewportInputController.cpp
|
||||
Source/Viewport/InputController/MaterialEditorViewportInputController.h
|
||||
Source/Viewport/InputController/Behavior.cpp
|
||||
Source/Viewport/InputController/Behavior.h
|
||||
Source/Viewport/InputController/DollyCameraBehavior.cpp
|
||||
Source/Viewport/InputController/DollyCameraBehavior.h
|
||||
Source/Viewport/InputController/IdleBehavior.cpp
|
||||
Source/Viewport/InputController/IdleBehavior.h
|
||||
Source/Viewport/InputController/MoveCameraBehavior.cpp
|
||||
Source/Viewport/InputController/MoveCameraBehavior.h
|
||||
Source/Viewport/InputController/PanCameraBehavior.cpp
|
||||
Source/Viewport/InputController/PanCameraBehavior.h
|
||||
Source/Viewport/InputController/OrbitCameraBehavior.cpp
|
||||
Source/Viewport/InputController/OrbitCameraBehavior.h
|
||||
Source/Viewport/InputController/RotateEnvironmentBehavior.cpp
|
||||
Source/Viewport/InputController/RotateEnvironmentBehavior.h
|
||||
Source/Viewport/InputController/RotateModelBehavior.cpp
|
||||
Source/Viewport/InputController/RotateModelBehavior.h
|
||||
Source/Viewport/MaterialViewportSettings.cpp
|
||||
Source/Viewport/MaterialViewportComponent.cpp
|
||||
Source/Viewport/MaterialViewportComponent.h
|
||||
Source/Viewport/MaterialViewportWidget.cpp
|
||||
Source/Viewport/MaterialViewportWidget.h
|
||||
Source/Viewport/MaterialViewportWidget.ui
|
||||
Source/Viewport/MaterialViewportRenderer.cpp
|
||||
Source/Viewport/MaterialViewportRenderer.h
|
||||
Source/Viewport/PerformanceMonitorComponent.cpp
|
||||
Source/Viewport/PerformanceMonitorComponent.h
|
||||
|
||||
Source/Window/MaterialEditorWindowSettings.h
|
||||
Source/Window/MaterialEditorBrowserInteractions.h
|
||||
Source/Window/MaterialEditorBrowserInteractions.cpp
|
||||
Source/Window/MaterialEditorWindow.h
|
||||
Source/Window/MaterialEditorWindow.cpp
|
||||
Source/Window/MaterialEditorWindowSettings.cpp
|
||||
Source/Window/MaterialEditor.qrc
|
||||
Source/Window/MaterialEditor.qss
|
||||
Source/Window/SettingsDialog/SettingsDialog.cpp
|
||||
Source/Window/SettingsDialog/SettingsDialog.h
|
||||
Source/Window/SettingsDialog/SettingsWidget.cpp
|
||||
Source/Window/SettingsDialog/SettingsWidget.h
|
||||
Source/Window/CreateMaterialDialog/CreateMaterialDialog.cpp
|
||||
Source/Window/CreateMaterialDialog/CreateMaterialDialog.h
|
||||
Source/Window/CreateMaterialDialog/CreateMaterialDialog.ui
|
||||
Source/Window/PresetBrowserDialogs/PresetBrowserDialog.cpp
|
||||
Source/Window/PresetBrowserDialogs/PresetBrowserDialog.h
|
||||
Source/Window/PresetBrowserDialogs/PresetBrowserDialog.ui
|
||||
Source/Window/PresetBrowserDialogs/LightingPresetBrowserDialog.cpp
|
||||
Source/Window/PresetBrowserDialogs/LightingPresetBrowserDialog.h
|
||||
Source/Window/PresetBrowserDialogs/ModelPresetBrowserDialog.cpp
|
||||
Source/Window/PresetBrowserDialogs/ModelPresetBrowserDialog.h
|
||||
Source/Window/PerformanceMonitor/PerformanceMonitorWidget.cpp
|
||||
Source/Window/PerformanceMonitor/PerformanceMonitorWidget.h
|
||||
Source/Window/PerformanceMonitor/PerformanceMonitorWidget.ui
|
||||
Source/Window/ToolBar/MaterialEditorToolBar.h
|
||||
Source/Window/ToolBar/MaterialEditorToolBar.cpp
|
||||
Source/Window/ToolBar/ModelPresetComboBox.h
|
||||
Source/Window/ToolBar/ModelPresetComboBox.cpp
|
||||
Source/Window/ToolBar/LightingPresetComboBox.h
|
||||
Source/Window/ToolBar/LightingPresetComboBox.cpp
|
||||
Source/Window/MaterialInspector/MaterialInspector.h
|
||||
Source/Window/MaterialInspector/MaterialInspector.cpp
|
||||
Source/Window/ViewportSettingsInspector/ViewportSettingsInspector.h
|
||||
Source/Window/ViewportSettingsInspector/ViewportSettingsInspector.cpp
|
||||
Source/Window/HelpDialog/HelpDialog.h
|
||||
Source/Window/HelpDialog/HelpDialog.cpp
|
||||
Source/Window/HelpDialog/HelpDialog.ui
|
||||
)
|
||||
|
||||
@@ -1,19 +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(FILES
|
||||
Include/Atom/Document/MaterialDocumentModule.h
|
||||
Include/Atom/Document/MaterialDocumentRequestBus.h
|
||||
Include/Atom/Document/MaterialDocumentSettings.h
|
||||
Source/Document/MaterialDocumentModule.cpp
|
||||
Source/Document/MaterialDocumentSystemComponent.cpp
|
||||
Source/Document/MaterialDocumentSystemComponent.h
|
||||
Source/Document/MaterialDocument.cpp
|
||||
Source/Document/MaterialDocument.h
|
||||
Source/Document/MaterialDocumentSettings.cpp
|
||||
)
|
||||
@@ -1,46 +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(FILES
|
||||
Include/Atom/Viewport/InputController/MaterialEditorViewportInputControllerBus.h
|
||||
Include/Atom/Viewport/MaterialViewportModule.h
|
||||
Include/Atom/Viewport/MaterialViewportSettings.h
|
||||
Include/Atom/Viewport/MaterialViewportRequestBus.h
|
||||
Include/Atom/Viewport/MaterialViewportNotificationBus.h
|
||||
Include/Atom/Viewport/PerformanceMetrics.h
|
||||
Include/Atom/Viewport/PerformanceMonitorRequestBus.h
|
||||
Source/Viewport/InputController/MaterialEditorViewportInputController.cpp
|
||||
Source/Viewport/InputController/MaterialEditorViewportInputController.h
|
||||
Source/Viewport/InputController/Behavior.cpp
|
||||
Source/Viewport/InputController/Behavior.h
|
||||
Source/Viewport/InputController/DollyCameraBehavior.cpp
|
||||
Source/Viewport/InputController/DollyCameraBehavior.h
|
||||
Source/Viewport/InputController/IdleBehavior.cpp
|
||||
Source/Viewport/InputController/IdleBehavior.h
|
||||
Source/Viewport/InputController/MoveCameraBehavior.cpp
|
||||
Source/Viewport/InputController/MoveCameraBehavior.h
|
||||
Source/Viewport/InputController/PanCameraBehavior.cpp
|
||||
Source/Viewport/InputController/PanCameraBehavior.h
|
||||
Source/Viewport/InputController/OrbitCameraBehavior.cpp
|
||||
Source/Viewport/InputController/OrbitCameraBehavior.h
|
||||
Source/Viewport/InputController/RotateEnvironmentBehavior.cpp
|
||||
Source/Viewport/InputController/RotateEnvironmentBehavior.h
|
||||
Source/Viewport/InputController/RotateModelBehavior.cpp
|
||||
Source/Viewport/InputController/RotateModelBehavior.h
|
||||
Source/Viewport/MaterialViewportModule.cpp
|
||||
Source/Viewport/MaterialViewportSettings.cpp
|
||||
Source/Viewport/MaterialViewportComponent.cpp
|
||||
Source/Viewport/MaterialViewportComponent.h
|
||||
Source/Viewport/MaterialViewportWidget.cpp
|
||||
Source/Viewport/MaterialViewportWidget.h
|
||||
Source/Viewport/MaterialViewportWidget.ui
|
||||
Source/Viewport/MaterialViewportRenderer.cpp
|
||||
Source/Viewport/MaterialViewportRenderer.h
|
||||
Source/Viewport/PerformanceMonitorComponent.cpp
|
||||
Source/Viewport/PerformanceMonitorComponent.h
|
||||
)
|
||||
@@ -1,52 +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(FILES
|
||||
Include/Atom/Window/MaterialEditorWindowModule.h
|
||||
Include/Atom/Window/MaterialEditorWindowSettings.h
|
||||
Source/Window/MaterialEditorBrowserInteractions.h
|
||||
Source/Window/MaterialEditorBrowserInteractions.cpp
|
||||
Source/Window/MaterialEditorWindow.h
|
||||
Source/Window/MaterialEditorWindow.cpp
|
||||
Source/Window/MaterialEditorWindowModule.cpp
|
||||
Source/Window/MaterialEditorWindowSettings.cpp
|
||||
Source/Window/MaterialEditor.qrc
|
||||
Source/Window/MaterialEditor.qss
|
||||
Source/Window/MaterialEditorWindowComponent.h
|
||||
Source/Window/MaterialEditorWindowComponent.cpp
|
||||
Source/Window/SettingsDialog/SettingsDialog.cpp
|
||||
Source/Window/SettingsDialog/SettingsDialog.h
|
||||
Source/Window/SettingsDialog/SettingsWidget.cpp
|
||||
Source/Window/SettingsDialog/SettingsWidget.h
|
||||
Source/Window/CreateMaterialDialog/CreateMaterialDialog.cpp
|
||||
Source/Window/CreateMaterialDialog/CreateMaterialDialog.h
|
||||
Source/Window/CreateMaterialDialog/CreateMaterialDialog.ui
|
||||
Source/Window/PresetBrowserDialogs/PresetBrowserDialog.cpp
|
||||
Source/Window/PresetBrowserDialogs/PresetBrowserDialog.h
|
||||
Source/Window/PresetBrowserDialogs/PresetBrowserDialog.ui
|
||||
Source/Window/PresetBrowserDialogs/LightingPresetBrowserDialog.cpp
|
||||
Source/Window/PresetBrowserDialogs/LightingPresetBrowserDialog.h
|
||||
Source/Window/PresetBrowserDialogs/ModelPresetBrowserDialog.cpp
|
||||
Source/Window/PresetBrowserDialogs/ModelPresetBrowserDialog.h
|
||||
Source/Window/PerformanceMonitor/PerformanceMonitorWidget.cpp
|
||||
Source/Window/PerformanceMonitor/PerformanceMonitorWidget.h
|
||||
Source/Window/PerformanceMonitor/PerformanceMonitorWidget.ui
|
||||
Source/Window/ToolBar/MaterialEditorToolBar.h
|
||||
Source/Window/ToolBar/MaterialEditorToolBar.cpp
|
||||
Source/Window/ToolBar/ModelPresetComboBox.h
|
||||
Source/Window/ToolBar/ModelPresetComboBox.cpp
|
||||
Source/Window/ToolBar/LightingPresetComboBox.h
|
||||
Source/Window/ToolBar/LightingPresetComboBox.cpp
|
||||
Source/Window/MaterialInspector/MaterialInspector.h
|
||||
Source/Window/MaterialInspector/MaterialInspector.cpp
|
||||
Source/Window/ViewportSettingsInspector/ViewportSettingsInspector.h
|
||||
Source/Window/ViewportSettingsInspector/ViewportSettingsInspector.cpp
|
||||
Source/Window/HelpDialog/HelpDialog.h
|
||||
Source/Window/HelpDialog/HelpDialog.cpp
|
||||
Source/Window/HelpDialog/HelpDialog.ui
|
||||
)
|
||||
+6
-6
@@ -8,15 +8,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Atom/Core/ShaderManagementConsoleRequestBus.h>
|
||||
#include <Atom/RPI.Reflect/Material/MaterialAsset.h>
|
||||
#include <AtomToolsFramework/Window/AtomToolsMainWindowFactoryRequestBus.h>
|
||||
|
||||
#include <AzCore/Component/Component.h>
|
||||
#include <AzToolsFramework/API/EditorWindowRequestBus.h>
|
||||
|
||||
#include <Atom/RPI.Reflect/Material/MaterialAsset.h>
|
||||
|
||||
#include <AtomToolsFramework/Window/AtomToolsMainWindowFactoryRequestBus.h>
|
||||
#include <Atom/Core/ShaderManagementConsoleRequestBus.h>
|
||||
#include <Source/Window/ShaderManagementConsoleBrowserInteractions.h>
|
||||
#include <Source/Window/ShaderManagementConsoleWindow.h>
|
||||
#include <Window/ShaderManagementConsoleBrowserInteractions.h>
|
||||
#include <Window/ShaderManagementConsoleWindow.h>
|
||||
|
||||
namespace ShaderManagementConsole
|
||||
{
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
#include <AzCore/PlatformDef.h>
|
||||
#include <Source/Window/ToolBar/ShaderManagementConsoleToolBar.h>
|
||||
#include <Window/ToolBar/ShaderManagementConsoleToolBar.h>
|
||||
|
||||
AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") // disable warnings spawned by QT
|
||||
#include <AzQtComponents/Components/Widgets/ToolBar.h>
|
||||
@@ -29,4 +29,4 @@ namespace ShaderManagementConsole
|
||||
}
|
||||
} // namespace ShaderManagementConsole
|
||||
|
||||
#include <Source/Window/ToolBar/moc_ShaderManagementConsoleToolBar.cpp>
|
||||
#include <Window/ToolBar/moc_ShaderManagementConsoleToolBar.cpp>
|
||||
|
||||
Reference in New Issue
Block a user