-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Payload not loaded when parent prim is activated #604
Comments
I can reproduce - thanks for reporting this, Miguel - we'll get on it!
…--spiff
On Sun, Aug 26, 2018 at 1:20 AM Miguel Gao ***@***.***> wrote:
Description of Issue
Hi there,
When a deactivated prim-A got a payload, whose child prim B also got one,
then activating the prim-A won't load the child B's payload, despite the
fact that the stage is loaded with LoadAll flag.
The payload of prim-A is loaded through.
This will cause the fact that when LayerDidChange event is emitted, the
payload of child prim B is not loaded yet, thus the data will be missed
during the event handling.
I saw a related issue: #156
<#156>
Cheers,
Miguel Gao
Steps to Reproduce
1. Create a usda file called bootstrap.usda:
#usda 1.0
(
defaultPrim = "shot"
)
def Xform "shot" (
)
{
def Xform "camera" (
)
{
def Xform "cache"(
active = false
payload = @cache_payload.usda@
){
def "cam"(
payload = @camera_cache.usda@
){
}
}
}
}
1. Create a file called cache_payload.usda:
#usda 1.0
(
defaultPrim = "cam_extra"
)
def "cam_extra" (
)
{
// Some heavy data goes here...
def "cache_payload"(){}
}
1. Create a file called camera_cache.usda:
#usda 1.0
(
defaultPrim = "cam"
)
def Xform "cam" (
)
{
// Some heavy data goes here...
def "cam_payload"(){}
}
1. Put all three files within same folder, run python code to test:
from pxr import Usd
stage = Usd.Stage.Open('/path/to/bootstrap.usda', Usd.Stage.LoadAll)
stage.SetEditTarget(stage.GetSessionLayer())
cachePrim = stage.GetPrimAtPath('/shot/camera/cache')
cachePrim.SetActive(True)
cachePayloadPrim = stage.GetPrimAtPath('/shot/camera/cache/cache_payload')
print 'The payload for cache is loaded: %s' % cachePayloadPrim.IsValid()
cameraPayloadPrim = stage.GetPrimAtPath('/shot/camera/cache/cam/cam_payload')
print 'The payload for cam is loaded: %s' % cameraPayloadPrim.IsValid() # This is the problem
cachePrim.Load()
cameraPayloadPrim = stage.GetPrimAtPath('/shot/camera/cache/cam/cam_payload')
print 'The payload for cam is loaded after manually calling Load(): %s' % cameraPayloadPrim.IsValid()
System Information (OS, Hardware)
Linux, CentOS 7
Package Versions
0.8.5
Build Flags
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#604>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AF7qaG0DVNwF-IiTlZd0ZrdDfART1Uxkks5uUlpMgaJpZM4WMseE>
.
|
Filed as internal issue #USD-4712. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description of Issue
Hi there,
When a deactivated prim-A got a payload, whose child prim B also got one, then activating the prim-A won't load the child B's payload, despite the fact that the stage is loaded with LoadAll flag.
The payload of prim-A is loaded through.
This will cause the fact that when LayerDidChange event is emitted, the payload of child prim B is not loaded yet, thus the data will be missed during the event handling.
I saw a related issue: #156
Cheers,
Miguel Gao
Steps to Reproduce
System Information (OS, Hardware)
Linux, CentOS 7
Package Versions
0.8.5
Build Flags
The text was updated successfully, but these errors were encountered: