プラグイン本体を分離プロジェクト参照へ移行

このコミットが含まれているのは:
routersys committed 2026-07-03 11:50:40 +09:00
1 親 79f8ff8839
コミット 902d729c19
4ファイル変更
+42 -6

検索条件に一致するファイルはありません

+5 -3
ファイルの表示
@@ -95,11 +95,13 @@
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Compat\AviUtlCompatMap.xml" />
<ProjectReference Include="..\LuaScript.Kernel\LuaScript.Kernel.csproj" />
<ProjectReference Include="..\LuaScript.Compat\LuaScript.Compat.csproj" />
<ProjectReference Include="..\LuaScript.Runtime\LuaScript.Runtime.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="MoonSharp" Version="2.0.0" />
<PackageReference Include="MoonSharp" Version="2.0.0" />
</ItemGroup>
<ItemGroup>
@@ -117,7 +119,7 @@
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="'$(CI)' != 'true'">
<Exec Command="mkdir &quot;$(YMM4DirPath)user\plugin\$(ProjectName)&quot; &gt; NUL 2&gt;&amp;1&#xD;&#xA;copy &quot;$(TargetPath)&quot; &quot;$(YMM4DirPath)user\plugin\$(ProjectName)\&quot;&#xD;&#xA;xcopy /E /I /Y &quot;$(TargetDir)native&quot; &quot;$(YMM4DirPath)user\plugin\$(ProjectName)\native&quot;" />
<Exec Command="mkdir &quot;$(YMM4DirPath)user\plugin\$(ProjectName)&quot; &gt; NUL 2&gt;&amp;1&#xD;&#xA;copy &quot;$(TargetDir)LuaScript*.dll&quot; &quot;$(YMM4DirPath)user\plugin\$(ProjectName)\&quot;&#xD;&#xA;xcopy /E /I /Y &quot;$(TargetDir)native&quot; &quot;$(YMM4DirPath)user\plugin\$(ProjectName)\native&quot;" />
</Target>
</Project>
+1 -1
ファイルの表示
@@ -66,7 +66,7 @@ namespace LuaScript
private static string NativeDirectory =>
Path.Combine(Path.GetDirectoryName(typeof(LuaScriptEffectProcessor).Assembly.Location) ?? AppContext.BaseDirectory, "native");
private readonly LuaScriptEngine _engine = new();
private readonly LuaScriptEngine _engine = new(static () => new MediaSourceLoader());
private readonly SemaphoreSlim _pixelLoaderSemaphore = new(1, 1);
private AviUtlScriptContext _context = new();
+34
ファイルの表示
@@ -0,0 +1,34 @@
namespace LuaScript
{
internal sealed class MediaSourceLoader : IMediaSourceLoader
{
private TextRenderer? _textRenderer;
private ImageDecoder? _imageDecoder;
private MovieDecoder? _movieDecoder;
public byte[] RenderText(string text, string fontFamily, double fontSize, bool bold, bool italic, int colorRgb, out int width, out int height)
{
_textRenderer ??= new TextRenderer();
return _textRenderer.Render(text, fontFamily, fontSize, bold, italic, colorRgb, out width, out height);
}
public byte[] DecodeImage(string path, out int width, out int height)
{
_imageDecoder ??= new ImageDecoder();
return _imageDecoder.Decode(path, out width, out height);
}
public byte[] DecodeMovie(string path, double time, out int width, out int height)
{
_movieDecoder ??= new MovieDecoder();
return _movieDecoder.Decode(path, time, out width, out height);
}
public void Dispose()
{
_textRenderer?.Dispose();
_imageDecoder?.Dispose();
_movieDecoder?.Dispose();
}
}
}
+2 -2
ファイルの表示
@@ -2,7 +2,7 @@ using YukkuriMovieMaker.Project.Items;
namespace LuaScript
{
internal sealed class SceneObjectResolver
internal sealed class SceneObjectResolver : ISceneObjectResolver
{
internal readonly record struct Entry(string Tag, int Frame, int Length, int Layer, VisualItem Item);
@@ -15,7 +15,7 @@ namespace LuaScript
_fps = fps;
}
internal bool TryResolve(string tag, int timelineFrame, out SceneObjectInfo info)
public bool TryResolve(string tag, int timelineFrame, out SceneObjectInfo info)
{
int fallback = -1;
for (int i = 0; i < _entries.Length; i++)