Property Transform
- Namespace
- OBSStudioClient.Model
- Assembly
- OBSClient.dll
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).
public SceneItemTransform? Transform { get; }
Property Value
Remarks
The value is current, and the object is a copy that does not change: when the transform changes the property gets another object (and PropertyChanged and Changed tell). OBS Studio sends the transform again when something else about the item changes (a blend mode that is set, for one), so the model only tells when the transform is not the one that it held.
When several programs change the same item at the same moment, the events can come in another order than the changes were made (measured with OBS Studio 33.0.0: two of fifty changes that were sent at once), and the model shows the last that came: GetTransformAsync(CancellationToken) says what OBS Studio holds.
OBS Studio 33.0.0 announces a change of the position, the scale, the rotation, the alignment and the bounds at once, and a change of the crop and of the size of the source (which changes the size of the item) only for a scene that it renders: the program scene, the preview scene of studio mode, a scene that a projector shows. For another scene it announces them when the scene is rendered, and until then the transform that the model shows of an item in it has the crop and the size from before. The changes that the model makes itself (SetTransformAsync(SceneItemTransformUpdate, CancellationToken), DuplicateAsync(ObsScene?, CancellationToken)) read the scene again and do not depend on it; GetTransformAsync(CancellationToken) says what OBS Studio holds, whatever the scene is.