-
Notifications
You must be signed in to change notification settings - Fork 202
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
MAYA-115170 fix export when exportRoots and stripNamespaces are combined #2590
MAYA-115170 fix export when exportRoots and stripNamespaces are combined #2590
Conversation
pierrebai-adsk
commented
Sep 9, 2022
- Move the dictionary-value extractor functions from jobArgs.cpp to a utility namespace.
- Fix the problem of export roots and strip namespace by using the list of roots to limit whih objects are processed.
- This is done by using the roots as the list of objects to export.
- Add unit test based on problem report.
- Move the dictionary-value extractor functions from jobArgs.cpp to a utility namespace. - Fix the problem of export roots and strip namespace by using the list of roots to limit whih objects are processed. - This is done by using the roots as the list of objects to export. - Add unit test based on problem report.
using namespace PXR_NS; | ||
|
||
/// Extracts a bool at \p key from \p userArgs, or false if it can't extract. | ||
bool extractBoolean(const VtDictionary& userArgs, const TfToken& key) |
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.
All this code was moved as-is from jobArgs.cpp, except from renaming them with a extract prefix instead of an underscore and putting them in a namespace.
|
||
filePath = os.path.join(inputPath, "UsdExportRootsTest", "UsdExportRootsTest.ma") | ||
cmds.file(filePath, force=True, open=True) | ||
cls.filePath = os.path.join(inputPath, "UsdExportRootsTest", "UsdExportRootsTest.ma") | ||
|
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.
Now that there is a test not using this file, the scene needs to be open by each test. Probably makes the tests more independent and avoid accidental interactions.
@@ -75,159 +76,8 @@ TF_DEFINE_PRIVATE_TOKENS( | |||
// clang-format on | |||
|
|||
namespace { | |||
/// Extracts a bool at \p key from \p userArgs, or false if it can't extract. |
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.
All changes are merely moving all these function n a public namespace for reuse and chaning the call sites to use the new names.
Had a successful PF and review, merely added a letter in a comment in the test... |