new_stage_with_callback

omni.kit.stage_template.core.stage_core.new_stage_with_callback(on_new_stage_fn=None, template='empty', usd_context=None)

Creates a new USD stage using the specified template and context, then applies post-creation operations via a callback.

Parameters
  • on_new_stage_fn (Optional[callable]) – A callback function to be called after the new stage is created. It should accept two arguments: a boolean indicating the success of the stage creation, and an error message if the creation failed.

  • template (str) – The name of the template to use for creating the new stage. If not specified, ‘empty’ is used as the default.

  • usd_context (Optional[omni.usd.UsdContext]) – The USD context within which the new stage is to be created. If not provided, the default USD context is used.

Returns

None