diff --git a/res/modules/animation.lua b/res/modules/animation.lua index b2cc56879..fd43ac9f9 100644 --- a/res/modules/animation.lua +++ b/res/modules/animation.lua @@ -45,7 +45,7 @@ local M = { CH_SCALE = 3, CH_ZOOM = 4, CH_TEXTURE = 5, - CH_CONTROL = 6, + CH_SHOW = 6, INT_CONST = 1, INT_LINEAR = 2, diff --git a/res/modules/internal/animation_codegen.lua b/res/modules/internal/animation_codegen.lua index 169b08163..eb08c2afb 100644 --- a/res/modules/internal/animation_codegen.lua +++ b/res/modules/internal/animation_codegen.lua @@ -192,13 +192,11 @@ local function codegen_track(raw_track, lineset, keysets, use_tsf, target_type) elseif line.channel == animation.CH_TEXTURE then code = code .. string.format("\n target:set_texture(%s, l%d)", lineset.target_name:escape(), i) - elseif line.channel == animation.CH_CONTROL then - if lineset.flag == "visible" then - if target_type == "bone" then - code = code .. string.format("\n target:set_visible(bone_index, l%d)", i) - else - code = code .. string.format("\n target:set_visible(l%d)", i) - end + elseif line.channel == animation.CH_SHOW then + if target_type == "bone" then + code = code .. string.format("\n target:set_visible(bone_index, l%d)", i) + else + code = code .. string.format("\n target:set_visible(l%d)", i) end end end diff --git a/res/modules/internal/formats/vca.lua b/res/modules/internal/formats/vca.lua index 9ce4b6230..66f1945d7 100644 --- a/res/modules/internal/formats/vca.lua +++ b/res/modules/internal/formats/vca.lua @@ -8,7 +8,7 @@ local action_to_channel = { scale = animation.CH_SCALE, zoom = animation.CH_ZOOM, texture = animation.CH_TEXTURE, - control = animation.CH_CONTROL, + show = animation.CH_SHOW, } local curve_to_interp = { @@ -17,6 +17,10 @@ local curve_to_interp = { bezier = animation.INT_BEZIER, } +local boolean_actions = { + show = true +} + local function parse_configure(raw_track, node) if node.fps then raw_track.fps = tonumber(node.fps) @@ -118,7 +122,7 @@ local function parse_directive(node, raw_track) line.expression = node.func elseif node.curve then parse_curve(line, node) - elseif node.flag then + elseif boolean_actions[tag] then parse_boolean_frames(line, node) else parse_simple_frames(line, node)