Skip to main content

Module scenes

Module scenes 

Source
Expand description

Scenes, managed scene items, native OBS groups, ordering, and transform state.

ObsSceneRef is the scene-level entry point. Add typed sources with ObsSceneRef::add, inspect actual bottom-to-top libobs order with ObsSceneRef::items_in_order, and create native groups with ObsSceneRef::create_group.

Scene-item behavior is exposed through SceneItemTrait: position/scale/rotation, bounds, edge crop, scale filtering, blending, visibility, locking, order, and complete transform/state snapshots. Ordinary source insertion returns ObsSceneItemRef<T>, preserving the source type. ObsSceneItemHandle is the type-erased managed handle used when libobs itself replaces an item.

§Group identity semantics

libobs reuses child objects when moving them into/out of a group, but ungrouping the whole group creates replacement parent-scene items. ObsSceneGroupRef::ungroup models that explicitly by returning ObsUngroupedItem mappings and marking replaced child handles removed.

Structs§

ItemAddSignal
ItemDeselectSignal
ItemLockedSignal
ItemRemoveSignal
ItemSelectSignal
ItemTransformSignal
ItemVisibleSignal
ObsSceneGroupRef
A managed libobs group scene-item.
ObsSceneItemCrop
Pixel crop applied to a scene item before its transform is evaluated.
ObsSceneItemHandle
Type-erased managed scene-item handle used when libobs itself replaces a native item, such as during group ungrouping. Ordinary source insertion still returns ObsSceneItemRef<T>.
ObsSceneItemRef
Holds the specific source that was added to the scene and its scene item. If this struct is attached to the scene, it’ll not be dropped as the scene internally stores this struct, thus the source will also not be dropped.
ObsSceneItemStateSnapshot
Restorable scene-item state including transform, visibility, locking and native z-order.
ObsSceneItemTransformSnapshot
Complete render-transform state for one scene item. Unlike ObsTransformInfo, this also includes edge crop, scaling filter, and blending state stored outside obs_transform_info.
ObsSceneRef
This struct holds every ObsSourceRef that is attached to the scene by using add_source.
ObsSceneSignals
ObsTransformInfo
Use ObsTransformInfoBuilder to create an instance of this struct.
ObsTransformInfoBuilder
ObsUngroupedItem
Replacement mapping returned when native libobs ungrouping replaces a child scene item.

Traits§

ObsSceneExtFilter
SceneItemExtSceneTrait
SceneItemTrait