Layouts in Kit 107

Hello!

With Kit 106, one could use omni.app.setup extension to assign a default layout to use, as well as to configure the Layouts file menu. The omni.app.setup extension is not available in Kit 107. Is there another intended method to configure layout options?

Thanks!

It looks like one has to use a combination of omni.kit.quicklayout and omni.kit.menu.utils extensions and a custom extension to assign the layout at startup and the order of the file menus.

It would be nice to have a simple property in omni.kit.quicklayout to specify the layout to load at start with the app (like omni.app.setup did).

Yes that is correct. Actually, here is a code snippet, that creates a custom extension to do just that !

from omni.kit.quicklayout import QuickLayout

async def _load_layout(layout_file: str):
    """Loads a provided layout file and ensures the viewport is set to FILL."""
    await omni.kit.app.get_app().next_update_async()
    QuickLayout.load_file(layout_file)

Yeah, exactly that.

I do propose adding a property to load a default layout through quicklayout. That would make it… quick 😉

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

Thanks. I will pass this along to the team. I agree.

From this thread, I have already wrote a guide on changing your own startup layout. So easy to do. So simple. But these are the kinds of things we need in the docs. Maybe you could add this.

Loading your own custom layout

  1. Save your custom layout file, example “richard.json”
  2. Edit your Template extension, by default at “C:\kit-app-template\source\extensions\my_company.my_usd_composer_setup_extension\my_company\my_usd_composer_setup_extension\extension.py”
  3. Go down to line 185 of “extension.py” and find the line layout_file = f"{DATA_PATH}/layouts/default.json"
  4. Change to whatever file and file path you want, example layout_file = f"{DATA_PATH}/layouts/richard.json"
1 Like