How to tell when your scene is "ready"

Is there a canonical way to know when the scene is finished loading in?

I am running into a race condition where if I swap a reference in the scene too quickly (Before all the textures have finished loading seems to be a reliable way to recreate the issue) the GUI will freeze and my script will get stuck at a call to kit.update()

At the moment I have gotten around this by just updating 2000 times before trying anything but this feels very hacky and probably system dependant.
I would also like to know if there was a way to set a scene render quality before capturing samples from viewports so I can avoid blurry images without textures loaded properly? (Feels related enough to be the same issue, monitoring scene state let me know if you would prefer it as a separate thread)

I found a flag, sync_loads, for OmniKitHelper which fixes this issue.
I am not 100% sure of the full implications but it does ensure that the scene is full loaded before continuing. Here is a link to the docs for clarity:
https://docs.omniverse.nvidia.com/py/isaacsim/source/extensions/omni.isaac.python_app/docs/index.html
There are a bunch of other convenience functions to would enable asynchronous loading until blocking on the scene detailed there too.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.