* Fix out-of-date swapchain when QT window is not activated.
Signed-off-by: jiaweig <jiaweig@amazon.com>
* Removed new code of the previous hack.
Signed-off-by: jiaweig <jiaweig@amazon.com>
A "property name" is the name of the just the property without regard to the group that it's in. A "group name" is the name of the group. And a "property ID" is the full unique name of a property in the form "groupName.propertyName". This is important preparation for upcoming changes where property sets can contain other property sets, and property IDs can be arbitrarily long like "layer1.baseColor.factor" for example.
The naming changes include variables, some code comments, and the .materialtype file format. I was able to make these changes in a backward compatible way so a property or group "id" field has been replaced with a "name" field, but "id" is still supported for compatibility. StandardPBR, EnhancedPBR, StandardMultilayerPBR, and Skin have all been updated. Note that MinimalPBR has not been updated, proving that backward compatibility works. (We can update this one too at some point though).
Testing:
Opened up materials in the material editor.
Ran AtomSampleViewer in dx12 and vulkan with no new failures.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
• Inspector is locked to a specific entity and material assignment ID
• All modifications are made via the material component request bus
• Removed complicated configuration management in editor material component
• Multiple material property inspectors can be opened
• Multiple materials across different entities can be edited simultaneously
• No longer blocks the viewport or other interactions
• Added functions to material component request bus for retrieving material slot labels, default materials, getting and setting property and UV overrides
• Added more asset related types to material property value conversion from any
• Added support for static heading widget on top of atom tools inspector, currently used for menus and messages
WIP: Still investigating intermittent crash because of corrupt asset property
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
* Implement sync interval and refresh rate API for RenderViewportWidget
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Measure actual frame timings in the viewport info overlay.
Takes the median of the sum of (frame end - frame begin) to provide more a more representative view of when frames begin and end.
Note: Until VSync is internally supported by the event loop, this will produce nearly identical frame timings as the frame will spend as much time as needed synchronously waiting on a vblank.
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Make frame timing per-pipeline, wire up refresh rate info to ViewportContext
Signed-off-by: nvsickle <nvsickle@amazon.com>
* POC: Frame limit pipeline rendering
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Switch Editor tick to every 0ms to allow better tick accumulation behavior
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Move RPISystemComponent to the tick bus, remove tick accumulation logic
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Add `AddToRenderTickAtInterval` to RenderPipeline API
This allows a pipeline to update at a set cadence, instead of rendering every frame or being directly told when to tick.
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Make ViewportContext enforce a target framerate
-Adds GetFpsLimit/SetFpsLimit for actively limiting FPS
-Calculates a render tick interval based on vsync and the vps limit and updates the current pipeline
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Add r_fps_limit and ed_inactive_viewport_fps_limit cvars
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Quick null check from a crash I bumped into
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Fix off-by-one on FPS calculation (shouldn't include the not-yet-rendered frame)
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Clarify frame time begin initialization
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Fix TrackView export.
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Address some reviewer feedback, revert RPISystem API change, fix CPU profiler.
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Add g_simulation_tick_rate
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Address review feedback, make frame limit updates event driven
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Remove timestamp update from ComponentApplication::Tick
Signed-off-by: nvsickle <nvsickle@amazon.com>
* preparatory work to allow for more viewport integration tests
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* minor grammatical fix
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* fix for missed bus call update
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* Release build fix for Windows
* Release build fix for Android
* Release build fix for Windows
* Release build fix for Android
* Release build fix for Linux
* Release build fix for Mac
* Release build fix for iOS
Signed-off-by: Steve Pham <spham@amazon.com>
* updates to camera tests to support different delta times and some further tidy-up
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* support variable delta time in mouse move test
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* fix for drift accumulating in the viewport camera
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* fix typo and update how events are stored
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* respond to PR feedback and fix linux and windows build issues
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* fix failing unit tests in camera input
Signed-off-by: hultonha <hultonha@amazon.co.uk>
Atom tools launch or check for the existence of a local server in order to prevent multiple application processes from running. These checks were being done far too late, after initialization and asset processing, leaving time for multiple processes to start before the server or checks. Zombie processes could start and run indefinitely without user interaction because the event loop was being entered despite the request to exit the application early.
These changes launch the server and checks immediately after the application object is constructed and exit before any other work is done if the application will not be run.
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
Appending is standard and preferred but the tabs elide from the end (instead of middle) and cut it off
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
Renamed document related buses and components to have generic names
Added a base document class with default implementation from which other application specific documents can be derived to work with the document system
Added document factory function registration to the document system request bus so that each application can specify the type of document it creates
Updated all comments and messaging to only refer to documents, not materials or material documents
Updated material editor and shader management console to conform to the new buses
This will provide a first pass of a common interface for a document management system that can be shared by multiple applications
Corrected status bar message copy and paste errors
Updated all test scripts to use the new buses
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
fixed problems with status bar messages not appearing
added status bar messages to shader management console
got rid of central widget variable and moved layout to atom tools window base class
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
* make 'should handle' logic customizable
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* updates to get priority function
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* minor comment tweak
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* add typename for struct initializer
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* fix for ensuring while the camera is 'active', events are consumed and not propagated
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* refactor how we decide which priority to repsond to events to
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* also -> only
Signed-off-by: hultonha <hultonha@amazon.co.uk>
* Make Viewport input events fully Qt based.
This should fix an issue with Qt touch event -> mouse event translation in the Editor, and may also fix issues with the Mac Editor and remote desktop (though, lacking the requisite hardware, I can test precisely none of these things personally).
See https://github.com/o3de/o3de/issues/1889
- Adapted LegacyViewportCameraController to use Movement::X & Y (mostly for testing purposes, it's on the slate for being removed soon)
- Moved cursor capture logic from RenderViewportWidget into QtEventToAzInputManager so that it can make sure it generates correct movement deltas
- Removed ViewportMouseCursorRequests::PreviousViewportCursorScreenPosition to have our viewport controllers use our dedicated Movement::X and Y channels instead, which will work in the launcher
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Address review feedback
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Fix Linux build
Signed-off-by: nvsickle <nvsickle@amazon.com>
-This includes implementations of the API for the Editor and Windows, all other platforms will have a 1.0 scale for now
Signed-off-by: nvsickle <nvsickle@amazon.com>
* Final update copyright headers to reference license files at the repo root
Signed-off-by: spham <spham@amazon.com>
* Fix copyright validator unit tests to support the stale O3DE header scenario
Signed-off-by: spham <spham@amazon.com>
* ensure the new camera respects changing ui values and move camera settings to the settings registry
* factor out creation of modular camera controller
* small updates before posting PR
* updates following review feedback
* updates following review feedback
* Clarify ViewportWorldToScreen being in widget space and add DeviceScalingFactor
* -Fix viewport icons being draw wrong on high DPI displays
-Fix loading viewport icons from absolute paths, which
* Address review feedback, fix build
Cleaned up code around MaterialFunctor's QueryMaterialPropertyMetadata and QueryMaterialPropertyGroupMetadata.
Removed unnecessary "groupHeader->setObjectName(...)"
Simplified code in MaterialInspector::OnDocumentPropertyGroupVisibilityChanged.
The structure of InspectorWidget::m_groups changed, so I had to update my new code accordingly.
Updated the InspectorWidget::m_groups code a bit to be more readable.
Discovered the initial property group visiblity state wasn't being set correctly when a material was first opened, so groups weren't initially hidden when they should have been. This had to be fixed in different ways for MaterialEditor's inspector and MaterialComponent's inspector.
ATOM-14688 Disable Individual Layers
ATOM-14688 Disable Individual Layers
- Added new SetMaterialPropertyGroupVisibility functions to the material functors.
- Updated the MaterialFunctor::EditorContext to include parameters for handling material property group metadata.
- Updated the material inspector(s) to apply the property group visiblity changes from the material functor, to hide or show the property groups.
- Moved some code from MaterialPropertyDescriptor.h/cpp to a new MaterialDynamicMetadata.h/cpp, since these aren't really related to the MaterialPropertyDescriptor code. It's more for material functors to use.
- Also fixed the casing for the "GetMaterialPropertyValue_Image" lua function, since I was already in this code (ATOM-14793 "Fix Inconsistent Casing For LuaMaterialFunctorRuntimeContext")
Tested in MaterialEditor and in in the main Editor's MaterialComponent property override inspector.
* add overload to ActionManager to support capturing an AZStd::function
* move snapping settings to new settings registry
* remove unneeded reference in ViewportSettings
* move viewport setting function implementations to .cpp file
* add more sensible default values for snapping
* fix variable name for angle snapping
* remove const from function prototype value parameters
* add import/export api for free functions
* change from std::bind to a lambda
* remove redundant const for constexpr string_view
* add AZStd alias for std::abs