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>
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>
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>
* Updated the SFINAE checks in concepts.h and range.h
To use conjunction and disjunction for short-circuiting behavior.
Replaced AZStd::optional implementation with std::optional alias
Added range adaptor support and the following views: ref_view,
owning_view
Added bitwise or(|) overload for chaining range adaptor closures together
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding indirectly invocable concepts.
These concepts are used to determine whether a callable can be invoked
with a dereferenced iterator instance.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Add implementation of range relational function objects
Add implementation of range min max functions which uses the range
relation function objects(ranges::less, ranges::equal_to, etc...)
This is needed to implement ranges::zip_view
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding interface for zip_view which compiles successfully
The implementation for the zip view functions still need to be filled.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding function definitions for zip_view classes.
Adding empty header of subrange.h for the ranges::subrange class
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding additional view implementations.
The following range and view classes have been added: empty_view,
single_view and subrange.
Moved the AZ_NO_UNIQUE_ADDRESS macro to PlatformDef.h to allow other
code to specify the [[no_unique_address]] attribute.
Added additional test for view structures.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding missing includes for non-unity builds
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Workaround for NDK21 clang 9.0.9 compile issue.
The AZStd::ranges::zip_view::iterator::iter_swap friend function is in the
AZStd::ranges namespace, while the customization point object of
`AZStd::ranges::customization_point_object::iter_swap` is in the regular
namespace of `AZStd::ranges` and the inline namespace of
`customization_point`.
This issue is fixed in NDK23, but as Jenkins uses NDK21 at the time, the
entire zip_view implementation has moved to inline namespace of
`zip_view_internal`
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Added iterator algorithm requiremetn concepts
Fixed the ambiguity in the ranges::iter_swap exchange overload to
exclude itself as a candidate if the iterator reference types are
swappable with each other.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding type alias for borrowed_subrange_t
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed convertible to ref_view check in the ranges::all
customization_point
Updated SFINAE detection of whether AZStd::to_address is invocable
Moved the
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed private variable access in ranges::subrange get specialization.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Removing ranges::view constraint from the ranges::views::single
customization_point.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding C++23 range overload for string_view.
It is detailed in the [C++draft strings](https://eel.is/c++draft/strings#lib:basic_string_view,constructor____) section
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding implementations of ranges, find, search, mismatch and equal
functions.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding implementation of ranges split_view along with test.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding const overloads to SceneAPI ProxyPointer container
The Proxy Pointer class operator* and operator-> was unable to be
invoked with a const instance before. Now it returns a const view of the
pointer it contains.
This allows it to be invoked in `AZStd::to_address` as part of an SINAE
context for the contiguous_iterator concept
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Refactored the to_address implementation to better work with SFINAE.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding general non-unity build fixes
This is unrelated to the RangeAdaptor changes.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Allow range algorithms to be used with rvalue ranges
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Workaround MSVC Internal Compiler erroy by removing enable_if
condition in the operator bool of the view_interface class.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Corrected the non_propagating_cache helper class to have public
functions
Fixed the order of creating the perfect forwarding call wrapper for an
outer closure around another closure.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Specialized the borrowed_range and view concepts
For the AZ PathView class, since it is a immutable view around a path.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Removed inline namespace around the zip_view class.
It was needed to workaround a clang 10 or below issue where a friend
function in a namespace and a variable within underneath an inline
namespace within the function namespace would cause an improper symbol
redefinition.
The workaround is to create a placeholder namespace containing the
inline namespace and then bring that placeholder namespace into the
parent scope.
https://bugs.llvm.org/show_bug.cgi?id=37556
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding implementation of the elemetns_view and join_view classes
It is up to date with the standard as of the current draft:
https://eel.is/c++draft/ranges.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Separated definitions of concepts out of concepts.h
This allows the ranges::iter_swap and ranges::swap customization point to be moved
outside of the concepts folder and into the ranges folder.
The concepts.h header previously had to define those objects to avoid
circular dependencies.
Added the work around for ranges::iter_swap and ranges::iter_move
customization_point causing an improper symbol redefinition in clang 10
or below: https://bugs.llvm.org/show_bug.cgi?id=37556
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Alias more std:: names into the AZStd namespace.
Removed our custom implementation of toaddress.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding more range view test.
The join_view and elements_view classes now have UnitTest.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding deduction guides for AZStd associative containers
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Moved zip_view::sentinel iterator accessor function to zip_view.inl
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed variable shadowing issues with clang 12+
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
• 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>
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>
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>
• 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>
• 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>