@gofer
Confirmed. (haven't tested with EEL or Python)
Very nice Airon!
Here's a little optimization thing:
Code:
function runloop()
if gfx.mouse_cap&1 == 1 then
if not mouse.down then
-- The Reaper action is here
OnMouseDown()
end
elseif mouse.down then
OnMouseUp()
end
local c=gfx.getchar()
-- capture mouse x-pos movements
mouse.moving = mouse.mx ~= gfx.mouse_x -- true, if mouse x position changed
mouse.mx = gfx.mouse_x
-- detect selection context
---[[ -- which does not work yet
--if reaper.GetCursorContext2() == 0 then
if reaper.GetCursorContext() == 0 then
item_apply = 0 ; track_apply = 1
elseif reaper.GetCursorContext() == 1 then
item_apply = 1 ; track_apply = 0
--else
-- item_apply = 0 ; track_apply = 1 -- fall back on track colouring.
end
selection_context = (-1) * item_apply + track_apply
if last_selection_context ~= selection_context then
--something's changed, let's redraw
draw_indicate_controls()
end
last_selection_context = selection_context
--]]
-- Mouse + modifiers to change the three parameters
-- saturnation, maximum luminosity and minimum luminosity
if (gfx.mouse_cap&2 == 2) and mouse.moving then -- right-mouse button clicked down
.
.
.