Commit Graph

277 Commits (01786b29664b623b0bd8a9c23ed96010f035d3d6)

Author SHA1 Message Date
Guthrie Adams 01786b2966 Atom Tools: Saving tool settings, made inspector configurable, moved to ATF
Changed material editor inspector into generic, configurable, document inspector and moved to atom tools framework
Renamed atom tools framework settings registry utility functions
Added more settings registry utility functions to get, set, and save values and objects
Added saving tool settings to atom tools application

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams ce754d31e5 Atom Tools: Moving behavior context reflection into respective classes
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams 3bdb0f5d9b Atom Tools: Restoring idle behavior for viewport input behavior controller
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams ba43efd3d2
Merge pull request #7613 from aws-lumberyard-dev/Atom/guthadam/centralize_shader_management_console_operations_in_document_class
Atom Tools: Moving shader management console file operations into document class
4 years ago
Guthrie Adams ceb61d143c
Merge pull request #7618 from aws-lumberyard-dev/Atom/guthadam/move_viewport_input_controller_from_material_editor_to_atf
Atom Tools: Extracted the viewport input controller from ME to ATF
4 years ago
Guthrie Adams 1b366fbad8
Merge pull request #7612 from aws-lumberyard-dev/Atom/guthadam/removing_thumbnail_context_from_thumbnail_system
Removing thumbnail context from thumbnail system
4 years ago
Guthrie Adams 8b54e02041 updating after PR feedback to use existing minimum element vector function
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams b0fd3d22f1 resolving merge issues
fixing crash on startup because allocator was not available when string was allocated

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
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 7996591182 Removing thumbnail context from thumbnail system
This work has been on hold for a while. Revisiting removal of thumbnail contexts now while debugging related lockups exiting tools from script. Thumbnail contexts are an unused layer of indirection that makes debugging the system more difficult. All systems were only referencing the default context.

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams 600ad3fd04 Fixing compiler errors requiring numeric cast
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
dmcdiarmid-ly 9d6062d96f Added an RPISystemInterface method to set the application-wide MSAA state
The Editor will now properly apply the MSAA state from MainRenderPipeline.azasset
Corrected a race condition with the cubemap baking pipeline

Signed-off-by: dmcdiarmid-ly <63674186+dmcdiarmid-ly@users.noreply.github.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 c9c172794e Atom Tools: Document system exposes reflected object data
• This removes a direct dependency on dynamic property groups and data from the document system.
• Added support for names, descriptions, and nesting to dynamic property groups.
• Moved property related functions from base document classes into material editor document classes because dynamic property groups are an implementation detail of the material editor document to support material type flexible data format.
• Change material document to use a table of dynamic property groups instead of a map of properties.
• Added functions to traverse groups and properties.
• This keeps groups and properties organized consistently with the material type file as well as what’s expected in the UI.
• Document data can now be maps directly to the inspector reflective property editors instead of copying one property at a time out of the document and keeping those synchronized.

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams 670d22cb5b Added notifications after re opening a document
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams e273f3ef6a Updating comments
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams dc598a8b3c Atom Tools: move boilerplate document management code to atom tools framework
• Moved all of the common save and load code to the document base class
• Moved undo and redo support to document base class but will probably extract to its own class or replace with one from AzTF
• Streamlined material editor, shader management console, and other tools with updated document code
• Cleaned up some of shader management console loading code, added support for saving, as well as getting and setting the shader variant list source data structure

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
santorac 906db920d0 Merge remote-tracking branch 'upstream/development' into Atom/santorac/RemixableMaterialTypes3
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
santorac a4346de658 Code cleanup. New comments. Added some non-const find functions to MaterialTypeSourceData. Fixed places where I forgot to change m_name to GetName().
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
Guthrie Adams 413ce5a6ab Atom Tools: move performance metrics status bar widgets to base window
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams 8bdb51e63a
Merge pull request #7135 from aws-lumberyard-dev/Atom/guthadam/atom_tools_move_me_performance_monitor_to_atf
Atom Tools: Moved performance monitor system component from ME to ATF
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
Chris Galvan 049b33d2df Merging stabilization/2111RTE -> development, resolved conflicts
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
4 years ago
Guthrie Adams 160508d2d6
Merge pull request #7104 from aws-lumberyard-dev/Atom/guthadam/atom_tools_change_preset_browser_to_generic_asset_grid_dialog
Atom Tools: Changed ME preset browser dialog into generic asset grid dialog in ATF
4 years ago
Chris Galvan 3fd7e79891
Merge pull request #5155 from pollend/feat/add-cursor-wrap-mode-viewport
feat: add cursor wrapped mode
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
Michael Pollind ed5354fcae Merge branch 'development' of https://github.com/o3de/o3de into feat/add-cursor-wrap-mode-viewport 4 years ago
Guthrie Adams 3977edb21e Atom Tools: Removing unnecessary modules, components, and dead code from SMC
Looking toward creating a bare bones template for a standalone application, simplifying and removing any boilerplate wherever possible. SMC followed patterns established by material editor, subdividing everything into multiple modules, which required manually adding static modules, implementing system components with little to no functionality, and a bunch of unnecessary files for such a simple application. This change deletes unnecessary boilerplate code, moving everything into a single module, making the application class responsible for reflecting classes and buses.

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams c98d14ad92 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>
4 years ago
Guthrie Adams 88d3bf5b4a
Merge pull request #6988 from aws-lumberyard-dev/Atom/guthadam/atom_tools_startup_disabling_unused_gems
Atom Tools: disabling auto load of unused gems in some atom tools
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 c0cbc41ba6
Merge pull request #6917 from aws-lumberyard-dev/Atom/guthadam/atom_tools_document_application_added
Atom Tools: Created base class for document-based applications
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 b09caa5e75 Atom Tools: disabling auto load of unused gems in some atom tools
Atom tools are set up to inherit and automatically load all of the gems used by the game project. This is a great simplification that saves us from having to manually update cmake settings for every game project to push dependencies to every tool. The tradeoff is that some dependencies will be added to certain tools that have no relevance whatsoever, potentially wasting initialization time, memory utilization, and some processing. This change follows an existing example to update a couple of tools to forego initializing unused gems. They can easily be reenabled as needed.

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams c16cc96eba
Merge pull request #6980 from aws-lumberyard-dev/Atom/guthadam/atom_tools_fix_ap_connection_and_thumbnails
Atom Tools: move asset processor connection to fix thumbnails
4 years ago
Guthrie Adams eea9532c4b
Merge pull request #6942 from aws-lumberyard-dev/Atom/guthadam/atom_tools_application_pyexit
Atom Tools: Bind exit function for python tests
4 years ago
Guthrie Adams 5c2e69d6d0 Atom Tools: move asset processor connection to fix thumbnails
Thumbnails for the AtomLyIntegration common feature gem were no longer being rendered. The setup code was modified to initialize the thumbnail system after receiving a new event that critical assets finished compiling. This event was being sent and handled correctly in the main editor. This process was failing in other tools because the event was sent before systems were registered to listen for it.

To resolve the problem, atom tools application now explicitly connects to the asset processor and processes critical assets after the base application StartCommon function is called. This ensures that the connection is established and the event gets sent after all of the system components have been activated.

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams ced7d1ef54 Atom Tools: Bind exit function for python tests
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams 75a582972c Atom Tools: added function to get the number of active documents
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
Roman e224fc2ee5
Bugfix - ViewportInteractionImp connected to the wrong id in RenderViewportWidget (#6867)
Signed-off-by: rhhong <rhhong@amazon.com>
4 years ago
sphrose 0e0ca7585c change default input color space to SRGB
Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com>
4 years ago
lumberyard-employee-dm 18ea4ba6a8
Added a CriticalAssetsCompiled Lifecycle event (#6469)
The CriticalAssetsCompiled event can be handled to detect when the
AssetProcessor has finished processing Critical Assets

Also with the new event, an audit has been performed over all the
locations where the AssetCatalogEventBus OnCatalogLoaded event was being
handle to make sure it was the proper event to use.
If the handler was actually examing the enumerating over the full
catalog or querying all assets within the catalog, then it was a proper
use.
For handlers that were interested in a particular asset it was not

Moreover added implementations of `OnCatalogAssetChanged` and
`OnCatalogAssetAdded` to the FileTagComponent and the MaterialViewportComponent.

Any applications which uses the AtomToolsApplication
class(MaterialEditor, AtomSampleViewerStandalone,
ShaderMangementConsole) now signals a "CriticalAssetsCompiled" lifecycle
event as well as loads the "assetcatalog.xml" if it exists.

The Launcher application signals the "CrticalAssetsCompiled" event and
reloads the "assetcatalog.xml" for the ${project}.GameLauncher and
${project}.ServerLauncher in Launcher.cpp

Finally the Editor signals the "CriticalAssetsCompiled" and reloads the
"assetcatalog.xml" in CryEdit.cpp

resolves #6093

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
Michael Pollind 95c0c83642 chore: remove unused setting and fixed compiling errors
Signed-off-by: Michael Pollind <mpollind@gmail.com>
4 years ago
Michael Pollind fa809a76ca chore: address changes
- updated checkstyle
- update enum CursorInputMode
- minor refeactor to QtEventToAzInputMapper

Signed-off-by: Michael Pollind <mpollind@gmail.com>
4 years ago
Michael Pollind 90f710b8c2 feat: add cursor wrapped mode
Signed-off-by: Michael Pollind <mpollind@gmail.com>
4 years ago
Guthrie Adams f8ca427954
Fixed several material editor bugs related to file paths and hot reload prompts (#6374)
* draft

Signed-off-by: Guthrie Adams <guthadam@amazon.com>

* Removes automatic generation of relative paths for external references for materials
Updated material editor functions for creating new materials, creating or saving model or lighting presets, to save to the project asset folder instead of the material folder which is not included in the new templates
Changed function for getting saved file names to handle case where Qt save file dialog adds double extensions if the extension contains a dot

Signed-off-by: Guthrie Adams <guthadam@amazon.com>

* Fixed problems with material editor hot reloading after documents or dependencies changed.
Triggering message boxes within the tick function, which is executed from the main application timer, caused the tick function to be called a second time recursively.
Switched from using the tick bus to a timer so that the documents re opening and dialogs are triggered outside of the main tick.

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams 3bca63bb71 Temporary fix for material component losing image overrides with prefabs
The bug reported that overridden texture properties would be lost whenever an entity was created, destroyed, or a prefab was created. Initially, it seemed like there was a problem with the custom JSON serializer for material properties. Debugging proved this to be incorrect because all of the data was converted to JSON values in the serializer on multiple passes. At some point during prefab patching, the data for the asset properties is lost while other values like colors and floats serialize correctly. Converting the asset data values into asset IDs resolves the immediate problem for the material component but the underlying issue is still under investigation by the prefab team. This change is being posted for review in case the underlying issue cannot be resolved in time for the next release.

Signed-off-by: Guthrie Adams <guthadam@amazon.com>

Fixing unittests and moving texture conversion into material component controller

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago