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-101454 Clear stage cach on file new/open. #437

Merged
merged 2 commits into from
Apr 17, 2020

Conversation

fowlertADSK
Copy link
Contributor

This is a small change that reuses existing code that will reset the stage cache on New or Open, fixing some logged issues. It is not a complete fix for how we deal with the cache though, e.g. deleting the proxy shape and re-importing the same USD file will still show you the cached version which is probably unexpected. The listener here is only called on File -> New and Open.

We do plan on looking at how the Animal Logic plugin deals with this kind of thing and will most likely refactor some of that into the core lib to be shared by all plugins, but for right now this is an easy change that should help in a couple obvious workflows.

@@ -134,6 +135,8 @@ MStatus initializePlugin(MObject obj)
}
}

UsdMayaSceneResetNotice::InstallListener();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was already being installed by the Pixar plugin, but MayaUSD should also be using it.

@@ -24,6 +24,11 @@ PXR_NAMESPACE_OPEN_SCOPE

namespace {

// Siple ref count for how many plugins have initialized the callback.
Copy link
Contributor

Choose a reason for hiding this comment

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

Siple or simple? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

either :-)

@kxl-adsk kxl-adsk added adsk Related to Autodesk plugin workflows Related to in-context workflows labels Apr 17, 2020
@kxl-adsk kxl-adsk merged commit 080b53d into dev Apr 17, 2020
@kxl-adsk kxl-adsk deleted the fowlert/MAYA-101454/clear_stage_cache_on_new_scene branch April 17, 2020 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adsk Related to Autodesk plugin workflows Related to in-context workflows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants