Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MY_DEFAULT_COLORS = 'M1 M2 M6 M10 M8 M12 M4 M3 M11';
- print = gma.feedback;
- cmd = gma.cmd;
- return function()
- -- Group number
- local group = tonumber(gma.textinput('Group number?', 1));
- -- Preset offset
- local offset = tonumber(gma.textinput('Preset offset?', 1));
- -- Gel colors
- local manufacturers = {
- R = 'Roscolux',
- L = 'Lee',
- M = 'MA colors'
- };
- local colors = gma.textinput('What colors do you want?', MY_DEFAULT_COLORS);
- cmd('BlindEdit On');
- cmd('ClearAll');
- for m,c in colors:gmatch('([RrLlMm])(%d+)') do
- if(m:upper() ~= 'M') then c = ("000" .. c):match('(...)$'); end; -- pad zeroes
- if(m:upper() == 'R') then c = 'R' .. c; end -- rosco fix :-(
- local gel = '"' .. manufacturers[m:upper()] .. '"."' .. c .. '"';
- cmd('Delete Preset 4.' .. offset);
- cmd('Group ' .. group .. ' At Gel ' .. gel);
- cmd('Store Preset 4.' .. offset);
- local preset = gma.show.getobj.handle('Preset 4.' .. offset);
- local name = gma.show.getobj.name(preset);
- print(name);
- cmd('Label Preset 4.' .. offset .. ' "' .. name:match('(.+) [^ ]+ [^ ]+$') .. '"');
- offset = offset + 1;
- end;
- cmd('ClearAll');
- cmd('BlindEdit Off');
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement