Skip to content

Commit 5f29211

Browse files
authored
Update x-touch.lua with support for primaries slider
maps knobs to the primaries sliders requires darktable 4.6.x
1 parent 025f429 commit 5f29211

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

examples/x-touch.lua

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,20 @@ for k = 1,8 do
9696
"purple",
9797
"magenta" }
9898
element = e[k]
99-
99+
100+
101+
-- if the sigmoid rgb primaries is focused,
102+
-- check sliders
103+
elseif dt.gui.action("iop/sigmoid", "focus") ~= 0 and k <8 then
104+
local e = { "red attenuation", "red rotation", "green attenuation", "green rotation", "blue attenuation", "blue rotation", "recover purity" }
105+
which = "iop/sigmoid/primaries/"..e[k]
106+
107+
-- if the rgb primaries is focused,
108+
-- check sliders
109+
elseif dt.gui.action("iop/primaries", "focus") ~= 0 and k >=1 then
110+
local e = { "red hue", "red purity", "green hue", "green purity", "blue hue", "blue purity", "tint hue", "tint purity" }
111+
which = "iop/primaries/" ..e[k]
112+
100113
-- if the tone equalizer is focused,
101114
-- select one of the sliders in the "simple" tab
102115
elseif dt.gui.action("iop/toneequal", "focus") ~= 0 then

0 commit comments

Comments
 (0)