How to load render setting when opening a stage

What steps are required to opening a stage with render settings? I am executing the following code to open a stage omni.kit.window.file.open_stage(path)? Which loads the stage; however, none of the render setting load with the stage. What am I missing?


This is puzzling because the render setting automatically load whenever I open the usd file manually via the nucleus browser. However, they do not load when I execute the code snippet from above. Is Nucleus doing something different when loading a stage?

Also, I wanted to provide more context just in case I am overlooking something. We are using Cesium for Omniverse in our project. Maybe they are saving/loading the render settings somewhere?

I am not aware of any reason there should be a difference between the way you open a usd file, either via a menu or via code.

So a stage is currently saved with meta-data with render-settings. Those are automatically loaded/restored when the stage is opened. When /app/omni.usd/loadRenderSettingsFromUsdStage=false those meta-data settings are not restored.

Sorry for the delayed response. I was out on vacation for the 4th of July week.

The following code executes when opening a stage:

settings = carb.settings.get_settings()
print(f'loadRenderSettingsFromUsdStage: ${settings.get("/app/omni.usd/loadRenderSettingsFromUsdStage")}')

The print statement logs loadRenderSettingsFromUsdStage: $True and opens the stage without any of the render settings.

settings = carb.settings.get_settings() should be loading your settings just fine.

Except the stage doesn’t load the render settings.

I also wanted to point out that calling then calling omni.kit.window.file.open_stage(path) loads the render settings. While this does load the render settings, it is not ideal because it slows down the process of opening a stage and every so often this causes the app to crash. I’m thinking the crash might be caused by a race condition.

I can ask, but for now if that works, use the File New, then File Open

Specifically what rendering settings are you looking to load ? You might be trying to load settings that are not even stored in the USD file. Please list out the exact settings.