diff --git a/LuaScript/LuaScriptEffect.cs b/LuaScript/LuaScriptEffect.cs index 63ec0b2..78ff2a0 100644 --- a/LuaScript/LuaScriptEffect.cs +++ b/LuaScript/LuaScriptEffect.cs @@ -1,7 +1,9 @@ using System.Collections.Generic; +using System.Collections.Immutable; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Windows.Media; +using LuaScript.Anchor; using LuaScript.Compat; using Newtonsoft.Json; using YukkuriMovieMaker.Commons; @@ -293,6 +295,19 @@ namespace LuaScript return Color.FromRgb(r, g, b); } + public ImmutableList Anchors + { + get => _anchors; + set { if (Set(ref _anchors, value ?? ImmutableList.Empty)) AnchorVersion++; } + } + ImmutableList _anchors = ImmutableList.Empty; + + [JsonIgnore] + internal int AnchorVersion { get; private set; } + + internal void ApplyAnchorDrag(string group, int index, double dx, double dy, double dz) + => Anchors = AnchorSupport.ApplyDrag(Anchors, group, index, dx, dy, dz); + public override IEnumerable CreateExoVideoFilters(int keyFrameIndex, ExoOutputDescription exoOutputDescription) => []; public override IVideoEffectProcessor CreateVideoEffect(IGraphicsDevicesAndContext devices)