register_template

omni.kit.stage_template.core.stage_core.register_template(name, new_stage_fn, group=0)

Registers a new stage template and associates it with an action.

Parameters
  • name (str) – The unique name of the template to register.

  • new_stage_fn (callable) – The function to create a new stage when this template is used.

  • group (int) – An identifier to group templates, used by the menu to split into groups with separators.

Returns

True if the template was successfully registered, False if the template already exists.

Return type

bool