This repository was archived by the owner on Mar 26, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAfterimageEffect.cs
More file actions
47 lines (38 loc) · 1.98 KB
/
AfterimageEffect.cs
File metadata and controls
47 lines (38 loc) · 1.98 KB
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
using System.ComponentModel.DataAnnotations;
using YukkuriMovieMaker.Commons;
using YukkuriMovieMaker.Controls;
using YukkuriMovieMaker.Exo;
using YukkuriMovieMaker.ItemEditor.CustomVisibilityAttributes;
using YukkuriMovieMaker.Player.Video;
using YukkuriMovieMaker.Plugin.Effects;
namespace Afterimage
{
[VideoEffect("残像", ["アニメーション"], [], isAviUtlSupported: false)]
internal class AfterimageEffect : VideoEffectBase
{
public override string Label => "残像";
[Display(GroupName = "残像", Name = "フレーム数", Description = "保存するフレームの数")]
[AnimationSlider("F0", "", 1, 50)]
public Animation FrameCount { get; } = new Animation(50, 1, 1000);
[Display(GroupName = "残像", Name = "持続フレーム", Description = "残像が表示されてから、完全に消えるまでの時間")]
[AnimationSlider("F0", "", 1, 50)]
public Animation Duration { get; } = new Animation(50, 1, 1000);
[Display(GroupName = "残像", Name = "減衰", Description = "残像の減衰")]
[ToggleSlider]
public bool IsDecay { get => isDecay; set => Set(ref isDecay, value); }
bool isDecay = true;
[Display(GroupName = "残像", Name = "不透明度", Description = "残像の不透明度")]
[ShowPropertyEditorWhen(nameof(IsDecay), true)]
[AnimationSlider("F1", "%", 0, 50)]
public Animation Opacity { get; } = new Animation(50, 0, 100);
public override IEnumerable<string> CreateExoVideoFilters(int keyFrameIndex, ExoOutputDescription exoOutputDescription)
{
return [];
}
public override IVideoEffectProcessor CreateVideoEffect(IGraphicsDevicesAndContext devices)
{
return new AfterimageEffectProcessor(devices, this);
}
protected override IEnumerable<IAnimatable> GetAnimatables() => [FrameCount, Opacity, Duration];
}
}