-
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
Ancestral unloaded payload discovery code results in overly broad resync notices #2286
Comments
Filed as internal issue #USD-8023 |
Nice catch, thanks @nvmkuruc ! I think this is a logic bug in that code. It wants to find the most ancestral unloaded path (i.e. walking unloaded parents, stopping when it finds a loaded parent) but it conflates the check for redundantly reinserting the path
Should instead be:
That is, we always stop the search when we find a loaded ancestor and we just don't redundantly reinsert Please let me know if this makes sense to you or if I've missed something. |
I think your proposed solution works. Seeing both your and my proposed solution, I wonder if the conditional exist outside of the loop. So the logic is "Do you have an unloaded parent? If so, find the load / unload boundary." Rather than have that be embedded in the loop. Happy to have it fixed either way. |
@gitamohr @jesschimein I think this can be closed. This was fixed by usd: Fix a bug where UsdStage::LoadAndUnload() could overinvalidate & · PixarAnimationStudios/OpenUSD@91fd738 (github.com) |
Thanks for flagging, Matt! |
Description of Issue
UsdStage::LoadAndUnload
takes a set of paths to load and unload on the stage and then expands it to honor the contract of loading ancestral payloads (and properly handle instancing).In trying to identify ancestral payloads, it uses the following check--
However, for active prims without any ancestral payloads
prim.IsLoaded()
trivially returns true. Therefore, for a payloaded prim without any ancestral payloads, this discovery path will always return that prim's immediate parent. In practice, this means for the simple case of a grouping scope containing a dozen or so payloaded assets, loading one triggers a resync on the parent (implying the siblings and their descendants should be resynced).To generate resync notices with a better scoped granularity, this code should be updated to either return all ancestral prims with payload composition arcs that are not loaded or the most ancestral prim with a payload that is unloaded.
Steps to Reproduce
usdview --norender --unloaded <LAYER>.usda
USD_CHANGES
andUSD_PAYLOAD
debug flags/root/subroot/prim1
/root/subroot
as requiring a resync when/root/subroot/prim1
would be expected.System Information (OS, Hardware)
Ubuntu 22.04
Package Versions
Python 3.10
Boost 1.78
TBB 2020.3
Build Flags
--usd-imaging --usdview
The text was updated successfully, but these errors were encountered: