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

Value Clips break if the stage layer stack is modified before reading values #2014

Closed
marktucker opened this issue Aug 27, 2022 · 1 comment

Comments

@marktucker
Copy link
Contributor

Description of Issue

When a value clip is loaded, a USD_Clip object is created per-clip. But the layer for that clip is not immediately loaded. Instead, the clip layer loading is deferred until a value is needed from that layer. Because of the way Usd_Clip stores the layer that owns the clip metadata, the calculation of the clip file path will be wrong if the stage's layer stack is modified after the Usd_Clip object is created, but before the value is read.

Steps to Reproduce

  1. Unzip this file:
    cubeclip.zip
  2. From the directory containing cube.usda, run this python script:
from pxr import Sdf, Usd
s = Usd.Stage.Open('cube.usda')
l = Sdf.Layer.CreateAnonymous()
s.GetSessionLayer().subLayerPaths.append(l.identifier)
p = s.GetPrimAtPath('/geo/cube')
a = p.GetAttribute('size')
print(a.Get(3))
  1. The output value will be 2.0 instead of the correct value of 1.0833333. This is because the individual clip files are not being found.
@tallytalwar
Copy link
Contributor

Filed as internal issue #USD-7603

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