MA2 Lua 函数库

  1. 主页
  2. 文档
  3. MA2 Lua 函数库
  4. gma.show.getobj.amount() 【获取对象子系数量函数】

gma.show.getobj.amount() 【获取对象子系数量函数】

函数名:获取对象子系数量
调 用:gma.show.getobj.amount(number:handle)
参 数:数字:对象的handle
返回值:数字:子系数量;sequence 的子系包含“cue 0”
结 果:
备 注:获取对象handle可以使用 gma.show.getobj.handle()

例子:

  • 在控台的 System monitor 中显示“Sequence 1”程序序列1有多少程序步
function Start()
    local handle_num = gma.show.getobj.handle("Sequence 1");
    local amount = gma.show.getobj.amount(handle_num);
    gma.echo(amount);
end
return Start;
  • 在控台的 System monitor 中显示“Fixture 1”组合灯具 B-EYE K10 有多少个子系灯,多少个模型,多少个模组
function Start()
    local h = gma.show.getobj.handle('Fixture 1')
    local subfixtures = gma.show.getobj.amount(h) 
    local h = gma.show.getobj.handle('FixtureType 1.modules')
    local modules = gma.show.getobj.amount(h) 
    local h = gma.show.getobj.handle('FixtureType 1.instances')
    local instances = gma.show.getobj.amount(h)  
    gma.echo(subfixtures);
    gma.echo(modules);
    gma.echo(instances); 
end
return Start;
标签 , ,
这篇文章对您有用吗?

发表回复

您的电子邮箱地址不会被公开。