-
Notifications
You must be signed in to change notification settings - Fork 203
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
Use separate UsdStageCache's for stages that loadAll or loadNone. #519
Conversation
…ame forcePopulate to loadAll to match the enum name. Remove the default parameter value for loadAll so future callers have to make a choice, they will be more likely to choose correctly.
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.
Just some minor cosmetic comments, but otherwise looks good to me!
Worth noting though that any maya-usd client code with parameter-less usages of mayaUsd.lib.StageCache.Get()
in Python will need to be updated following this change.
I've updated the only test which is calling mayaUsd.lib.StageCache.Get(), I don't see any more uses in maya-usd. Removing that default value is a breaking change from any users point of view, @kxl-adsk do we have a process to notify customers about changes that may break their existing scripts that are outside of maya-usd? How can I make this as painless as possible for users? At the end of the day I don't really need to remove the default parameter, so if we want to avoid breaking changes we can do it. We will need to break the "python API" at some point, if we don't have a process in place should we start thinking about it now? Flagged this one do-not-merge-yet until we come to a decision on this issue. |
…mous layer. Improve documentation for UsdMayaStageCache.
Thanks @williamkrick! Yeah, to be sure, I have no objection at all to the API change, and it's obviously easy for calling code to absorb. Just wanted raise the question as to the process, since I'm sure this won't be the first such case of this. It doesn't need to gate this PR, but definitely worth thinking about as we move forward. |
ecg-mayausd-branch-preflight-master-public run 93 |
We don't currently have any good place to announce such changes. All existing channels won't be able to reach everybody. Something for TSC to discuss - note taken. For this particular one, I doubt many people will be affected other than Pixar. So if @mattyjams you are cool with it, I wouldn't change plans. |
If y'all are happy that this change is minor enough that we don't need to wait on the notification channel being ready I'm fine with that. We just need to finalize the discussion in #519 (comment) before I'm ready to merge. |
I'm not totally happy with the state of stage caching right now, but I think there is a bigger discussion on stage caching that we need to have before we can continue, and most of the issues are not a high priority for us right now. This change makes things incrementally better, but not perfect, so I feel it can be merged now. |
…strong reference to the stage.
ecg-mayausd-branch-preflight-master-public number 105 |
Rename forcePopulate to loadAll to match the enum name. Remove the default parameter value for loadAll so future callers have to make a choice, they will be more likely to choose correctly.
The stage cache does know about different session layers and so it won't hit the cache if the session layers don't match. The interesting code is at https://github.com/PixarAnimationStudios/USD/blob/master/pxr/usd/usd/stage.cpp#L975.
There you can see the call to the cache to FindOneMatching takes all the arguments except for the InitialLoadSet.