Giter VIP home page Giter VIP logo

Comments (5)

BigRoy avatar BigRoy commented on August 28, 2024

I can confirm this issue also happens in the latest state of the dev branch however the issue does not happen when using the AL_USDMayaPlugin through the USD > Proxy > Import menu. I believe this is due to the Stage cache Id being applied as -1, likely meaning it's forced to a new unique identifier.

However I can't seem to find that similar functionality for the mayaUsdProxyShape or how to exactly reproduce the behavior through code to create the nodes.

from maya-usd.

BigRoy avatar BigRoy commented on August 28, 2024

Just checking back in. Is there currently any way to force/set the Stage cache Id for the mayaUsdProxyShape, e.g. passing it -1 as described above to avoid this "shared state" even across scenes or throughout the whole maya session.

Also, with it currently being able to break like this, could this behavior turn out dangerous? For example, if you have a scene that has stage id 1 and 2. Then you open another file that was saved with two USD proxies with stage ids 2 and 3. What happens with the changes of stage id 2? Does it preserve them and try to apply them in the other scene?

from maya-usd.

kxl-adsk avatar kxl-adsk commented on August 28, 2024

Indeed we have two different stage caches at this point. AL plugin is wrapping around UsdUtilsStageCache (https://github.com/PixarAnimationStudios/USD/blob/master/pxr/usd/lib/usdUtils/stageCache.h) and the base proxy has its own stage cache. Something to unify.

I do not have an answer to your question, maybe @mattyjams can chime in?

from maya-usd.

mattyjams avatar mattyjams commented on August 28, 2024

At the USD level, if you have layers being held open by stage caches across Maya scene changes (File->Open, File->New, etc.), then that would probably explain it. You could check this in Maya by making some edits, then doing a File->New and checking whether there are still layers loaded in the layer registry:

Sdf.Layer.GetLoadedLayers()

If that returns any layers after switching to a new scene, then there is probably a stage cache not getting reset and holding those layers open. Re-opening one of those layers is going to return you the version in the stage cache.

We should hopefully be accounting for this in the pxr nodes and the mayaUsdProxyShape with a listener:

void OnSceneReset(const UsdMayaSceneResetNotice& notice)

from maya-usd.

kxl-adsk avatar kxl-adsk commented on August 28, 2024

The issue has been fixed for a while - closing this ticket. @BigRoy please reopen if we missed something.

from maya-usd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.