-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Based on the documentation for the The Here's the function signature: import omni.kit.window.file
# This will bring up a file picker dialog to choose where to save
omni.kit.window.file.save_as(flatten=True) For more information, you can refer to the official Omniverse Kit documentation. |
Beta Was this translation helpful? Give feedback.
Based on the documentation for the
omni.kit.window.file
module, you can use thesave_as()
function to achieve the same result as the "Save Flattened As" option in the GUI.The
save_as()
function takes a flatten parameter, which is a boolean. By settingflatten=True
, you can save the current stage as a single, flattened USD file.Here's the function signature:
omni.kit.window.file.save_as(flatten, on_save_done: Callable[[bool, str], None] | None = None)
For a simple script, you would likely use it like this:
For more information, you can refer to the of…