FabricStageHelper

class omni.fabric.commands.scripts.fabric_stage_helper.FabricStageHelper(stage: Optional[Stage] = None, context_name: Optional[str] = None)

Bases: object

A helper class that manages Fabric and USD stages within a given context.

This class allows users to interact with Fabric and USD stages by either using a specified stage or the current context’s stage. It encapsulates the logic to fetch and set the Fabric/USD stage based on the context or the provided stage.

Parameters
  • stage – Optional[usdrt.Usd.Stage] The Fabric stage to be used. If not provided, stage will be fetched from context.

  • context_name – Optional[str] The name of the context from which to fetch the stage; if not provided, the default context is used.

Methods

__init__([stage, context_name])

Initializes the FabricStageHelper with an optional stage or context name.

__init__(stage: Optional[Stage] = None, context_name: Optional[str] = None)

Initializes the FabricStageHelper with an optional stage or context name.