Commit Graph

29 Commits (ceb61d143c239fc921414d4c3dd20ff0fc8421c0)

Author SHA1 Message Date
Guthrie Adams cd0079c199 Atom Tools: Extracted the viewport input controller from ME to ATF
These viewport controls will be shared with material canvas and other tools that share a similar environment and viewport configurations.
These classes are currently duplicated between the material editor and prototype projects.
This change generalizes some things that are specific to the material editor and moves the system to a common location.
Event buses were removed and replaced with a normal interface.

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams c6ba1ef064 Atom Tools: updated document and windows systems and buses to support multiple instances
• This change is partially to unblock physics tool prototyping. It introduces a tool ID that is passed down into systems and acts as a context for document, window, and other systems and buses.
• The document system component is no longer a component. It is just a system class that can be constructed with a tool ID. Internally, it will connect to its buses and be addressable by tool ID. More than one can be instantiated, each with a unique tool ID.
• These changes are still backward compatible because most of the buses were using broadcast for standalone applications. All of those calls have been updated but not all of the scripts, which should still work as is.
• Got rid of the window factory request bus in favor of just instantiating the main window or any other UI in the application layer.
• Fixed a couple of bugs that were discovered while making these changes.

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams 0f07f581f8 Atom Tools: replaced document settings with settings registry
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams 1497250ff5 Atom Tools: Move common asset browser interactions to shared class in ATF
Moved the class for common asset browser interactions for source files, folders, and source control to atom tools framework.
Added a function to register custom actions
Deleted unnecessary document settings class in favor of settings registry

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams 191db77e4d Atom Tools: Moved performance monitor system component from ME to ATF
Moved the performance monitor system component and metrics gathering from the material editor into atom tools framework so it can be reused and extended by other applications.
Replaced the custom performance monitor docked window in the material editor with status bar widgets that are always visible and take up no screen real estate. This could possibly be moved to the base application class or rendered on top of the viewport.

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams f20bf38f88 Atom Tools: Changed ME preset browser dialog into generic asset grid dialog in ATF
Moving more potentially shared code out of the material editor into atom tools framework.
This change consolidates the lighting preset browser, model preset browser, and the base dialogue that they shared into a single, grid based, asset selection dialog.
AssetGridDialog should appear as a move and rename of PresetBrowserDialog but there are probably too many differences with new variable renames and SelectableAsset struct.
Along the way I found examples showing that event bus broadcast accepted generic functions and lambdas. Used this to do a minor cleanup of the viewport settings inspector where the preset dialogs were initialized and other places that did several back to back bus calls.

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams 843ca5a0ad
Merge pull request #6960 from aws-lumberyard-dev/Atom/guthadam/atom_tools_shared_asset_browser
Atom Tools: moving custom asset browser code to common location
4 years ago
Guthrie Adams eb51cd4c06 Atom Tools: moving custom asset browser code to common location
Consolidated duplicate asset browser code from multiple tools into single class in atom tools framework
Moved creation of asset browser and Python terminal windows into base main window class
Fixed docked window orientations
Added checks to asset browser to prevent crashes if tree state saver was null

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams a6feef3563 Atom Tools: Created base class for document-based applications
Moving some duplicated code to a common base class

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Tom Hulton-Harrop e34ea3bcaa
Fixes for viewport selection issues (#5494)
* improvements to editor selection in the viewport

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* fix issue with being able to select icons that are not showing for entities inside entity containers

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* update comment after review feedback

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* updates to viewport picking code to simplify the api

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* add test to replicate near clip intersection issue

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* small tidy-up changes

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* updates to how we perform world to screen and screen to world calculations, added test coverage and some tidy-up

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* add some more tests for ViewportInteractionImpl

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* minor tweaks before PR feedback

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* fix typo in fix

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* fix for manipulator test framework tests

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* updates to RPI::View and RenderPipeline after review feedback from VickyAtAZ

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* add constexpr to ScreenPoint, ScreenVector and ScreenSize initializing constructors

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* add PrintTo functions for Screen* types

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* downgrade error to warning temporarily

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* check incoming view is null

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* remove pragma optimize off

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
4 years ago
Guthrie Adams c8be25a9ce Converted preview renderer to use AZ::Interface
Made some files private when exposing public interfaces
Updated a few comments

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams 76b4dafbb3 Everything compiling again after moving preview renderer to atom tools framework
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
nvsickle bcfe3d3878 Revert "Refresh rate driven rendering tick logic (#3375)"
This reverts commit db63dcbcd9.

Signed-off-by: nvsickle <nvsickle@amazon.com>
4 years ago
Nicholas Van Sickle db63dcbcd9
Refresh rate driven rendering tick logic (#3375)
* 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>
4 years ago
Guthrie Adams e3a7e7cd30 copied main window class from material editor
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams 30fee96c43 Moved material editor document system buses and system components to atom tools framework
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>
4 years ago
Guthrie Adams f1e8d37b86 holding pen for refactor
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Dayo Lawal 4eacd076da Fixing ME and ATWindowNotificationBus
Signed-off-by: Dayo Lawal <lawalfua@amazon.com>
4 years ago
Dayo Lawal 58ff2d8cab AtomToolsMainWindowRequestBus
Signed-off-by: Dayo Lawal <lawalfua@amazon.com>
4 years ago
Dayo Lawal 8eb9205711 AtomToolsMainWindow
Signed-off-by: Dayo Lawal <lawalfua@amazon.com>
4 years ago
Dayo Lawal 3cd40b151e Merge remote-tracking branch 'upstream/development' into atomToolsApplication 4 years ago
Dayo Lawal 002a4a4a21 AtomToolsApplication working with MatEditor
Signed-off-by: Dayo Lawal <lawalfua@amazon.com>
4 years ago
Steve Pham 38261d0800
Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
4 years ago
Steve Pham b4a2edec6a
Final update copyright headers to reference license files at the repo root (#1693)
* 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>
5 years ago
Steve Pham 70042fcdcd
O3DE Copyright Updates for Linux Foundation (#1504) 5 years ago
Tom Hulton-Harrop 50f5976e59
Rename and move ModernViewportCameraController (#866)
* rename ModernViewportCameraController to ModularViewportCameraController and move to AtomToolsFramework

* update names and includes after file moves
5 years ago
guthadam fae33e9235 ATOM-15439 Implement basic local socket and server for IPC in material editor and other tools
This replaces grid hub usage in the material editor. It allows material editor and other tools to intercommunicate on the local host.  This will allow enforcing that there is only one instance of the material editor running.  Opening a second instance will forward command line options to the first instance running a local server.

https://jira.agscollab.com/browse/ATOM-15439
https://jira.agscollab.com/browse/ATOM-13742
5 years ago
guthadam 0e6fea21fc ATOM-15221 Material Editor: Capturing trace warnings and errors to display in error message boxes
https://jira.agscollab.com/browse/ATOM-15221
5 years ago
alexpete a10351f38d Initial commit 5 years ago