1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
|
// This file has been automatically generated. Don't edit it.
package sceneitems
import (
requests "github.com/andreykaipov/goobs/api/requests"
typedefs "github.com/andreykaipov/goobs/api/typedefs"
)
/*
GetSceneItemPropertiesParams represents the params body for the "GetSceneItemProperties" request.
Gets the scene specific properties of the specified source item.
Coordinates are relative to the item's parent (the scene or group it belongs to).
Since 4.3.0.
*/
type GetSceneItemPropertiesParams struct {
requests.ParamsBasic
// The item specification for this object.
Item *typedefs.Item `json:"item,omitempty"`
// Name of the scene the scene item belongs to. Defaults to the current scene.
SceneName string `json:"scene-name,omitempty"`
}
// GetSelfName just returns "GetSceneItemProperties".
func (o *GetSceneItemPropertiesParams) GetSelfName() string {
return "GetSceneItemProperties"
}
/*
GetSceneItemPropertiesResponse represents the response body for the "GetSceneItemProperties" request.
Gets the scene specific properties of the specified source item.
Coordinates are relative to the item's parent (the scene or group it belongs to).
Since v4.3.0.
*/
type GetSceneItemPropertiesResponse struct {
requests.ResponseBasic
// The bounding box of the object (source, scene item, etc).
Bounds *typedefs.Bounds `json:"bounds,omitempty"`
// The crop specification for the object (source, scene item, etc).
Crop *typedefs.Crop `json:"crop,omitempty"`
// List of children (if this item is a group)
GroupChildren []typedefs.SceneItemTransform `json:"groupChildren,omitempty"`
// Scene item height (base source height multiplied by the vertical scaling factor)
Height float64 `json:"height,omitempty"`
// Scene Item ID.
ItemId int `json:"itemId,omitempty"`
// If the source's transform is locked.
Locked bool `json:"locked,omitempty"`
// If the source is muted.
Muted bool `json:"muted,omitempty"`
// Scene Item name.
Name string `json:"name,omitempty"`
// Name of the item's parent (if this item belongs to a group)
ParentGroupName string `json:"parentGroupName,omitempty"`
// The position of the object (source, scene item, etc).
Position *typedefs.Position `json:"position,omitempty"`
// The clockwise rotation of the item in degrees around the point of alignment.
Rotation float64 `json:"rotation,omitempty"`
// The scaling specification for the object (source, scene item, etc).
Scale *typedefs.Scale `json:"scale,omitempty"`
// Base source (without scaling) of the source
SourceHeight int `json:"sourceHeight,omitempty"`
// Base width (without scaling) of the source
SourceWidth int `json:"sourceWidth,omitempty"`
// If the source is visible.
Visible bool `json:"visible,omitempty"`
// Scene item width (base source width multiplied by the horizontal scaling factor)
Width float64 `json:"width,omitempty"`
}
// GetSceneItemProperties sends the corresponding request to the connected OBS WebSockets server.
func (c *Client) GetSceneItemProperties(params *GetSceneItemPropertiesParams) (*GetSceneItemPropertiesResponse, error) {
data := &GetSceneItemPropertiesResponse{}
if err := c.SendRequest(params, data); err != nil {
return nil, err
}
return data, nil
}
|