-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow adjusting scan folder priority for project-relative Gems #14028
Merged
amzn-phist
merged 6 commits into
o3de:development
from
aws-lumberyard-dev:systems/amzn-phist/AssetScanFolders
Jan 20, 2023
Merged
Allow adjusting scan folder priority for project-relative Gems #14028
amzn-phist
merged 6 commits into
o3de:development
from
aws-lumberyard-dev:systems/amzn-phist/AssetScanFolders
Jan 20, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lemonade-dm
reviewed
Jan 12, 2023
Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.cpp
Outdated
Show resolved
Hide resolved
lemonade-dm
reviewed
Jan 12, 2023
Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.cpp
Outdated
Show resolved
Hide resolved
lemonade-dm
reviewed
Jan 12, 2023
Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.cpp
Outdated
Show resolved
Hide resolved
lemonade-dm
reviewed
Jan 12, 2023
Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.cpp
Outdated
Show resolved
Hide resolved
lemonade-dm
reviewed
Jan 12, 2023
lemonade-dm
reviewed
Jan 12, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, just a few suggestion to make this even more data driven and to simplify the detection a gem being underneath the project.
- For scan folders of Gems inside the project, this allows you more flexibility to configure the priorities of the scan folders, with respect to the main project scan folder. - "GemScanFolderPriorityStart": the starting value of all gems priority - "ProjectGemsRelativeScanFolderPriority": controls whether project-relative gems will be prioritized higher, lower, or "none" against the project scan folder. Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
- Also updated comments Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
- Fixes linux build because it's unused. Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
- Fix the FindScanFolder iterator & return. - Change an index-based find function to use FindScanFolder. - Add string constants. - Check for gem paths that are relative to the project path (simplify). Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
amzn-phist
force-pushed
the
systems/amzn-phist/AssetScanFolders
branch
from
January 13, 2023 18:36
eef72b0
to
82067c3
Compare
Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
lemonade-dm
approved these changes
Jan 14, 2023
byrcolin
approved these changes
Jan 20, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
It may be desirable to have the scan folders of any project-relative Gems (Gems that reside within the project folder) be prioritized before the main Project scan folder. By default, the project scan folder is priority 0, and all Gem scan folders start incrementing from starting value of 100, so Gem scan folders are always at a lower priority than the project.
This introduces two settings registry keys that can be used to tweak relative priorities:
"/Amazon/AssetProcessor/Settings/GemScanFolderStartingPriorityOrder": 100
This setting will define the starting priority order for all Gems. The first Gem scan folder will be assigned 101 and increase value from there.
"/Amazon/AssetProcessor/Settings/ProjectRelativeGemsScanFolderPriority": "none"
This setting determines how you want project-relative Gem scan folders to be prioritized against the main project scan folder.
"none"
(default): This means don't do anything special. All project-relative Gem scan folders will be assigned priority order using the 'running value' that starts at the value defined in the above setting."lower"
: All project-relative Gem scan folders will have a priority that is lower than the project. Users could configure the priority order of the project's main scan folder to be lower than all Gems, but having a setting of "lower" here would force project-relative Gem scan folders to be lower than the project."higher"
: All project-relative Gem scan folders will have a priority that is higher than the project. Again, by default Gems have lower priority than the project, but having a setting of "higher" here would force project-relative Gem scan folders to be higher than the project.fixes #8480
How was this PR tested?
Followed instructions from the GHI. Was able to tweak relative priorities and get the assets in project-relative Gems to scan and be picked up. More testing ongoing.