JD2022-TU1/main/tools/framework/Shuttle.Api/AfterEffectsDTO/Layer.cs

357 lines
14 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Newtonsoft.Json;
using Shuttle.Api.AfterEffectsDTO.Properties;
namespace Shuttle.Api.AfterEffectsDTO
{
/// <summary>
/// The Layer object provides access to layers within compositions. It can be accessed from an item’s
/// layer collection either by index number or by a name string.
/// </summary>
public class Layer
{
/// <summary>
/// When true, the layer’s video is active at the current time. For this to be true, the layer must be
/// enabled, no other layer may be soloing unless this layer is soloed too, and the time must be
/// between the inPointandoutPoint values of this layer. This value is never true in an audio layer; there is
/// a separate audioActive attribute in the AVLayer object.
/// </summary>
[JsonProperty("active")]
public bool Active { get; set; }
/// <summary>
/// True if the layer is an adjustment layer.
/// </summary>
[JsonProperty("adjustmentLayer")]
public bool AdjustmentLayer { get; set; }
/// <summary>
/// True if the layer’s audio is active at the current time. For this value to be true, audioEnabled
/// must be true, no other layer with audio may be soloing unless this layer is soloed too, and the time
/// must be between the inPointand outPoint of this layer.
/// </summary>
[JsonProperty("audioActive", NullValueHandling = NullValueHandling.Ignore)]
public bool? AudioActive { get; set; }
/// <summary>
/// When true, the layer’s audio is enabled. This value corresponds to the audio toggle switch in the
/// Timeline panel.
/// </summary>
[JsonProperty("audioEnabled", NullValueHandling = NullValueHandling.Ignore)]
public bool? AudioEnabled { get; set; }
/// <summary>
/// The type of automatic orientation to perform for the layer.
/// </summary>
[JsonProperty("autoOrient")]
public int AutoOrient { get; set; }
/// <summary>
/// The blending mode of the layer.
/// </summary>
[JsonProperty("blendingMode", NullValueHandling = NullValueHandling.Ignore)]
public int? BlendingMode { get; set; }
/// <summary>
/// True if it is legal to change the value of the collapseTransformation attribute on this layer.
/// </summary>
[JsonProperty("canSetCollapseTransformation", NullValueHandling = NullValueHandling.Ignore)]
public bool? CanSetCollapseTransformation { get; set; }
[JsonProperty("canSetEnabled")]
public bool CanSetEnabled { get; set; }
/// <summary>
/// True if it is legal to change the value of the timeRemapEnabled attribute on this layer.
/// </summary>
[JsonProperty("canSetTimeRemapEnabled", NullValueHandling = NullValueHandling.Ignore)]
public bool? CanSetTimeRemapEnabled { get; set; }
/// <summary>
/// True if collapse transformation is on for this layer.
/// </summary>
[JsonProperty("collapseTransformation", NullValueHandling = NullValueHandling.Ignore)]
public bool? CollapseTransformation { get; set; }
/// <summary>
/// A descriptive comment for the layer.
/// </summary>
[JsonProperty("comment")]
public string Comment { get; set; }
/// <summary>
/// Id of the composition that contains this layer.
/// </summary>
[JsonProperty("containingComp")]
public int ContainingCompId { get; set; }
/// <summary>
/// True if the layer’s effects are active, as indicated by the &lt;f&gt; icon next to it in the user
/// interface.
/// </summary>
[JsonProperty("effectsActive", NullValueHandling = NullValueHandling.Ignore)]
public bool? EffectsActive { get; set; }
[JsonProperty("elided")]
public bool Elided { get; set; }
/// <summary>
/// When true, the layer is enabled; otherwise false. This corresponds to the video switch state of
/// the layer in the Timeline panel.
/// </summary>
[JsonProperty("enabled")]
public bool Enabled { get; set; }
/// <summary>
/// True if this is an environment layer in a Ray-traced 3D composition. Setting this attribute to
/// true automaticallymakes the layer 3D (threeDLayer becomes true).
/// </summary>
[JsonProperty("environmentLayer")]
public bool EnvironmentLayer { get; set; }
/// <summary>
/// True if frame blending is enabled for the layer.
/// </summary>
[JsonProperty("frameBlending", NullValueHandling = NullValueHandling.Ignore)]
public bool? FrameBlending { get; set; }
/// <summary>
/// The type of frame blending to perform when frame blending is enabled for the layer.
/// </summary>
[JsonProperty("frameBlendingType", NullValueHandling = NullValueHandling.Ignore)]
public int? FrameBlendingType { get; set; }
/// <summary>
/// True if the layer is a guide layer.
/// </summary>
[JsonProperty("guideLayer", NullValueHandling = NullValueHandling.Ignore)]
public bool? GuideLayer { get; set; }
/// <summary>
/// True if the layer contains an audio component, regardless of whether it is audio-enabled or
/// soloed.
/// </summary>
[JsonProperty("hasAudio", NullValueHandling = NullValueHandling.Ignore)]
public bool? HasAudio { get; set; }
/// <summary>
/// True if the layer in front of this layer is being used as a track matte on this layer. When true,
/// this layer’s trackMatteType value controls how the matte is applied.
/// </summary>
[JsonProperty("hasTrackMatte", NullValueHandling = NullValueHandling.Ignore)]
public bool? HasTrackMatte { get; set; }
/// <summary>
/// When true, the layer has a video switch (the eyeball icon) in the Timeline panel; otherwise false.
/// </summary>
[JsonProperty("hasVideo")]
public bool HasVideo { get; set; }
/// <summary>
/// The height of the layer in pixels.
/// </summary>
[JsonProperty("height", NullValueHandling = NullValueHandling.Ignore)]
public int? Height { get; set; }
/// <summary>
/// The “in” point of the layer, expressed in composition time (seconds).
/// </summary>
[JsonProperty("inPoint")]
public float InPoint { get; set; }
/// <summary>
/// The index position of the layer.
/// </summary>
[JsonProperty("index")]
public int Index { get; set; }
[JsonProperty("isEffect")]
public bool IsEffect { get; set; }
[JsonProperty("isMask")]
public bool IsMask { get; set; }
[JsonProperty("isModified")]
public bool IsModified { get; set; }
/// <summary>
/// True if the layer has no expressly set name, but contains a named source. In this case, layer.name
/// has the same value as layer.source.name. False if the layer has an expressly set name, or if the
/// layer does not have a source.
/// </summary>
[JsonProperty("isNameFromSource", NullValueHandling = NullValueHandling.Ignore)]
public bool? IsNameFromSource { get; set; }
/// <summary>
/// True if the value of the name attribute has been set explicitly, rather than automatically from
/// the source.
/// </summary>
[JsonProperty("isNameSet")]
public bool IsNameSet { get; set; }
/// <summary>
/// True if this layer is being used as a track matte for the layer behind it.
/// </summary>
[JsonProperty("isTrackMatte", NullValueHandling = NullValueHandling.Ignore)]
public bool? IsTrackMatte { get; set; }
[JsonProperty("label")]
public int Label { get; set; }
/// <summary>
/// When true, the layer is locked; otherwise false. This corresponds to the lock toggle in the Layer
/// panel.
/// </summary>
[JsonProperty("locked")]
public bool Locked { get; set; }
[JsonProperty("matchName")]
public string MatchName { get; set; }
/// <summary>
/// True if motion blur is enabled for the layer.
/// </summary>
[JsonProperty("motionBlur", NullValueHandling = NullValueHandling.Ignore)]
public bool? MotionBlur { get; set; }
/// <summary>
/// The name of the layer. By default, this is the same as the Source name (which cannot be changed in
/// the Layer panel), but you can set it to be different.
/// </summary>
[JsonProperty("name")]
public string Name { get; set; }
/// <summary>
/// When true, the layer was created as a null object; otherwise false.
/// </summary>
[JsonProperty("nullLayer")]
public bool NullLayer { get; set; }
[JsonProperty("numProperties")]
public int NumProperties { get; set; }
/// <summary>
/// The “out” point of the layer, expressed in composition time (seconds).
/// </summary>
[JsonProperty("outPoint")]
public float OutPoint { get; set; }
/// <summary>
/// True if preserve transparency is enabled for the layer.
/// </summary>
[JsonProperty("preserveTransparency", NullValueHandling = NullValueHandling.Ignore)]
public bool? PreserveTransparency { get; set; }
/// <summary>
/// The quality with which this layer is displayed.
/// </summary>
[JsonProperty("quality", NullValueHandling = NullValueHandling.Ignore)]
public int? Quality { get; set; }
/// <summary>
/// Set/get layer sampling method (bicubic or bilinear)
/// </summary>
[JsonProperty("samplingQuality", NullValueHandling = NullValueHandling.Ignore)]
public int? SamplingQuality { get; set; }
[JsonProperty("selected")]
public bool Selected { get; set; }
/// <summary>
/// An array containing all of the currently selected Property and PropertyGroup objects in the layer.
/// </summary>
[JsonProperty("selectedProperties")]
public PropertyBase[] SelectedProperties { get; private set; } = new PropertyBase[0];
/// <summary>
/// When true, the layer is “shy”, meaning that it is hidden in the Layer panel if the composition’s
/// “Hide all shy layers” option is toggled on.
/// </summary>
[JsonProperty("shy")]
public bool Shy { get; set; }
/// <summary>
/// When true, the layer is soloed, otherwise false.
/// </summary>
[JsonProperty("solo")]
public bool Solo { get; set; }
/// <summary>
/// The source AVItem for this layer. The value is null in a Text layer. Use AVLayer.replaceSource()
/// to change the value.
/// </summary>
[JsonProperty("source", NullValueHandling = NullValueHandling.Ignore)]
public int? Source { get; set; }
/// <summary>
/// The start time of the layer, expressed in composition time (seconds).
/// </summary>
[JsonProperty("startTime")]
public float StartTime { get; set; }
/// <summary>
/// The layer’s time stretch, expressed as a percentage. A value of 100 means no stretch. Values
/// between 0 and 1 are set to 1, and values between -1 and 0 (not including 0) are set to -1.
/// </summary>
[JsonProperty("stretch")]
public float Stretch { get; set; }
/// <summary>
/// True if this is a 3D layer.
/// </summary>
[JsonProperty("threeDLayer", NullValueHandling = NullValueHandling.Ignore)]
public bool? ThreeDLayer { get; set; }
/// <summary>
/// True if this layer has the Enable Per-character 3D switch set, allowing its characters to be
/// animated off the plane of the text layer. Applies only to text layers.
/// </summary>
[JsonProperty("threeDPerChar", NullValueHandling = NullValueHandling.Ignore)]
public bool? ThreeDPerChar { get; set; }
/// <summary>
/// The current time of the layer, expressed in composition time (seconds).
/// </summary>
[JsonProperty("time")]
public float Time { get; set; }
/// <summary>
/// True if time remapping is enabled for this layer.
/// </summary>
[JsonProperty("timeRemapEnabled", NullValueHandling = NullValueHandling.Ignore)]
public bool? TimeRemapEnabled { get; set; }
/// <summary>
/// If this layer has a track matte, specifies the way the track matte is applied.
/// </summary>
[JsonProperty("trackMatteType", NullValueHandling = NullValueHandling.Ignore)]
public int? TrackMatteType { get; set; }
/// <summary>
/// The width of the layer in pixels.
/// </summary>
[JsonProperty("width", NullValueHandling = NullValueHandling.Ignore)]
public int? Width { get; set; }
/// <summary>
/// For a light layer, its light type. Trying to set this attribute for a non-light layer produces an
/// error.
/// </summary>
[JsonProperty("lightType", NullValueHandling = NullValueHandling.Ignore)]
public int? LightType { get; set; }
/// <summary>
/// The parent of this layer; can be null. Offset values are calculated to counterbalance any
/// transforms above this layer in the hierarchy, so that when you set the parent there is no apparent jump in
/// the layer’s transform. For example, if the new parent has a rotation of 30 degrees, the child layer
/// is assigned a rotation of -30 degrees. To set the parent without changing the child layer’s transform
/// values, use the setParentWithJump method.
/// </summary>
[JsonProperty("parent")]
public Layer Parent { get; set; }
public override string ToString()
{
return Name;
}
}
}