Commit Graph

325 Commits (7f16cd1643a00f3a75f02538a10f74deabb0f4f3)

Author SHA1 Message Date
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 9e32c83d30
Merge pull request #7570 from aws-lumberyard-dev/Atom/guthadam/atom_tools_document_and_window_buses_support_multiple_instances
Atom Tools: updated document and windows systems and buses to support multiple instances
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
lumberyard-employee-dm d7ee248df5
Range adaptor support (#7388)
* 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>
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 4b91a86ace
Merge pull request #7276 from aws-lumberyard-dev/Atom/guthadam/atom_tools_move_document_boilerplate_to_base_class
Atom Tools: move boilerplate document management code to atom tools framework
4 years ago
Guthrie Adams 670d22cb5b Added notifications after re opening a document
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
AMZN-nggieber f5fcab75d6
Display Gem Icons in Gem Catalog (#7294)
Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com>

Co-authored-by: Alex Peterson <26804013+AMZN-alexpete@users.noreply.github.com>
4 years ago
Guthrie Adams 8617d34724 updated comment
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
Steve Pham 99764df120
Fix GCC Build Errors
- 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>
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 dd9c4e3f66
Merge pull request #7023 from aws-lumberyard-dev/Atom/guthadam/atom_tools_streamlining_me
Atom Tools: Removing unnecessary modules, components, and dead code from ME
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
AMZN-byrcolin 63d755b8f1
fix launcher not showing gems (#7015)
Signed-off-by: byrcolin <byrcolin@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
AMZN-byrcolin c778606c89
Templates restricted (#6498)
* 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>
4 years ago