-
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-114711 As a user, when clicking on 'Edit as Maya Data' I'd like … #1896
MAYA-114711 As a user, when clicking on 'Edit as Maya Data' I'd like … #1896
Conversation
…to get an edit on my sessionLayer instead of my editTarget layer
auto stage = prim.GetStage(); | ||
if (!stage) | ||
return false; | ||
UsdEditContext editContext(stage, stage->GetSessionLayer()); |
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.
Don't think this is necessary, since we're only reading, not writing. The composed state of the prim should include the session layer, and therefore the read should succeed.
self.assertFalse(stage.GetSessionLayer().empty) | ||
|
||
kPullPrimMetadataKey = "Maya:Pull:DagPath" | ||
with Usd.EditContext(stage, stage.GetSessionLayer()): |
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.
Don't think this line is needed, since you're only reading.
# Now Session Layer should be empty, but it is not, it has an empty content | ||
self.assertFalse(stage.GetSessionLayer().empty) | ||
|
||
with Usd.EditContext(stage, stage.GetSessionLayer()): |
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.
Again, this line shouldn't be needed.
self.assertTrue(mayaUsd.lib.PrimUpdaterManager.discardEdits("A")) | ||
|
||
# Now Session Layer should be empty, but it is not, it has an empty content | ||
self.assertFalse(stage.GetSessionLayer().empty) |
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.
What is this empty content?
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.
// USD Layer identifier: anon:00000217FCAC6AE0:anonymousLayer1-session.usda
// Real Path:
// #usda 1.0
//
// over "A"
// {
// }
//
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.
O.K., this is what I suspected. We should be doing this:
https://graphics.pixar.com/usd/release/api/class_sdf_layer.html#a55468b05043d021961a36fdf4912863d
to remove the inert primSpec. I feel this is out of scope for your pull request, so I'll enter a separate JIRA ticket for it
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.
Entered as MAYA-120677.
…to get an edit on my sessionLayer instead of my editTarget layer