StageItem#

class omni.kit.widget.stage.StageItem(
path: Path,
stage,
stage_model,
flat=False,
root_identifier=None,
load_payloads=False,
check_missing_references=False,
)#

Bases: AbstractItem

A single AbstractItemModel item that represents a single prim. StageItem is a cached view of the prim.

Methods

__init__(path, stage, stage_model[, flat, ...])

Creates an instance of StageItem.

destroy()

Internal method to release resources.

set_default_prim(is_default)

Deprecated.

update_flags([prim])

Refreshes item states from USD.

Attributes

abstract

If the prim is abstract.

active

If the prim is active.

auto_reload

Whether this prim is configured to be auto-reload when its references or payloads are outdated.

check_missing_references

It will always check missing references now.

child_filtered

Returns if any child of stage item is filtered.

children

Returns children items.

display_name

The display name of prim from the metadata.

filtered

Whether the current stage item is filtered or not by search string.

has_missing_references

Whether the prim includes any missing references or payloads or not, checked recursively.

in_session

Whether this prim includes references or payloads that are in a live session.

inherits

Whether the prim has authored inherits.

instance_proxy

Whether the prim is an instance proxy or not.

instanceable

If the prim is instanceable.

is_class

If this prim is a Sdf.SpecifierClass.

is_default

Whether this prim is the default prim or not.

is_flat

If the stage model is in flat mode.

is_outdated

Whether this prim includes references or payloads that has new changes to fetch or not.

load_payloads

Whether to load payloads.

name

The Sdf path name.

name_model

The prim name model.

path

Prim path.

payloads

Whether the prim has authored payloads.

payrefs

All external references and payloads that influence this prim.

prim

The prim handle.

references

Whether the prim has authored references.

root_identifier

Returns the root layer's identifier of the stage this prim belongs to.

specializes

Whether the prim has authored specializes.

stage

USD stage the prim belongs to.

stage_model

StageModel this StageItem belongs to.

type_model

The prim type model.

type_name

Type name of the prim.

usd_context

The usd context for the current stage of the stage model.

visibility_model

The prim visibility model.

visible

If the prim is visible.

__init__(
path: Path,
stage,
stage_model,
flat=False,
root_identifier=None,
load_payloads=False,
check_missing_references=False,
)#

Creates an instance of StageItem.

Parameters:
  • path (Sdf.Path) – The prim path for the item.

  • stage (Usd.Stage) – Unused.

  • stage_model (omni.kit.widget.stage.StageModel) – The StageModel of the current item.

destroy()#

Internal method to release resources.

set_default_prim(is_default)#

Deprecated.

update_flags(prim=None)#

Refreshes item states from USD.

Keyword Arguments:

prim – Unused.

property abstract: bool#

If the prim is abstract. If no prim associated, return False.

Returns:

prim abstract

Return type:

bool

property active: bool#

If the prim is active. If no prim associated, return False.

Returns:

prim active

Return type:

bool

property auto_reload: bool#

Whether this prim is configured to be auto-reload when its references or payloads are outdated.

Returns:

Set to be auto-reloaded or not.

Return type:

bool

property check_missing_references#

It will always check missing references now.

Type:

Deprecated

property child_filtered: bool#

Returns if any child of stage item is filtered.

Returns:

True if any child is filtered.

Return type:

bool

property children#

Returns children items. If children are not populated yet, they will be populated.

Returns:

Child items.

Return type:

List[StageItem]

property display_name: str#

The display name of prim from the metadata. If not set, default to path name.

Returns:

str

property filtered: bool#

Whether the current stage item is filtered or not by search string.

Returns:

Filtered state.

Return type:

bool

property has_missing_references: bool#

Whether the prim includes any missing references or payloads or not, checked recursively.

Returns:

If any descendant of the prim has missing reference of payload.

Return type:

bool

property in_session: bool#

Whether this prim includes references or payloads that are in a live session.

Returns:

If the prim includes references or payloads in live session.

Return type:

bool

property inherits: bool#

Whether the prim has authored inherits.

Returns:

If prim has authored inherits

Return type:

bool

property instance_proxy: bool#

Whether the prim is an instance proxy or not.

Returns:

If the prim is an instance proxy

Return type:

bool

property instanceable: bool#

If the prim is instanceable.

Returns:

Prim instanceable

Return type:

bool

property is_class: bool#

If this prim is a Sdf.SpecifierClass. If no prim associated, return False.

Return type:

bool

property is_default: bool#

Whether this prim is the default prim or not.

Returns:

If this prim is the default prim.

Return type:

bool

property is_flat: bool#

If the stage model is in flat mode. If no stage model associated, returns False.

Returns:

If the stage model is in flat mode

Return type:

bool

property is_outdated: bool#

Whether this prim includes references or payloads that has new changes to fetch or not.

Returns:

If the prim is outdated.

Return type:

bool

property load_payloads: bool#

Whether to load payloads. If no stage model associated, returns False.

Returns:

Load payloads or not.

Return type:

bool

property name: str#

The Sdf path name.

Returns:

str

property name_model: PrimNameModel#

The prim name model.

Returns:

The prim name model.

Return type:

PrimNameModel

property path: Path#

Prim path.

Returns:

The prim path.

Return type:

Sdf.Path

property payloads: bool#

Whether the prim has authored payloads.

Returns:

If prim has authored payloads

Return type:

bool

property payrefs: List[str]#

All external references and payloads that influence this prim.

Returns:

References and payloads associated with this prim.

Return type:

List[str]

property prim: Prim#

The prim handle.

Returns:

The prim handle.

Return type:

Usd.Prim

property references: bool#

Whether the prim has authored references.

Returns:

If prim has authored references

Return type:

bool

property root_identifier: str | None#

Returns the root layer’s identifier of the stage this prim belongs to.

Returns:

The root layer identifier if stage exists else None

Return type:

Optional[str]

property specializes: bool#

Whether the prim has authored specializes.

Returns:

If prim has authored specializes

Return type:

bool

property stage: Stage | None#

USD stage the prim belongs to.

Returns:

The associated USD stage of the stage model.

Return type:

Optional[Usd.Stage]

property stage_model#

StageModel this StageItem belongs to.

Returns:

The StageModel

Return type:

omni.kit.widget.stage.StageModel

property type_model: TypeModel#

The prim type model.

Returns:

The prim type model.

Return type:

TypeModel

property type_name: str#

Type name of the prim. Return empty string if no prim associated.

Returns:

prim type name

Return type:

str

property usd_context: UsdContext | None#

The usd context for the current stage of the stage model.

Returns:

The associated usd context of the stage model.

Return type:

Optional[omni.usd.UsdContext]

property visibility_model: VisibilityModel#

The prim visibility model.

Returns:

The prim visibility model.

Return type:

TypeModel

property visible: bool#

If the prim is visible.

Returns:

visibility

Return type:

bool