/// <summary> /// List every available scene /// </summary> /// <returns>A <see cref="List{OBSScene}" /> of <see cref="OBSScene"/> objects describing each scene</returns> public List <OBSScene> ListScenes() { JObject response = SendRequest("GetSceneList"); JArray items = (JArray)response["scenes"]; var scenes = new List <OBSScene>(); foreach (JObject sceneData in items) { OBSScene scene = new OBSScene(sceneData); scenes.Add(scene); } return(scenes); }
/// <summary> /// Set the relative crop coordinates of the specified source item /// </summary> /// <param name="sceneItem">Scene item object</param> /// <param name="cropInfo">Crop coordinates</param> /// <param name="scene">Parent scene of scene item</param> public void SetSceneItemCrop(SceneItem sceneItem, SceneItemCropInfo cropInfo, OBSScene scene) { SetSceneItemCrop(sceneItem.SourceName, cropInfo, scene.Name); }
/// <summary> /// Change the currently active preview scene to the one specified. /// Triggers an error if Studio Mode is disabled. /// </summary> /// <param name="previewScene">Preview scene object</param> public void SetPreviewScene(OBSScene previewScene) { SetPreviewScene(previewScene.Name); }