mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-23 19:09:45 +00:00
add 'model' directive
This commit is contained in:
parent
26d09f750b
commit
a036a590ab
3 changed files with 4 additions and 0 deletions
|
|
@ -46,6 +46,7 @@ local M = {
|
||||||
CH_ZOOM = 4,
|
CH_ZOOM = 4,
|
||||||
CH_TEXTURE = 5,
|
CH_TEXTURE = 5,
|
||||||
CH_SHOW = 6,
|
CH_SHOW = 6,
|
||||||
|
CH_MODEL = 7,
|
||||||
|
|
||||||
INT_CONST = 1,
|
INT_CONST = 1,
|
||||||
INT_LINEAR = 2,
|
INT_LINEAR = 2,
|
||||||
|
|
|
||||||
|
|
@ -192,6 +192,8 @@ local function codegen_track(raw_track, lineset, keysets, use_tsf, target_type)
|
||||||
elseif line.channel == animation.CH_TEXTURE then
|
elseif line.channel == animation.CH_TEXTURE then
|
||||||
code = code .. string.format("\n target:set_texture(%s, l%d)",
|
code = code .. string.format("\n target:set_texture(%s, l%d)",
|
||||||
lineset.target_name:escape(), i)
|
lineset.target_name:escape(), i)
|
||||||
|
elseif line.channel == animation.CH_MODEL then
|
||||||
|
code = code .. string.format("\n target:set_model(bone_index, l%d)", i)
|
||||||
elseif line.channel == animation.CH_SHOW then
|
elseif line.channel == animation.CH_SHOW then
|
||||||
if target_type == "bone" then
|
if target_type == "bone" then
|
||||||
code = code .. string.format("\n target:set_visible(bone_index, l%d)", i)
|
code = code .. string.format("\n target:set_visible(bone_index, l%d)", i)
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ local action_to_channel = {
|
||||||
zoom = animation.CH_ZOOM,
|
zoom = animation.CH_ZOOM,
|
||||||
texture = animation.CH_TEXTURE,
|
texture = animation.CH_TEXTURE,
|
||||||
show = animation.CH_SHOW,
|
show = animation.CH_SHOW,
|
||||||
|
model = animation.CH_MODEL,
|
||||||
}
|
}
|
||||||
|
|
||||||
local curve_to_interp = {
|
local curve_to_interp = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue