You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
From the attached zip file, open grid.usd into usdview (just some simple grid mesh geometry): transfercontentbug.zip
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)
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.
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).
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
The text was updated successfully, but these errors were encountered:
…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)
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
transfercontentbug.zip
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)
l = Sdf.Layer.FindOrOpen("torus.usda")
usdviewApi.stage.GetRootLayer().TransferContent(l)
The torus appears, because the mesh is directly in the layer being copied.
Package Versions
Tested with 20.08 and 19.11
The text was updated successfully, but these errors were encountered: