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

MAYA121636 handle scope for read-only transform #2530

Merged

Conversation

pierrebai-adsk
Copy link
Collaborator

  • Implement Transform3dRead for scope prim.
  • Add a Transform3dHandler that creates that implementation for scopes.
  • Add unit tests.

- Implement Transform3dRead for scope prim.
- Add a Transform3dHandler that creates that implementation for scopes.
- Add unit tests.
@pierrebai-adsk
Copy link
Collaborator Author

Implementation of the UFE interface that went in UFE 0.4.25. (Maya is now at 0.4.30.)

Copy link
Collaborator

@ppt-adsk ppt-adsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can have a look at the latest discussion in the original issue:
#2085

lib/mayaUsd/ufe/UsdTransform3dRead.cpp Outdated Show resolved Hide resolved
lib/mayaUsd/ufe/UsdTransform3dRead.h Outdated Show resolved Hide resolved
lib/mayaUsd/ufe/UsdTransform3dRead.h Show resolved Hide resolved
Copy link
Collaborator

@ppt-adsk ppt-adsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for making this change, just the private inheritance I'm wondering about.

lib/mayaUsd/ufe/UsdTransform3dRead.h Outdated Show resolved Hide resolved
lib/mayaUsd/ufe/UsdTransform3dReadImpl.h Outdated Show resolved Hide resolved
test/lib/ufe/testParentCmd.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@ppt-adsk ppt-adsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On second thought, I think we need an addition and a change to the tests:

  1. Need to add a parent -relative test. It's the trivial case, but it still needs a test :)
  2. The new tests need to be protected by a ufeSupportFixLevel() decorator, so that they will only run if Maya has the proper support. You can add the fixLevel in your Maya pull request. See
    @unittest.skipUnless(mayaUtils.ufeSupportFixLevel() >= 5, 'Requires Maya xform command fix.')

@pierrebai-adsk
Copy link
Collaborator Author

2. The new tests need to be protected by a ufeSupportFixLevel() decorator, so that they will only run if Maya has the proper support.  You can add the fixLevel in your Maya pull request.  See
   https://github.com/Autodesk/maya-usd/blob/387a1fa6c11f8a7349d7ebe353e55382603e2347/test/lib/ufe/testGroupCmd.py#L926

I'm thinking a bit more about the UFE fix level: it seems that it does not work well with back-porting. We may not backport everything to an older version of Maya. so if we backport a fix at fix-level N, we may not have ported the fixes related to fix-level N-1, N-2, etc. It would be better if we the fix-level were instead a fix-features list. For now I'll add a fix level.

Also add a relative parent test
@ppt-adsk
Copy link
Collaborator

2. The new tests need to be protected by a ufeSupportFixLevel() decorator, so that they will only run if Maya has the proper support.  You can add the fixLevel in your Maya pull request.  See
   https://github.com/Autodesk/maya-usd/blob/387a1fa6c11f8a7349d7ebe353e55382603e2347/test/lib/ufe/testGroupCmd.py#L926

I'm thinking a bit more about the UFE fix level: it seems that it does not work well with back-porting. We may not backport everything to an older version of Maya. so if we backport a fix at fix-level N, we may not have ported the fixes related to fix-level N-1, N-2, etc. It would be better if we the fix-level were instead a fix-features list. For now I'll add a fix level.

There is no fix level for backports. Fix level only exists for master, to protect plugin code from execution using a Maya that is inappropriate. For previous versions of Maya, you can assume the plugin code is already being executed using Maya master until you put in your fix into the previous version of Maya. Once that's done, you can enable the test for that previous Maya version in the plugin.

The point of fix level is to protect against execution within the time scope of a Maya preview release, when no UFE version number is appropriate. In such a case, you cannot rely on the Maya preview release number, or the Maya version, or the UFE version.

@pierrebai-adsk pierrebai-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Sep 15, 2022
@neilh-adsk neilh-adsk added the ufe-usd Related to UFE-USD plugin in Maya-Usd label Sep 16, 2022
@neilh-adsk neilh-adsk merged commit ff0f337 into dev Sep 16, 2022
@neilh-adsk neilh-adsk deleted the t_bailp/MAYA-MAYA-121636/parenting-scope-tests-simplified branch September 16, 2022 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge Development process is finished, PR is ready for merge ufe-usd Related to UFE-USD plugin in Maya-Usd
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants