-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix GetDisplayName() for Anonymous Layers. #440
Fix GetDisplayName() for Anonymous Layers. #440
Conversation
Filed as internal issue #158778. |
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.
Hey @superfunc, I think this change seems fine, but iI think the test case should be in Sdf itself. Could you add a test case in testSdfLayer.py as well? Thanks!
Yeah I'll get that up tonight ✌️ |
0b17a06
to
930accb
Compare
Ok, I just moved the test over to sdf, should be good to merge now. |
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.
Sorry, there was one last review note I missed last time. Thanks!
return std::string(); | ||
// We want to find the second occurence of ':', traversing from the left, | ||
// in our identifier which is of the form anon:0x4rfs23:displayName | ||
auto fst = std::find(identifier.begin(), identifier.end(), ':'); |
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.
Can we bail here if fst == identifier.end() for safety? The old code handled the case where there were no ":" characters in the identifier (even if this should never happen), so I think it'd be good to follow suit.
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.
Done, updated. Thanks :)
It was broken when the provided identifier had a colon in it, which is legal in a posix file path.
This behavior fundamentally lives in sdf, so it should be tested there. UsdStage's constructors just forward into this code.
930accb
to
e0d6867
Compare
Fix GetDisplayName() for Anonymous Layers.
…Controller. (PixarAnimationStudios#440) ### Description of Change(s) Move setting the camera and framing information in RenderIndex from UsdImagingGLEngine to taskController. This is because UsdImagingGLEngine may not be used by the client. But taskController is more widely used. Also add SetCameraFramingState function to RenderIndex. Sometimes there is no camera set when the renderindex syncs, so the user must set worldToViewMatrix, projection matrix and viewport to the renderindex directly. ### Fixes Issue(s) - <!-- Please follow the Contributing and Building guidelines to run tests against your change. Place an X in the box if tests are run and are all tests passing. --> - [ ] I have verified that all unit tests pass with the proposed changes <!-- Place an X in the box if you have submitted a signed Contributor License Agreement. A signed CLA must be received before pull requests can be merged. For instructions, see: http://openusd.org/release/contributing_to_usd.html --> - [ ] I have submitted a signed Contributor License Agreement
Description of Change(s)
It was broken when the provided identifier had a colon in it,
which is legal in a posix file path.
e.g.
Should return
foo:foo.usda
, but currently returns an empty stringFixes Issue(s)