Commit Graph

3147 Commits

Author SHA1 Message Date
Nicholas Van Sickle f3af362ede Merge pull request #4838 from aws-lumberyard-dev/LYN-7562
Make safe asset folder comparison for prefab creation to be case insensitive
2021-10-21 14:37:53 -07:00
Danilo Aimini 52112be1ac LYN-7448 + LYN-7542 + LYN-7543 | Focus Mode - UX Improvements (#4837)
* Introduce Outliner button to simplify Prefab editing

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Fix Focus Mode and disabled entities colors

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Fix - propagate the event if the OnOutlinerItemClick function returns false.
This does not change current behavior but makes more sense in the context of future handlers.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Adjust disabled colors to match UX recommendations.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Display the edit button even if the prefab is disabled. Remove prefabWip check (it will be removed for focus mode by the time this goes in). Default to disabled capsule color for borders to save on checks.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Disable edit button on disabled prefabs as it caused conflicts in nested prefabs. May explore that possibility later.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Change disabled text color to be darker, as asked by UX.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
2021-10-21 13:43:21 -07:00
Steve Pham 244878483a Update open file limit on linux for applications (#4878)
* Programmatically update the ulimit for open files if the current limit is not enough

Signed-off-by: Steve Pham <spham@amazon.com>
2021-10-21 12:40:10 -07:00
chiyenteng 7316802941 Add Detach and Duplicate Prefab basic workflow auto test (#4506)
- Add a new automated test PrefabBasicWorkflow_CreateReparentAndDetachPrefab for verifying prefab detachment basic workflow.
- Add a new automated test PrefabBasicWorkflow_CreateAndDuplicatePrefab for verifying prefab detachment basic workflow.
- Fix a bug related to sets of entity ids in Reparent helper function .
2021-10-21 12:08:00 -07:00
srikappa-amzn 33490ed6df Avoided a string copy by using path view
Signed-off-by: srikappa-amzn <srikappa@amazon.com>
2021-10-21 11:42:41 -07:00
Chris Galvan 546102077f Merge pull request #4875 from aws-lumberyard-dev/cgalvan/RemoveLegacyColorGradient
Removed legacy ColorGradientCtrl
2021-10-21 13:14:01 -05:00
SJ c871224dae Support for importing Json files (#4609)
* Initial support for importing Json files within other Json files

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Add some test cases for testing/iterating on the Json import work. Fix MacOS AzTestRunner module loading bug.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* The import resolver can take the allocator as a parameter to Load/StoreImports() instead of storing a copy.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Fix assert

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Some rework of the JsonImport feature. Base test cases pass. More complex test cases need to be added.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* 1. Add test case for testing nested imports.
2. Initialize rapidjson value to fix assert.
3. Fix bug found in merge patch creation.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* 1. Update the Resolver class member functions to return proper result codes.
2. Add the wrapper functions for resolving/restoring imports to the JsonSerialization class.
3. Add new test case.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Add test cases for import + patches. Fix bug found when patching import. Rename test cases.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* 1. Add ApplyPatch() function to BaseJsonImporter.
2. Move patch logic out of ResolveImport() and into ApplyPatch()
3. Get rid of the custom RestoreImport implementation in the tests since it was the same as the base version.
4. Add test case for patching nested imports.
5. Update merge patch outcome reporting logic to work for nested object patches.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* 1. Add a CreatePatch() function to BaseJsonImporter to match the ApplyPatch() function.
2. Reorganize some responsibilities between RestoreImports(), RestoreImport() and CreatePatch() to make ResolveImports() and RestoreImports() more symmetrical.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Combine result code in code path where we add empty object to path

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Add test case for inserting a new import into an existing object.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Use == instead of Compare() for comparing file paths.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Address some PR feedback.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Address additional PR feedback

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Add missing includes to fix non-unity build

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Fix build error. Address additional feedback.

Signed-off-by: amzn-sj <srikkant@amazon.com>
2021-10-21 09:13:43 -07:00
srikappa-amzn 4ed73a0b91 Use case insensitive folder path comparison for creating slices
Signed-off-by: srikappa-amzn <srikappa@amazon.com>
2021-10-21 09:11:11 -07:00
Chris Burel ab86c9961e [Linux] Fix deadlock when running LaunchProcess() from a thread (#4833)
`LaunchProcess()` on Linux works by calling `fork` then `execvpe`. `fork`
is used to copy a running process, generating a new child process. The new
child starts running from the location where the parent was running, from
whatever thread from the parent called `fork`. The child process only gets
one thread, however. If a different thread in the parent process had locked
a mutex, that mutex is also locked in the child process. Since that
separate thread is not present in the child, the mutex remains locked in
the child, with no way to unlock it. So it is important that as little work
as possible happens between the call to `fork` and to `execvpe`.

Previously, this code was trying to report an error that may have occurred
from calling `execvpe`. It was doing that by calling `AZ_TracePrintf`. That
function does lots of things, including trying to make an EBus call, which
looks up a variable in the `AZ::Environment` instance, which has a global
mutex. If there was some other thread that had that mutex locked when the
`fork` call was made, the subprocess would deadlock, and the parent process
would also deadlock waiting for the child to finish.

This solves that issue by removing the call to `AZ_TracePrintf` from the
subprocess code path. Instead, the parent process sets up a pipe for the
child process to write to in case the call to `execvpe` fails (the
self-pipe trick). The parent then reads from that pipe. If it reads no
data, `execvpe` worked and there's no error. If it does read data, the data
to be read is the errno from the failed `execvpe` call made by the child.
The parent can then use `strerror()` to report the error.

Fixes #4702.

Signed-off-by: Chris Burel <burelc@amazon.com>
2021-10-21 09:09:56 -07:00
Michael Pollind a33ab67125 bugfix: handle moving files for inode-watch for AssetProcessor (#4656) (#4809)
Signed-off-by: Michael Pollind <mpollind@gmail.com>
2021-10-21 10:58:14 -05:00
Chris Galvan d78aa5bf90 Removed legacy ColorGradientCtrl.
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2021-10-21 10:55:32 -05:00
Steve Pham 74d74050f2 Fix unused variable error in release linux builds (#4846)
Signed-off-by: Steve Pham <spham@amazon.com>
2021-10-20 18:54:27 -07:00
Danilo Aimini c2ec18dc0e Remove prefab WIP checks to make focus mode the default (and only) prefab editing workflow in the editor. (#4840)
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
2021-10-20 14:41:35 -07:00
Steve Pham 27a535eaf4 Linux Fixes for Launching the Material Editor (#4808)
- Prevent P4 thread to run if we cannot detect the P4 command to begin with
- Add a trait to disable calling the parent ComponentApplication::Destroy(), instead calling _exit() to skip the module unloading on exit

Signed-off-by: Steve Pham <spham@amazon.com>
2021-10-20 14:34:30 -07:00
Chris Galvan ae4755bbc3 Merge pull request #4839 from aws-lumberyard-dev/cgalvan/FixSceneSettingsStallWithInvalidP4
Treat invalid p4 configuration as a warning for the scene settings save action so the processing popup will get the job results.
2021-10-20 16:30:42 -05:00
Vincent Liu 8e797982a5 [LYN-7530] Fix matchmaking request type typo and add more matchmaking notifications (#4774)
* [LYN-7530] Fix matchmaking request type typo and add more matchmaking notifications

Signed-off-by: onecent1101 <liug@amazon.com>
2021-10-20 13:11:12 -07:00
Chris Galvan c1948bf94e Treat invalid p4 configuration as a warning for the scene settings save action so the processing popup will get the job results.
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2021-10-20 15:04:21 -05:00
Danilo Aimini 60c286dafa LYN-7483 + LYN-7052 | Correctly initialize and refresh Prefab Focus Mode handler. (#4718)
* Initialize the PrefabFocusHandler on context reset, to also cover the case of a new level being created on the welcome screen.
Relax checks/restrictions on refreshes to cover cases where an instance is reused by the Prefab EOS.
Refresh the breadcrumbs when a container is renamed and when a change is propagated to the instances to ensure the correct names are displayed.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Rename m_isInitialized to m_initialized in PrefabFocusHandler

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Use find_if to detect when a container entity in the focus path has been renamed.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Renaming and commenting variables in PrefabFocusHandler.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Undo minor naming change

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Replace lazy initialization and have the UI side initialize the Editor calls in PrefabFocusHandler.
This should prevent issues with focus mode trying to access these interfaces in non-editor applications.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
2021-10-20 12:56:30 -07:00
amzn-phist 714f5357b2 Add an error message to AP when the project path is invalid (#4801)
* Add an error message to AP when bad project path

Produce a log error or a dialog box error when the project path for AP
does not have a project.json and is invalid.

Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>

* Fix a failing unit test - AssetProcessorMessages

Adding a check for 'project.json' caused BeforeRun() in a test fixture
to fail.  Teardown of the fixture was also broken if the test failed to
fully startup the application manager, so added null checks there.

Added an assert to the fixture's Setup to check the status of BeforeRun().
Added additional settings registry setup to the fixture to make sure the
project path and branch token are configured before BeforeRun() is
called.

Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
2021-10-20 14:45:32 -05:00
srikappa-amzn 24b0dab30e Make safe asset folder comparison for prefab creation to be case insensitive
Signed-off-by: srikappa-amzn <srikappa@amazon.com>
2021-10-20 12:02:46 -07:00
Alex Peterson 7ddcdffed7 Move Qt Toast Notifications from GraphCanvas into Framework
Move the existing Qt Toast Notification QWidgets, EBuses and logic from the GraphCanvas gem into AzQtComponents and AzToolsFramework so they can be re-used.

Signed-off-by: AMZN-alexpete <26804013+AMZN-alexpete@users.noreply.github.com>
2021-10-20 11:15:24 -07:00
Allen Jackson 900aa4e5bc {lyn7065} adding ProcPrefab Prefab::Tempate flag method (#4765)
* {lyn7065} adding ProcPrefab Prefab::Tempate flag method

Signed-off-by: jackalbe <23512001+jackalbe@users.noreply.github.com>

* updated based on comments

Signed-off-by: jackalbe <23512001+jackalbe@users.noreply.github.com>

* moved validation logic to IsValid()

Signed-off-by: jackalbe <23512001+jackalbe@users.noreply.github.com>

* added more guards around the source string


Signed-off-by: jackalbe <23512001+jackalbe@users.noreply.github.com>
2021-10-20 12:22:11 -05:00
rgba16f [Amazon] c6afb1f0a3 Update all the hardcoded filenames inside the level.pak file to be lowercase now the editor no longer forces them to be lower case. (#4802)
Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
2021-10-20 10:35:31 -05:00
AMZN-AlexOteiza 181d12625f Reorganized Prefab tests and standarization (#4786)
* Reorganized Prefab tests and standarization

* Restore changed file by accident
2021-10-20 16:16:04 +01:00
AMZN-AlexOteiza 38f9dcb8ca Added option to reopen if the current level is the same. This contributes to stability for batched tests (#4043)
* Added option to reopen if the current level is the same. This contributes to stability for batched tests

Signed-off-by: AMZN-AlexOteiza <aljanru@amazon.co.uk>

* Addressed PR comments

* Addressed PR and cleaned Base level that had an entity by accident

Signed-off-by: AMZN-AlexOteiza <aljanru@amazon.co.uk>

* Cleaned up params

Signed-off-by: AMZN-AlexOteiza <aljanru@amazon.co.uk>

* Addressed PR comments
2021-10-20 14:55:20 +01:00
jonawals a1ee7b5a31 Merge pull request #4725 from aws-lumberyard-dev/hultonha_LYN-7394_focus_cursor
Updates to support 'lock'/'forbidden' cursor when in Focus Mode
2021-10-20 14:55:01 +01:00
amzn-mike f31b47f775 Switch stacktrace output to use Output function instead of AZ_Printf to avoid it being suppressed accidentally (#4805)
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
2021-10-19 16:51:34 -07:00
puvvadar 66c4950de0 Merge pull request #4529 from aws-lumberyard-dev/mp_deltaserializer_perf
Reworking DeltaSerializer to no longer require string based hashes
2021-10-19 10:22:37 -07:00
amzn-mike c1335f69c6 Convert resolved wildcard paths to relative path before saving in database (#4574)
* Convert resolved wildcard paths to relative path before saving in database.

Warn if file could not be converted to a relative path.
Fix FindWildcardMatches path handling that could result in pathMatch missing the first character

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Handle abs path wildcard dependencies

Remove dependencies outside of scan folder

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Switch to AZ::IO::PathView for abs path check

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Made code a little more clear

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
2021-10-19 08:42:18 -07:00
jonawals 0031016548 Merge pull request #4785 from aws-lumberyard-dev/pytest_editor_testcase_name_fix
Fix for PyTest editor test case names.
2021-10-19 16:13:56 +01:00
jonawals befb97a80e Merge pull request #4627 from aws-lumberyard-dev/igarri/Fix-Viewport-camera-locations
Make Go To Location affect the Default Viewport Camera
2021-10-19 14:45:13 +01:00
John ae6005545e Fix for PyTest editor test case names.
Signed-off-by: John <jonawals@amazon.com>
2021-10-19 13:23:23 +01:00
Nicholas Van Sickle 3485bc08b1 Fix EntityOutlinerTest (#4771)
The test was relying on immediate updates from the prefab system which are now scheduled for a later tick - this reworks the tests to wait for deferred updates before validating state

Signed-off-by: nvsickle <nvsickle@amazon.com>
2021-10-18 17:14:19 -07:00
puvvadar 87b5ac4236 Remove extra new lines
Signed-off-by: puvvadar <puvvadar@amazon.com>
2021-10-18 17:04:56 -07:00
puvvadar 0c141ac210 Const some unit test values
Signed-off-by: puvvadar <puvvadar@amazon.com>
2021-10-18 16:20:13 -07:00
Nicholas Van Sickle 434641382b Merge pull request #4749 from aws-lumberyard-dev/nvsickle/OutlinerDuplicateEntryFixes
Fix issues with invalid Outliner entries
2021-10-18 14:01:31 -07:00
Vincent Liu a534fccc9b Expose matchmaking event polling APIs and add required session notifications (#4636)
* Expose matchmaking event polling APIs and add required session notifications

Signed-off-by: onecent1101 <liug@amazon.com>
2021-10-18 12:47:55 -07:00
lumberyard-employee-dm 357df2bb4b Added anchor key parameter to the SettingsRegistry MergeSettings (#4650)
* Added anchor key parameter to the SettingsRegistry MergeSettings

This allows the MergeSettings function to write JSON data anchored
underneath the supplied anchor path.

Upgraded the SignalNotifiers calls in SetObject, MergeSettings and
MergeSettingsFileInternal to query the type of the merge value at the anchor path
and supply that as the type to the notification event.

Also the the above functions now supply the anchor key root as the
path that was modified instead of assuming root ""

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Fixed whitespace inconsistencies in SettingsRegistryImpl

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Added a queue for storing SignalNotifier calls when a thread is
currently signaling.

The queued calls are invoked by that thread after it has signaled it's
current queue of events

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
2021-10-18 12:58:49 -05:00
Allen Jackson fbedd8126d {lyn7251} Add material component example in Python (#4724)
* {lyn7251} Add material component example in Python

adds a AZ::Render::EditorMaterialComponent as an example of how to
override the default material from the scene building pipeline

Signed-off-by: jackalbe <23512001+jackalbe@users.noreply.github.com>

* Only set the cube to a gray material
Skip loading the asset, instead just set the outPrefabAssetPath for the Prefab system to load

Signed-off-by: jackalbe <23512001+jackalbe@users.noreply.github.com>

* stablizing the sub-id of procedural prefab groups

Signed-off-by: jackalbe <23512001+jackalbe@users.noreply.github.com>
2021-10-18 12:48:38 -05:00
lumberyard-employee-dm 643c5c2f82 Removed AZ_ENABLE_TRACING from Archive::GetPakPriority (#4741)
The AZ_ENABLE_TRACING check was preventing the Archive System from using the sys_PakPriority value set from the CVar system

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
2021-10-18 12:42:20 -05:00
AMZN-nggieber 4899309b6a Connect Adding and Removal of Gem Repo UI to CLI (#4729)
* Connect Adding and Removal of Gem Repo UI to CLI

Signed-off-by: nggieber <nggieber@amazon.com>

* Addressed PR feedback

Signed-off-by: nggieber <nggieber@amazon.com>
2021-10-18 09:40:34 -07:00
igarri d8b47a1448 More fixes
Signed-off-by: igarri <igarri@amazon.com>
2021-10-18 16:45:26 +01:00
igarri a3c3de4a76 AR fixes
Signed-off-by: igarri <igarri@amazon.com>
2021-10-18 16:33:47 +01:00
igarri f6945f1334 Fixed Viewport Interaction
Signed-off-by: igarri <igarri@amazon.com>
2021-10-18 16:25:25 +01:00
igarri 6050d2e16e merge develop
Signed-off-by: igarri <igarri@amazon.com>
2021-10-18 12:42:00 +01:00
igarri d8a453f826 changed names
Signed-off-by: igarri <igarri@amazon.com>
2021-10-18 12:20:04 +01:00
igarri c93bd87127 Added default camera position to viewport settings
Signed-off-by: igarri <igarri@amazon.com>
2021-10-18 12:16:54 +01:00
igarri 026919c11b Set View in viewport fixed
Signed-off-by: igarri <igarri@amazon.com>
2021-10-18 11:49:05 +01:00
John 363bc33fed Fix broken function name.
Signed-off-by: John <jonawals@amazon.com>
2021-10-18 09:25:33 +01:00
John cf41ff020a Fix merge conflicts.
Signed-off-by: John <jonawals@amazon.com>
2021-10-18 09:24:09 +01:00