登録と毎フレーム変数を属性ベース生成へ移行

このコミットが含まれているのは:
routersys committed 2026-07-03 14:05:12 +09:00
1 親 79a408cafd
コミット b62f4a3a7d
5ファイル変更
+998 -863

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

+33 -15
ファイルの表示
@@ -1,21 +1,39 @@
using MoonSharp.Interpreter;
using LuaScript.Api;
namespace LuaScript
{
internal static class Ymm4TableRegistrar
[LuaTable("ymm4")]
internal static partial class Ymm4TableRegistrar
{
internal static void UpdateVariables(Table ymm4, AviUtlScriptContext ctx)
{
ymm4["group_index"] = ctx.GroupIndex;
ymm4["group_count"] = ctx.GroupCount;
ymm4["group_ratio"] = ctx.GroupCount > 0 ? ctx.GroupIndex / (double)ctx.GroupCount : 0d;
ymm4["timeline_totalframe"] = ctx.TimelineTotalFrame;
ymm4["timeline_totaltime"] = ctx.TimelineTotalTime;
ymm4["is_saving"] = ctx.IsSaving;
ymm4["time_ratio"] = ctx.TimeRatio;
ymm4["is_playing"] = ctx.IsPlaying;
ymm4["is_paused"] = ctx.IsPaused;
ymm4["scene_id"] = ctx.SceneId;
}
[LuaVariable("group_index")]
private static int GroupIndex(AviUtlScriptContext ctx) => ctx.GroupIndex;
[LuaVariable("group_count")]
private static int GroupCount(AviUtlScriptContext ctx) => ctx.GroupCount;
[LuaVariable("group_ratio")]
private static double GroupRatio(AviUtlScriptContext ctx) =>
ctx.GroupCount > 0 ? ctx.GroupIndex / (double)ctx.GroupCount : 0d;
[LuaVariable("timeline_totalframe")]
private static int TimelineTotalFrame(AviUtlScriptContext ctx) => ctx.TimelineTotalFrame;
[LuaVariable("timeline_totaltime")]
private static double TimelineTotalTime(AviUtlScriptContext ctx) => ctx.TimelineTotalTime;
[LuaVariable("is_saving")]
private static bool IsSaving(AviUtlScriptContext ctx) => ctx.IsSaving;
[LuaVariable("time_ratio")]
private static double TimeRatio(AviUtlScriptContext ctx) => ctx.TimeRatio;
[LuaVariable("is_playing")]
private static bool IsPlaying(AviUtlScriptContext ctx) => ctx.IsPlaying;
[LuaVariable("is_paused")]
private static bool IsPaused(AviUtlScriptContext ctx) => ctx.IsPaused;
[LuaVariable("scene_id")]
private static string SceneId(AviUtlScriptContext ctx) => ctx.SceneId;
}
}