Merge branch 'development' into Atom/guthadam/material_editor_replace_modified_color_with_indicator
Signed-off-by: Guthrie Adams <guthadam@amazon.com> # Conflicts: # Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialInspector/MaterialInspector.cpp # Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialInspector/MaterialInspector.h # Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialComponentInspector.cpp # Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialComponentInspector.h
This commit is contained in:
+3
-3
@@ -32,10 +32,10 @@ namespace AtomToolsFramework
|
||||
// AtomToolsDocumentRequestBus::Handler implementation
|
||||
AZStd::string_view GetAbsolutePath() const override;
|
||||
AZStd::string_view GetRelativePath() const override;
|
||||
const AZStd::any& GetPropertyValue(const AZ::Name& propertyFullName) const override;
|
||||
const AtomToolsFramework::DynamicProperty& GetProperty(const AZ::Name& propertyFullName) const override;
|
||||
const AZStd::any& GetPropertyValue(const AZ::Name& propertyId) const override;
|
||||
const AtomToolsFramework::DynamicProperty& GetProperty(const AZ::Name& propertyId) const override;
|
||||
bool IsPropertyGroupVisible(const AZ::Name& propertyGroupFullName) const override;
|
||||
void SetPropertyValue(const AZ::Name& propertyFullName, const AZStd::any& value) override;
|
||||
void SetPropertyValue(const AZ::Name& propertyId, const AZStd::any& value) override;
|
||||
bool Open(AZStd::string_view loadPath) override;
|
||||
bool Reopen() override;
|
||||
bool Save() override;
|
||||
|
||||
+1
@@ -10,6 +10,7 @@
|
||||
#include <AzCore/std/any.h>
|
||||
#include <AtomToolsFramework/DynamicProperty/DynamicProperty.h>
|
||||
#include <AtomToolsFramework/DynamicProperty/DynamicPropertyGroup.h>
|
||||
#include <AzCore/EBus/EBus.h>
|
||||
|
||||
namespace AtomToolsFramework
|
||||
{
|
||||
|
||||
+2
-2
@@ -42,8 +42,8 @@ namespace AtomToolsFramework
|
||||
AZ_CLASS_ALLOCATOR(DynamicPropertyConfig, AZ::SystemAllocator, 0);
|
||||
|
||||
DynamicPropertyType m_dataType = DynamicPropertyType::Invalid;
|
||||
AZ::Name m_id;
|
||||
AZStd::string m_nameId;
|
||||
AZ::Name m_id; //!< The full property ID, which will normally be "groupName.propertyName"
|
||||
AZStd::string m_name;
|
||||
AZStd::string m_displayName;
|
||||
AZStd::string m_groupName;
|
||||
AZStd::string m_description;
|
||||
|
||||
+9
-9
@@ -41,27 +41,27 @@ namespace AtomToolsFramework
|
||||
|
||||
//! Add a group consisting of a collapsable header and widget
|
||||
virtual void AddGroup(
|
||||
const AZStd::string& groupNameId,
|
||||
const AZStd::string& groupName,
|
||||
const AZStd::string& groupDisplayName,
|
||||
const AZStd::string& groupDescription,
|
||||
QWidget* groupWidget) = 0;
|
||||
|
||||
//! Sets the visibility of a specific property group. This impacts both the header and the widget.
|
||||
virtual void SetGroupVisible(const AZStd::string& groupNameId, bool visible) = 0;
|
||||
virtual void SetGroupVisible(const AZStd::string& groupName, bool visible) = 0;
|
||||
|
||||
//! Returns whether a specific property is visible.
|
||||
//! Note this follows the same rules as QWidget::isVisible(), meaning a group could be not visible due to the widget's parents being not visible.
|
||||
virtual bool IsGroupVisible(const AZStd::string& groupNameId) const = 0;
|
||||
virtual bool IsGroupVisible(const AZStd::string& groupName) const = 0;
|
||||
|
||||
//! Returns whether a specific property is explicitly hidden.
|
||||
//! Note this follows the same rules as QWidget::isHidden(), meaning a group that is hidden will not become visible automatically when the parent becomes visible.
|
||||
virtual bool IsGroupHidden(const AZStd::string& groupNameId) const = 0;
|
||||
virtual bool IsGroupHidden(const AZStd::string& groupName) const = 0;
|
||||
|
||||
//! Calls Refresh for a specific InspectorGroupWidget, allowing for non-destructive UI changes
|
||||
virtual void RefreshGroup(const AZStd::string& groupNameId) = 0;
|
||||
virtual void RefreshGroup(const AZStd::string& groupName) = 0;
|
||||
|
||||
//! Calls Rebuild for a specific InspectorGroupWidget, allowing for destructive UI changes
|
||||
virtual void RebuildGroup(const AZStd::string& groupNameId) = 0;
|
||||
virtual void RebuildGroup(const AZStd::string& groupName) = 0;
|
||||
|
||||
//! Calls Refresh for all InspectorGroupWidget, allowing for non-destructive UI changes
|
||||
virtual void RefreshAll() = 0;
|
||||
@@ -70,13 +70,13 @@ namespace AtomToolsFramework
|
||||
virtual void RebuildAll() = 0;
|
||||
|
||||
//! Expands a specific group
|
||||
virtual void ExpandGroup(const AZStd::string& groupNameId) = 0;
|
||||
virtual void ExpandGroup(const AZStd::string& groupName) = 0;
|
||||
|
||||
//! Collapses a specific group
|
||||
virtual void CollapseGroup(const AZStd::string& groupNameId) = 0;
|
||||
virtual void CollapseGroup(const AZStd::string& groupName) = 0;
|
||||
|
||||
//! Checks the expansion state of a specific group
|
||||
virtual bool IsGroupExpanded(const AZStd::string& groupNameId) const = 0;
|
||||
virtual bool IsGroupExpanded(const AZStd::string& groupName) const = 0;
|
||||
|
||||
//! Expands all groups and headers
|
||||
virtual void ExpandAll() = 0;
|
||||
|
||||
+13
-13
@@ -52,33 +52,33 @@ namespace AtomToolsFramework
|
||||
void AddGroupsEnd() override;
|
||||
|
||||
void AddGroup(
|
||||
const AZStd::string& groupNameId,
|
||||
const AZStd::string& groupName,
|
||||
const AZStd::string& groupDisplayName,
|
||||
const AZStd::string& groupDescription,
|
||||
QWidget* groupWidget) override;
|
||||
|
||||
void SetGroupVisible(const AZStd::string& groupNameId, bool visible) override;
|
||||
bool IsGroupVisible(const AZStd::string& groupNameId) const override;
|
||||
bool IsGroupHidden(const AZStd::string& groupNameId) const override;
|
||||
void SetGroupVisible(const AZStd::string& groupName, bool visible) override;
|
||||
bool IsGroupVisible(const AZStd::string& groupName) const override;
|
||||
bool IsGroupHidden(const AZStd::string& groupName) const override;
|
||||
|
||||
void RefreshGroup(const AZStd::string& groupNameId) override;
|
||||
void RebuildGroup(const AZStd::string& groupNameId) override;
|
||||
void RefreshGroup(const AZStd::string& groupName) override;
|
||||
void RebuildGroup(const AZStd::string& groupName) override;
|
||||
|
||||
void RefreshAll() override;
|
||||
void RebuildAll() override;
|
||||
|
||||
void ExpandGroup(const AZStd::string& groupNameId) override;
|
||||
void CollapseGroup(const AZStd::string& groupNameId) override;
|
||||
bool IsGroupExpanded(const AZStd::string& groupNameId) const override;
|
||||
void ExpandGroup(const AZStd::string& groupName) override;
|
||||
void CollapseGroup(const AZStd::string& groupName) override;
|
||||
bool IsGroupExpanded(const AZStd::string& groupName) const override;
|
||||
|
||||
void ExpandAll() override;
|
||||
void CollapseAll() override;
|
||||
|
||||
protected:
|
||||
virtual bool ShouldGroupAutoExpanded(const AZStd::string& groupNameId) const;
|
||||
virtual void OnGroupExpanded(const AZStd::string& groupNameId);
|
||||
virtual void OnGroupCollapsed(const AZStd::string& groupNameId);
|
||||
virtual void OnHeaderClicked(const AZStd::string& groupNameId, QMouseEvent* event);
|
||||
virtual bool ShouldGroupAutoExpanded(const AZStd::string& groupName) const;
|
||||
virtual void OnGroupExpanded(const AZStd::string& groupName);
|
||||
virtual void OnGroupCollapsed(const AZStd::string& groupName);
|
||||
virtual void OnHeaderClicked(const AZStd::string& groupName, QMouseEvent* event);
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::InspectorWidget> m_ui;
|
||||
|
||||
+3
-10
@@ -10,7 +10,6 @@
|
||||
|
||||
#include <Atom/RPI.Public/ViewportContext.h>
|
||||
#include <AtomToolsFramework/Viewport/ModularViewportCameraControllerRequestBus.h>
|
||||
#include <AzFramework/Entity/EntityDebugDisplayBus.h>
|
||||
#include <AzFramework/Viewport/CameraInput.h>
|
||||
#include <AzFramework/Viewport/MultiViewportController.h>
|
||||
|
||||
@@ -103,7 +102,6 @@ namespace AtomToolsFramework
|
||||
class ModularViewportCameraControllerInstance final
|
||||
: public AzFramework::MultiViewportControllerInstanceInterface<ModularViewportCameraController>
|
||||
, public ModularViewportCameraControllerRequestBus::Handler
|
||||
, private AzFramework::ViewportDebugDisplayEventBus::Handler
|
||||
{
|
||||
public:
|
||||
explicit ModularViewportCameraControllerInstance(AzFramework::ViewportId viewportId, ModularViewportCameraController* controller);
|
||||
@@ -114,16 +112,12 @@ namespace AtomToolsFramework
|
||||
void UpdateViewport(const AzFramework::ViewportControllerUpdateEvent& event) override;
|
||||
|
||||
// ModularViewportCameraControllerRequestBus overrides ...
|
||||
void InterpolateToTransform(const AZ::Transform& worldFromLocal, float lookAtDistance) override;
|
||||
AZStd::optional<AZ::Vector3> LookAtAfterInterpolation() const override;
|
||||
void InterpolateToTransform(const AZ::Transform& worldFromLocal) override;
|
||||
AZ::Transform GetReferenceFrame() const override;
|
||||
void SetReferenceFrame(const AZ::Transform& worldFromLocal) override;
|
||||
void ClearReferenceFrame() override;
|
||||
|
||||
private:
|
||||
// AzFramework::ViewportDebugDisplayEventBus overrides ...
|
||||
void DisplayViewport(const AzFramework::ViewportInfo& viewportInfo, AzFramework::DebugDisplayRequests& debugDisplay) override;
|
||||
|
||||
//! Update the reference frame after a change has been made to the camera
|
||||
//! view without updating the internal camera via user input.
|
||||
void RefreshReferenceFrame();
|
||||
@@ -154,9 +148,8 @@ namespace AtomToolsFramework
|
||||
|
||||
CameraAnimation m_cameraAnimation; //!< Camera animation state (used during CameraMode::Animation).
|
||||
CameraMode m_cameraMode = CameraMode::Control; //!< The current mode the camera is operating in.
|
||||
AZStd::optional<AZ::Vector3> m_lookAtAfterInterpolation; //!< The look at point after an interpolation has finished.
|
||||
//!< Will be cleared when the view changes (camera looks away).
|
||||
AZ::Transform m_referenceFrameOverride = AZ::Transform::CreateIdentity(); //!<
|
||||
//! An additional reference frame the camera can operate in (identity has no effect).
|
||||
AZ::Transform m_referenceFrameOverride = AZ::Transform::CreateIdentity();
|
||||
//! Flag to prevent circular updates of the camera transform (while the viewport transform is being updated internally).
|
||||
bool m_updatingTransformInternally = false;
|
||||
//! Listen for camera view changes outside of the camera controller.
|
||||
|
||||
+1
-5
@@ -29,11 +29,7 @@ namespace AtomToolsFramework
|
||||
|
||||
//! Begin a smooth transition of the camera to the requested transform.
|
||||
//! @param worldFromLocal The transform of where the camera should end up.
|
||||
//! @param lookAtDistance The distance between the camera transform and the imagined look at point.
|
||||
virtual void InterpolateToTransform(const AZ::Transform& worldFromLocal, float lookAtDistance) = 0;
|
||||
|
||||
//! Look at point after an interpolation has finished and no translation has occurred.
|
||||
virtual AZStd::optional<AZ::Vector3> LookAtAfterInterpolation() const = 0;
|
||||
virtual void InterpolateToTransform(const AZ::Transform& worldFromLocal) = 0;
|
||||
|
||||
//! Return the current reference frame.
|
||||
//! @note If a reference frame has not been set or a frame has been cleared, this is just the identity.
|
||||
|
||||
-24
@@ -10,7 +10,6 @@
|
||||
|
||||
#include <QWidget>
|
||||
#include <QElapsedTimer>
|
||||
#include <QPointer>
|
||||
#include <Atom/RPI.Public/Base.h>
|
||||
#include <AzToolsFramework/Viewport/ViewportMessages.h>
|
||||
#include <AzToolsFramework/Input/QtEventToAzInputManager.h>
|
||||
@@ -22,8 +21,6 @@
|
||||
#include <AzFramework/Windowing/WindowBus.h>
|
||||
#include <AzCore/Component/TickBus.h>
|
||||
#include <Atom/RPI.Public/AuxGeom/AuxGeomFeatureProcessorInterface.h>
|
||||
#include <Atom/Bootstrap/BootstrapNotificationBus.h>
|
||||
#include <AtomToolsFramework/Viewport/RenderViewportWidgetNotificationBus.h>
|
||||
|
||||
namespace AtomToolsFramework
|
||||
{
|
||||
@@ -38,8 +35,6 @@ namespace AtomToolsFramework
|
||||
, public AzFramework::WindowRequestBus::Handler
|
||||
, protected AzFramework::InputChannelEventListener
|
||||
, protected AZ::TickBus::Handler
|
||||
, protected AZ::Render::Bootstrap::NotificationBus::Handler
|
||||
, protected AtomToolsFramework::RenderViewportWidgetNotificationBus::Handler
|
||||
{
|
||||
public:
|
||||
//! Creates a RenderViewportWidget.
|
||||
@@ -126,7 +121,6 @@ namespace AtomToolsFramework
|
||||
|
||||
// AZ::TickBus::Handler ...
|
||||
void OnTick(float deltaTime, AZ::ScriptTimePoint time) override;
|
||||
int GetTickOrder() override;
|
||||
|
||||
// QWidget ...
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
@@ -134,21 +128,9 @@ namespace AtomToolsFramework
|
||||
void enterEvent(QEvent* event) override;
|
||||
void leaveEvent(QEvent* event) override;
|
||||
void mouseMoveEvent(QMouseEvent* event) override;
|
||||
void focusInEvent(QFocusEvent* event) override;
|
||||
|
||||
// AZ::Render::Bootstrap::NotificationBus::Handler ...
|
||||
void OnFrameRateLimitChanged(float fpsLimit) override;
|
||||
|
||||
// AtomToolsFramework::RenderViewportWidgetNotificationBus::Handler ...
|
||||
void OnInactiveViewportFrameRateChanged(float fpsLimit) override;
|
||||
|
||||
private:
|
||||
AzFramework::NativeWindowHandle GetNativeWindowHandle() const;
|
||||
void UpdateFrameRate();
|
||||
|
||||
void SetScreen(QScreen* screen);
|
||||
void SendWindowResizeEvent();
|
||||
void NotifyUpdateRefreshRate();
|
||||
|
||||
// The underlying ViewportContext, our entry-point to the Atom RPI.
|
||||
AZ::RPI::ViewportContextPtr m_viewportContext;
|
||||
@@ -169,11 +151,5 @@ namespace AtomToolsFramework
|
||||
AZ::ScriptTimePoint m_time;
|
||||
// Maps our internal Qt events into AzFramework InputChannels for our ViewportControllerList.
|
||||
AzToolsFramework::QtEventToAzInputMapper* m_inputChannelMapper = nullptr;
|
||||
// Stores our current screen, used for tracking the current refresh rate.
|
||||
QScreen* m_screen = nullptr;
|
||||
// Stores the last RenderViewportWidget that has received user focus.
|
||||
// This is used for optional framerate throtting for "inactive" viewports via the
|
||||
// ed_inactive_viewport_fps_limit CVAR.
|
||||
AZ::EnvironmentVariable<RenderViewportWidget*> m_lastFocusedViewport;
|
||||
};
|
||||
} //namespace AtomToolsFramework
|
||||
|
||||
-35
@@ -1,35 +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/EBus/EBus.h>
|
||||
|
||||
namespace AtomToolsFramework
|
||||
{
|
||||
//! Provides an interface for providing notifications specific to RenderViewportWidget.
|
||||
//! @note Most behaviors in RenderViewportWidget are handled by its underyling
|
||||
//! ViewportContext, this bus is specifically for functionality exclusive to the
|
||||
//! Qt layer provided by RenderViewportWidget.
|
||||
class RenderViewportWidgetNotifications : public AZ::EBusTraits
|
||||
{
|
||||
public:
|
||||
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;
|
||||
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple;
|
||||
|
||||
//! Triggered when the idle frame rate limit for inactive viewports changed.
|
||||
//! Controlled by the ed_inactive_viewport_fps_limit CVAR.
|
||||
//! Active viewports are controlled by the r_fps_limit CVAR.
|
||||
virtual void OnInactiveViewportFrameRateChanged([[maybe_unused]]float fpsLimit){}
|
||||
|
||||
protected:
|
||||
~RenderViewportWidgetNotifications() = default;
|
||||
};
|
||||
|
||||
using RenderViewportWidgetNotificationBus = AZ::EBus<RenderViewportWidgetNotifications>;
|
||||
} // namespace AtomToolsFramework
|
||||
Reference in New Issue
Block a user