obj.drawをネイティブエンジンへ対応
このコミットが含まれているのは:
9ファイル変更
+96
-16
検索条件に一致するファイルはありません
@@ -447,6 +447,7 @@ namespace LuaScript
|
||||
(tag, frame) => ctx.ResolveObject(tag, frame, out var info) ? info : null,
|
||||
NativeLoadFigure,
|
||||
(name, args) => ctx.AddEffect(new AviUtlEffectRequest(name, args)),
|
||||
ctx.AddDraw,
|
||||
out bool dirty, out bool bufferReplaced, out byte[]? newPixels,
|
||||
out int resultW, out int resultH, out string? error);
|
||||
|
||||
@@ -459,6 +460,8 @@ namespace LuaScript
|
||||
|
||||
NativeFieldMap.FromFields(_nativeFields, ctx);
|
||||
|
||||
bool hasDraws = ctx.DrawCommands.Count > 0;
|
||||
|
||||
if (dirty)
|
||||
{
|
||||
int outW = bufferReplaced ? resultW : imgW;
|
||||
@@ -471,6 +474,12 @@ namespace LuaScript
|
||||
ctx.ReplaceBuffer(outPixels, outW, outH);
|
||||
}
|
||||
|
||||
if (hasDraws)
|
||||
{
|
||||
ctx.SetResolvedBuffer(outPixels, outW, outH);
|
||||
return true;
|
||||
}
|
||||
|
||||
_pixelManager!.WritePixelsToOutput(outPixels, outW, outH);
|
||||
if (bufferReplaced)
|
||||
effectOutput = _pixelManager.GetTransformOutput(-outW / 2f, -outH / 2f);
|
||||
@@ -479,6 +488,12 @@ namespace LuaScript
|
||||
return true;
|
||||
}
|
||||
|
||||
if (hasDraws)
|
||||
{
|
||||
ctx.SetResolvedBuffer(buffer, imgW, imgH);
|
||||
return false;
|
||||
}
|
||||
|
||||
effectOutput = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする