Skip to content
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

Add the concept of global settings to the SdfAssetBuilder #457

Conversation

mbalfour-amzn
Copy link
Contributor

This PR changes the SdfAssetBuilder to read in global builder settings from a setreg file to apply as the defaults when building all assets. Changes to the settings in the setreg file will cause all affected assets to rebuild the next time the AP is run. Currently, the only global setting that exists is "UseArticulations", but other settings can be added easily.

The mechanism used for rebuilding the assets is the builder "fingerprint". Any time the fingerprint changes, the builder will rebuild all of its assets. The global settings are read in from the setreg file and then serialized back out into a JSON string that is used as the fingerprint. Changes to the settings changes the fingerprint string, which triggers the rebuild.

This PR also has a separate change to the ROS2 Gem to enable .dae and .obj files in the Scene Builder by default. These are common file types for robotics, so we want the scene builder to attempt to convert them. Note that enabling them also requires a change to the AssetProcessor settings to list the .assetinfo files for those new types - that setting is used to ensure that the asset reprocesses whenever its .assetinfo file changes.

Changing the setting will cause all affected assets to reprocess.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
@mbalfour-amzn mbalfour-amzn requested review from a team as code owners August 10, 2023 14:15
mbalfour-amzn and others added 5 commits August 10, 2023 13:47
Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
Make LoadSettings take in a settings registry.
Move the AP settings into the scene setreg file for better settings locality.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
mbalfour-amzn and others added 2 commits August 10, 2023 14:55
Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
@mbalfour-amzn mbalfour-amzn merged commit 461add9 into o3de:development Aug 11, 2023
2 checks passed
@mbalfour-amzn mbalfour-amzn deleted the mbalfour/asset_builder_global_settings branch August 11, 2023 17:43
arturkamieniecki pushed a commit to RobotecAI/o3de-extras that referenced this pull request Aug 18, 2023
* Add global settings for "UseArticulations".
Changing the setting will cause all affected assets to reprocess.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Enable support for dae and obj files when the ROS2 Gem is enabled.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Update Gems/ROS2/Code/Source/SdfAssetBuilder/SdfAssetBuilderSettings.cpp

Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Update Gems/ROS2/Code/Source/SdfAssetBuilder/SdfAssetBuilderSettings.h

Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Update Gems/ROS2/Registry/sceneassetimporter.setreg

Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Update Gems/ROS2/Code/Source/SdfAssetBuilder/SdfAssetBuilderSettings.cpp

Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* PR feedback.
Make LoadSettings take in a settings registry.
Move the AP settings into the scene setreg file for better settings locality.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Update Gems/ROS2/Code/Source/SdfAssetBuilder/SdfAssetBuilderSettings.h

Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* PR feedback - make global settings registry the default.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

---------

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants