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

MAYA-115170 fix export when exportRoots and stripNamespaces are combined #2590

Merged

Conversation

pierrebai-adsk
Copy link
Collaborator

  • 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)
Copy link
Collaborator Author

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")

Copy link
Collaborator Author

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.
Copy link
Collaborator Author

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.

@pierrebai-adsk pierrebai-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Sep 9, 2022
@pierrebai-adsk
Copy link
Collaborator Author

Had a successful PF and review, merely added a letter in a comment in the test...

@neilh-adsk neilh-adsk added the import-export Related to Import and/or Export label Sep 13, 2022
@neilh-adsk neilh-adsk merged commit ef43122 into dev Sep 13, 2022
@neilh-adsk neilh-adsk deleted the t_bailp/MAYA-115170/conflicts-when-stripping-namespaces branch September 13, 2022 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
import-export Related to Import and/or Export ready-for-merge Development process is finished, PR is ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants