Class SceneItemTransformUpdate
- Namespace
- OBSStudioClient.Classes
- Assembly
- OBSClient.dll
Describes a change of the transform and crop of a scene item: only the members that are set are sent to OBS Studio, and OBS Studio leaves every other member as it is.
public sealed record SceneItemTransformUpdate : IEquatable<SceneItemTransformUpdate>
- Inheritance
-
SceneItemTransformUpdate
- Implements
- Inherited Members
Remarks
Use this to move or scale an item without having to know (and send) the rest of its transform:
await client.SetSceneItemTransform("Scene", itemId, new SceneItemTransformUpdate { PositionX = 100 });
To derive a change from the current state, start from ToUpdate():
await client.SetSceneItemTransform("Scene", itemId, current.ToUpdate() with { ScaleX = 2, ScaleY = 2 });
A SceneItemTransform converts to an update implicitly. The members that OBS Studio calculates (width, height, source width and source height) are not part of an update. The bounds of a transform without bounds are left out of it, because OBS Studio refuses a bounds width or height below 1.
OBS Studio refuses an update without any member that is set.
Properties
- BoundsAlignment
Gets the new alignment of the bounds, or null to leave it as it is.
- BoundsHeight
Gets the new height of the bounds (at least 1), or null to leave it as it is.
- BoundsType
Gets the new type of the bounds, or null to leave it as it is.
- BoundsWidth
Gets the new width of the bounds (at least 1), or null to leave it as it is.
- CropBottom
Gets the new bottom crop, or null to leave it as it is.
- CropToBounds
Gets whether the scene item is cropped to its bounds, or null to leave it as it is.
- IsEmpty
Gets a value that indicates whether no member is set, which OBS Studio refuses.
Methods
- From(SceneItemTransform)
Creates the update that gives a scene item the given transform.
Operators
- implicit operator SceneItemTransformUpdate(SceneItemTransform)
Converts a SceneItemTransform into the update that gives a scene item that transform.