Class ObsSceneItem
- Namespace
- OBSStudioClient.Model
- Assembly
- OBSClient.dll
A scene item of OBS Studio: a source (an input, or another scene) as it is shown in one scene.
public sealed class ObsSceneItem : INotifyPropertyChanged
- Inheritance
-
ObsSceneItem
- Implements
- Inherited Members
Remarks
The same source can be shown in a scene more than once; each copy is a scene item with an id of its own. The id is unique within its scene, and is never used again.
The properties can be read from any thread, and INotifyPropertyChanged tells when a value changed (see ObsSource). A reference to a scene item that was removed stays valid: IsRemoved is true.
Properties
- Id
Gets the id of the item, which is unique within its scene and never used again.
- Index
Gets the position of the item in its scene: 0 is the bottom. The positions of the items of a scene are 0, 1, 2, and so on.
- IsEnabled
Gets whether the item is visible. The value is current: OBS Studio announces every change of it.
- IsLocked
Gets whether the item is locked. The value is current: OBS Studio announces every change of it.
- IsRemoved
Gets whether the item was removed from its scene.
- Scene
Gets the scene that contains the item (a group, for an item in a group).
- Transform
Gets the transform of the item: where it is, how large it is shown, how it is rotated, cropped and bounded. It is null unless the model was asked to follow the transforms (HighVolume with Transforms): OBS Studio sends an event for every step of a drag, so the model does not ask for them unless they are wanted. To ask OBS Studio once, whatever the options are, use GetTransformAsync(CancellationToken).
Methods
- DuplicateAsync(ObsScene?, CancellationToken)
Makes a copy of the scene item, on top of the scene that the copy is made in, and returns the copy when the model shows it.
- GetBlendModeAsync(CancellationToken)
Asks OBS Studio how the scene item is blended with what is behind it.
- GetTransformAsync(CancellationToken)
Asks OBS Studio for the transform of the scene item: where it is, how large it is shown, how it is rotated, cropped and bounded.
- RemoveAsync(CancellationToken)
Removes the scene item from its scene, and returns when the model shows it.
- SetBlendModeAsync(BlendMode, CancellationToken)
Sets how the scene item is blended with what is behind it, and returns when OBS Studio has made the change.
- SetEnabledAsync(bool, CancellationToken)
Shows or hides the scene item, and returns when the model shows it.
- SetIndexAsync(int, CancellationToken)
Moves the scene item to a position in its scene, and returns when the model shows it.
- SetLockedAsync(bool, CancellationToken)
Locks or unlocks the scene item, and returns when the model shows it.
- SetTransformAsync(SceneItemTransformUpdate, CancellationToken)
Changes the transform of the scene item (its position, scale, rotation, alignment, bounds and crop), and returns when OBS Studio has made the change, and when the model shows it if it follows the transforms.
- ToString()
Returns a string that represents the current object.
- ToggleEnabledAsync(CancellationToken)
Shows the scene item when it is hidden, and hides it when it is shown, and returns when the model shows it.
Events
- PropertyChanged
Occurs when a property value changes.