• 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>
- Fix gcc error caused by implicit conversion of Qt::ByteArray to const char*
- Fix Linker errors to QtTest in AtomToolsFramework.Tests and ScriptCanvasDeveloper.Editor
Signed-off-by: Steve Pham <82231385+spham-amzn@users.noreply.github.com>
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>
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>
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>
• 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>
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>
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>
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>
* Templates/Restricted upgrade/fixes:
Fixed template storage format: templates now only store true relative paths and no longer save "origin" paths and "optional" has been removed, it was never used.
Upgraded all templates to new standard
Template system now correctly handles child objects: Child objects no longer have to specify restricted they inherit from parent
Restricted now operates at the object level and makes no assumptions about parent
Restricted templates can now be combined and seperated on creation
ly_get_list_relative_filename has been deprecated for o3de_pal_dir
All Gems/Projects/Templates updated to use new code
Signed-off-by: byrcolin <byrcolin@amazon.com>
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>
* wip fixes for entity viewport icons displaying in the correct order and handling selection correctly
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add additional comment about z value
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* move manual sorting and some small tidy-up
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update comment
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* updates following initial round of PR feedback
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* additional changes to support tests for entity icon intersection
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add support to enable/disable icons separately from helpers
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* final tests added and small tidy-up to display EntityId correctly
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update some manipulator test framework calls after utility functions were moved
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* fix for implicit cast
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* move icon scale values to AZ_CVARS
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* fix failing tests caught in AR and update some naming conventions for tests
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update naming convention for members of ProjectedViewportRay
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update other references to ProjectedViewportRay
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update more references to ProjectedViewportRay change
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update menus for python tests
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* 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>
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>
* update modular viewport camera controller interface to make follow behaviors easier
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* updates following PR feedback
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* Add a way to set the render vsync from code
Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
* Update change with PR feedback. Missing whitespace plus a comment on why the assignment is outside the value changed check
Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
* update intersect behavior for positioning entities in the viewport and restore SurfaceManipulator
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* tests for surface manipulator from EditorTransformComponentSelection
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update comments in tests and remove #pragma optimize('', off)@
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add new file for FindClosestPickIntersection tests
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add remaining tests for surface manipulator and snap fixes
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* some small updates and polish before PR
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* small updates following PR feedback
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* rename QtEventToAzInputManager.h/cpp to QtEventToAzInputMapper.h/cpp to match type name
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update #includes to refer to QtEventToAzInputMapper.h
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update return type for viewport screen functions
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add tests for AZ::Matrix3x4::CreateFromMatrix4x4 and add TransformPoint to Matrix3x4
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update NDC -> Ndc
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* updates following review feedback
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* updates and improvements following PR feedback
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add forward declaration of Matrix3x4 type
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update where forward declarations are defined for Matrix3x4
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>