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

TransferContent not generating proper change notifications sublayer changes on "streaming" layers #1407

Closed
marktucker opened this issue Dec 3, 2020 · 1 comment

Comments

@marktucker
Copy link
Contributor

Description of Issue

When calling TransferContent to transfer a layer with sublayers into a USDC file, the change notification system is not catching the change to the sublayers, and so the new sublayer is not composed onto the stage.

Steps to Reproduce

  1. From the attached zip file, open grid.usd into usdview (just some simple grid mesh geometry):
    transfercontentbug.zip
  2. In the Interpreter window, run:
    l = Sdf.Layer.FindOrOpen("asset.usda")
    usdviewApi.stage.GetRootLayer().TransferContent(l)
    (asset.usda is empty except for a sublayer of torus.usda, which contains a torus mesh)
  3. Refresh the viewport, and see that it is empty. Now do:
    l = Sdf.Layer.FindOrOpen("torus.usda")
    usdviewApi.stage.GetRootLayer().TransferContent(l)
    The torus appears, because the mesh is directly in the layer being copied.
  4. When doing the TransferContent, a breakpoint set in SdfLayer::_ComputeInfoToFindOrOpenLayer will not be hit, indicating, I believe, that the torus.usda sublayer is not being loaded, I presume because the SdfChangeBlock doesn't recognize that the sublayer stack was changed (though Exporting the modified root layer indicates that the sublayer was transferred over properly).
  5. If you run this same procedure using grid.usda as the file first loaded into usdview, both steps 2 and 3 show the torus as expected. This points to the fact that "_data->StreamsData()" for USDC files returning true (as opposed to false for USDA files) is likely what leads to this incorrect change handling.

Package Versions

Tested with 20.08 and 19.11

@jilliene
Copy link

jilliene commented Dec 3, 2020

Filed as internal issue #USD-6504

pixar-oss pushed a commit that referenced this issue Feb 12, 2021
…with

replaced content significant wrt layer stacks that use the layer.  This went
unnoticed likely because it only practically affects usdc layers.  Text formats
like usda/menva layers never go through this path, since they do a diff and
produce incremental changes even in cases of Clear & Reload.  We internally
don't have a lot of interactive editing workflows that modify usdc layers
(yet).

Fixes #1407

(Internal change: 2146206)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants