This pull request adds a 'root_prim_path' USD export string parameter. If this option is set to a well-formed prim path (e.g., '/World'), a transform primitive with the given path will be added to the stage as the parent of all exported primitives. This will allow transforming the scene by this root node in other applications and is also required for loading the exported scene as a reference in other USDs.
As part of this change, the '_materials' node, which contains all exported materials, is also created under the root prim. This is required so that materials are imported correctly when the USD is referenced in another stage.
Finally, added an export_params_valid() function to verify that the 'root_prim_path' is valid before starting the export job. This function can be extended in the future to perform additional validation of other export parameters.
This update combines work in pull request
https://projects.blender.org/blender/blender/pulls/104506
and an implementation in the 'universal-scene-description' branch.
Co-authored-by: Ashley Ruglys <ashley.ruglys@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/107855