Skip to content

Commit 3b8e802

Browse files
authored
Merge pull request darktable-org#444 from MStraeten/patch-1
Update x-touch.lua with support for primaries slider
2 parents 1b0fe4d + f54d449 commit 3b8e802

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

examples/x-touch.lua

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ midi:C0=iop/channelmixerrgb;focus
5353
local dt = require "darktable"
5454
local du = require "lib/dtutils"
5555

56-
du.check_min_api_version("9.1.0", "x-touch")
56+
du.check_min_api_version("9.2.0", "x-touch")
5757

5858
-- set up 8 mimic sliders with the same function
5959
for k = 1,8 do
@@ -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)