Skip to content

Commit 62d460c

Browse files
committed
remove malfunctioning local edits
1 parent 1a3b8fa commit 62d460c

File tree

2 files changed

+65
-16
lines changed

2 files changed

+65
-16
lines changed

src/plugin/Database.lua

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,10 +1088,6 @@ local DataBase = {
10881088
{Command='local_Tint',Type='parameter',Translation=locadj..' '..LOC('$$$/AgDevelop/Localized/Tint=Tint')..' (PV 3+)',PV3=locadj..' '..LOC('$$$/AgDevelop/Localized/Tint=Tint'),Group=localizedAdjustments,Explanation='Adjust Tint for the currently active tool: Brush, Radial Filter, or Graduated Filter.',AltParameter='Direct'},
10891089
{Command='local_Hue',Type='parameter',Translation=locadj..' '..LOC('$$$/AgDevelop/Localized/Hue=Hue')..' (PV 5+)',PV5=locadj..' '..LOC('$$$/AgDevelop/Localized/Hue=Hue'),Group=localizedAdjustments,Explanation='Adjust Hue for the currently active tool: Brush, Radial Filter, or Graduated Filter.',AltParameter='Direct'},
10901090
{Command='local_Saturation',Type='parameter',Translation=locadj..' '..LOC('$$$/AgDevelop/Localized/Saturation=Saturation')..' ('..P2and3plus..')',PV2=locadj..' '..LOC('$$$/AgDevelop/Localized/Saturation=Saturation'),Group=localizedAdjustments,Explanation='Adjust Saturation for the currently active tool: Brush, Radial Filter, or Graduated Filter.',AltParameter='Direct'},
1091-
{Command='local_Maincurve',Type='parameter',Translation=locadj..' '..LOC('$$$/AgCameraRawUI/PointCurve=Point Curve')..' (PV 5+)',PV5=locadj..' '..LOC('$$$/AgCameraRawUI/PointCurve=Point Curve'),Group=localizedAdjustments,Explanation='Adjust Main Curve for the currently active tool: Brush, Radial Filter, or Graduated Filter.',AltParameter='Direct'},
1092-
{Command='local_Redcurve',Type='parameter',Translation=locadj..' '..LOC('$$$/AgCameraRawUI/RedPointCurve=Red Channel')..' (PV 5+)',PV5=locadj..' '..LOC('$$$/AgCameraRawUI/RedPointCurve=Red Channel'),Group=localizedAdjustments,Explanation='Adjust Red Curve for the currently active tool: Brush, Radial Filter, or Graduated Filter.',AltParameter='Direct'},
1093-
{Command='local_Greencurve',Type='parameter',Translation=locadj..' '..LOC('$$$/AgCameraRawUI/GreenPointCurve=Green Channel')..' (PV 5+)',PV5=locadj..' '..LOC('$$$/AgCameraRawUI/GreenPointCurve=Green Channel'),Group=localizedAdjustments,Explanation='Adjust Green Curve for the currently active tool: Brush, Radial Filter, or Graduated Filter.',AltParameter='Direct'},
1094-
{Command='local_Bluecurve',Type='parameter',Translation=locadj..' '..LOC('$$$/AgCameraRawUI/BluePointCurve=Blue Channel')..' (PV 5+)',PV5=locadj..' '..LOC('$$$/AgCameraRawUI/BluePointCurve=Blue Channel'),Group=localizedAdjustments,Explanation='Adjust Blue Curve for the currently active tool: Brush, Radial Filter, or Graduated Filter.',AltParameter='Direct'},
10951091
{Command='local_RefineSaturation',Type='parameter',Translation=locadj..' '..LOC('$$$/AgDevelop/Localized/RefineSaturation=Refine Sat.')..' (PV 6+)',PV6=locadj..' '..LOC('$$$/AgDevelop/Localized/RefineSaturation=Refine Sat.'),Group=localizedAdjustments,Explanation='Adjust Saturation Refinement for the currently active tool: Brush, Radial Filter, or Graduated Filter. Move the slider to the left to reduce saturation shifts.',AltParameter='Direct'},
10961092
{Command='local_Texture',Type='parameter',Translation=locadj..' '..LOC('$$$/AgDevelop/Localized/Texture=Texture')..' (PV 5+)',PV5=locadj..' '..LOC('$$$/AgDevelop/Localized/Texture=Texture'),Group=localizedAdjustments,Explanation='Adjust Texture for the currently active tool: Brush, Radial Filter, or Graduated Filter.',AltParameter='Direct'},
10971093
{Command='local_Clarity',Type='parameter',Translation=locadj..' '..LOC('$$$/AgDevelop/Localized/Clarity=Clarity')..' ('..P2and3plus..')',PV2=locadj..' '..LOC('$$$/AgDevelop/Localized/Clarity=Clarity'),Group=localizedAdjustments,Explanation='Adjust Clarity for the currently active tool: Brush, Radial Filter, or Graduated Filter.',AltParameter='Direct'},
@@ -1104,7 +1100,6 @@ local DataBase = {
11041100
{Command='local_ToningHue',Type='parameter',Translation=locadj..' '..LOC('$$$/AgDevelop/Localized/Panel/Tone=Toning')..' '..LOC('$$$/AgDevelop/Localized/ToningHue=Hue')..' (PV 3+)',PV3=locadj..' '..LOC('$$$/AgDevelop/Localized/Panel/Tone=Toning')..' '..LOC('$$$/AgDevelop/Localized/ToningHue=Hue'),Group=localizedAdjustments,Explanation='Adjust Toning Hue for the currently active tool: Brush, Radial Filter, or Graduated Filter.',AltParameter='Direct'},
11051101
{Command='local_ToningSaturation',Type='parameter',Translation=locadj..' '..LOC('$$$/AgDevelop/Localized/Panel/Tone=Toning')..' '..LOC('$$$/AgDevelop/Localized/Saturation=Saturation')..' (PV 3+)',PV3=locadj..' '..LOC('$$$/AgDevelop/Localized/Panel/Tone=Toning')..' '..LOC('$$$/AgDevelop/Localized/Saturation=Saturation'),Group=localizedAdjustments,Explanation='Adjust Toning Saturation for the currently active tool: Brush, Radial Filter, or Graduated Filter.',AltParameter='Direct'},
11061102
{Command='local_ToningLuminance',Type='parameter',Translation=locadj..' '..LOC('$$$/AgDevelop/Localized/Panel/Tone=Toning')..' '..LOC('$$$/AgCameraRawNamedSettings/SaveNamedDialog/Luminance=Luminance')..' (PV 2)',PV2=locadj..' '..LOC('$$$/AgCameraRawNamedSettings/SaveNamedDialog/Luminance=Luminance'),PV3=locadj..' '..LOC('$$$/AgCameraRawNamedSettings/SaveNamedDialog/Luminance=Luminance')..' (PV 2)',Group=localizedAdjustments,Explanation='Adjust Toning Luminance for the currently active tool: Brush, Radial Filter, or Graduated Filter.',AltParameter='Direct'},
1107-
{Command='local_PointColors',Type='parameter',Translation=locadj..' '..LOC('$$$/AgDevelop/Localized/PointColor=Point Color')..' (PV 6+)',PV6=locadj..' '..LOC('$$$/AgDevelop/Localized/PointColor=Point Color'),Group=localizedAdjustments,Explanation='Adjust Point Color for the currently active tool: Brush, Radial Filter, or Graduated Filter.',AltParameter='Direct'},
11081103

11091104
--local adjustment resets
11101105
{Command='ResetRedeye',Type='button',Translation=LOC('$$$/AgLibrary/Ops/ResetRedeye=Reset Red-Eye'),Group=localadjresets,Explanation='Delete red eye correction.'},
@@ -1122,10 +1117,6 @@ local DataBase = {
11221117
{Command='Resetlocal_Tint',Type='button',Translation=LOC('$$$/AgDevelop/Localized/ResetTitle=Reset ^1',locadj..' '..LOC('$$$/AgDevelop/Localized/Tint=Tint')..' (PV 3+)'),PV3=LOC('$$$/AgDevelop/Localized/ResetTitle=Reset ^1',locadj..' '..LOC('$$$/AgDevelop/Localized/Tint=Tint')),Group=localadjresets,Explanation='Reset to default.'},
11231118
{Command='Resetlocal_Hue',Translation=LOC('$$$/AgDevelop/Localized/ResetTitle=Reset ^1',locadj..' '..LOC('$$$/AgDevelop/Localized/Hue=Hue')..' (PV 5+)'),PV5=LOC('$$$/AgDevelop/Localized/ResetTitle=Reset ^1',locadj..' '..LOC('$$$/AgDevelop/Localized/Hue=Hue')),Group=localadjresets,Explanation='Reset to default.'},
11241119
{Command='Resetlocal_Saturation',Type='button',Translation=LOC('$$$/AgDevelop/Localized/ResetTitle=Reset ^1',locadj..' '..LOC('$$$/AgDevelop/Localized/Saturation=Saturation')..' ('..P2and3plus..')'),PV2=LOC('$$$/AgDevelop/Localized/ResetTitle=Reset ^1',locadj..' '..LOC('$$$/AgDevelop/Localized/Saturation=Saturation')),Group=localadjresets,Explanation='Reset to default.'},
1125-
{Command='Resetlocal_Maincurve',Type='button',Translation=LOC('$$$/AgDevelop/Localized/ResetTitle=Reset ^1',locadj..' '..LOC('$$$/AgCameraRawUI/PointCurve=Point Curve')..' (PV 5+)'),PV5=LOC('$$$/AgDevelop/Localized/ResetTitle=Reset ^1',locadj..' '..LOC('$$$/AgCameraRawUI/PointCurve=Point Curve')),Group=localadjresets,Explanation='Reset to default.'},
1126-
{Command='Resetlocal_Redcurve',Type='button',Translation=LOC('$$$/AgDevelop/Localized/ResetTitle=Reset ^1',locadj..' '..LOC('$$$/AgCameraRawUI/RedPointCurve=Red Channel')..' (PV 5+)'),PV5=LOC('$$$/AgDevelop/Localized/ResetTitle=Reset ^1',locadj..' '..LOC('$$$/AgCameraRawUI/RedPointCurve=Red Channel')),Group=localadjresets,Explanation='Reset to default.'},
1127-
{Command='Resetlocal_Greencurve',Type='button',Translation=LOC('$$$/AgDevelop/Localized/ResetTitle=Reset ^1',locadj..' '..LOC('$$$/AgCameraRawUI/GreenPointCurve=Green Channel')..' (PV 5+)'),PV5=LOC('$$$/AgDevelop/Localized/ResetTitle=Reset ^1',locadj..' '..LOC('$$$/AgCameraRawUI/GreenPointCurve=Green Channel')),Group=localadjresets,Explanation='Reset to default.'},
1128-
{Command='Resetlocal_Bluecurve',Type='button',Translation=LOC('$$$/AgDevelop/Localized/ResetTitle=Reset ^1',locadj..' '..LOC('$$$/AgCameraRawUI/BluePointCurve=Blue Channel')..' (PV 5+)'),PV5=LOC('$$$/AgDevelop/Localized/ResetTitle=Reset ^1',locadj..' '..LOC('$$$/AgCameraRawUI/BluePointCurve=Blue Channel')),Group=localadjresets,Explanation='Reset to default.'},
11291120
{Command='Resetlocal_RefineSaturation',Type='button',Translation=LOC('$$$/AgDevelop/Localized/ResetTitle=Reset ^1',locadj..' '..LOC('$$$/AgDevelop/Localized/RefineSaturation=Refine Sat.')..' (PV 6+)'),PV6=LOC('$$$/AgDevelop/Localized/ResetTitle=Reset ^1',locadj..' '..LOC('$$$/AgDevelop/Localized/RefineSaturation=Refine Sat.')),Group=localadjresets,Explanation='Reset to default.'},
11301121
{Command='Resetlocal_Texture',Type='button',Translation=LOC('$$$/AgDevelop/Localized/ResetTitle=Reset ^1',locadj..' '..LOC('$$$/AgDevelop/Localized/Texture=Texture')..' (PV 5+)'),PV5=LOC('$$$/AgDevelop/Localized/ResetTitle=Reset ^1',locadj..' '..LOC('$$$/AgDevelop/Localized/Texture=Texture')),Group=localadjresets,Explanation='Reset to default.'},
11311122
{Command='Resetlocal_Clarity',Type='button',Translation=LOC('$$$/AgDevelop/Localized/ResetTitle=Reset ^1',locadj..' '..LOC('$$$/AgDevelop/Localized/Clarity=Clarity')..' ('..P2and3plus..')'),PV2=LOC('$$$/AgDevelop/Localized/ResetTitle=Reset ^1',locadj..' '..LOC('$$$/AgDevelop/Localized/Clarity=Clarity')),Group=localadjresets,Explanation='Reset to default.'},
@@ -1136,7 +1127,6 @@ local DataBase = {
11361127
{Command='Resetlocal_Moire',Type='button',Translation=LOC('$$$/AgDevelop/Localized/ResetTitle=Reset ^1',locadj..' '..LOC('$$$/AgDevelop/Localized/MoireReduction=Moire')..' (PV 3+)'),PV3=LOC('$$$/AgDevelop/Localized/ResetTitle=Reset ^1',locadj..' '..LOC('$$$/AgDevelop/Localized/MoireReduction=Moire')),Group=localadjresets,Explanation='Reset to default.'},
11371128
{Command='Resetlocal_Defringe',Type='button',Translation=LOC('$$$/AgDevelop/Localized/ResetTitle=Reset ^1',locadj..' '..LOC('$$$/AgDevelop/Localized/Defringe=Defringe')..' (PV 3+)'),PV3=LOC('$$$/AgDevelop/Localized/ResetTitle=Reset ^1',locadj..' '..LOC('$$$/AgDevelop/Localized/Defringe=Defringe')),Group=localadjresets,Explanation='Reset to default.'},
11381129
{Command='Resetlocal_ToningLuminance',Type='button',Translation=LOC('$$$/AgDevelop/Localized/ResetTitle=Reset ^1',locadj..' '..LOC('$$$/AgCameraRawNamedSettings/SaveNamedDialog/Luminance=Luminance')..' (PV 2)'),PV2=LOC('$$$/AgDevelop/Localized/ResetTitle=Reset ^1',locadj..' '..LOC('$$$/AgCameraRawNamedSettings/SaveNamedDialog/Luminance=Luminance')),PV3=LOC('$$$/AgDevelop/Localized/ResetTitle=Reset ^1',locadj..' '..LOC('$$$/AgCameraRawNamedSettings/SaveNamedDialog/Luminance=Luminanz')..' (PV 2)'),Group=localadjresets,Explanation='Reset to default.'},
1139-
{Command='Resetlocal_PointColors',Type='button',Translation=LOC('$$$/AgDevelop/Localized/ResetTitle=Reset ^1',locadj..' '..LOC('$$$/AgDevelop/Localized/PointColor=Point Color')..' (PV 6+)'),PV6=LOC('$$$/AgDevelop/Localized/ResetTitle=Reset ^1',locadj..' '..LOC('$$$/AgDevelop/Localized/PointColor=Point Color')),Group=localadjresets,Explanation='Reset to default.'},
11401130

11411131
--
11421132
--local adjustment presets

src/plugin/LocalPresets.lua

Lines changed: 65 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ local LocalPresets = {} --Store presets in table when reqested by user : key =
5656

5757
local localPresetMap = {
5858
blacks2012 = "local_Blacks",
59+
bluecurve = "local_Bluecurve",
5960
clarity = "",
6061
clarity2012 = "local_Clarity",
6162
contrast = "",
@@ -64,10 +65,45 @@ local localPresetMap = {
6465
dehaze = "local_Dehaze",
6566
exposure = "",
6667
exposure2012 = "local_Exposure",
68+
grain = "local_Grain",
69+
greencurve = "local_Greencurve", -- {"#,#", "#,#", "#,#"}
6770
highlights2012 = "local_Highlights",
6871
hue = "local_Hue",
6972
luminanceNoise = "local_LuminanceNoise",
73+
maincurve = "local_Maincurve", -- {"#,#", "#,#", "#,#"}
7074
moire = "local_Moire",
75+
pointColors = "local_PointColors",
76+
--= {--just take this table and set to local_PointColors
77+
-- {
78+
-- HueRange = {
79+
-- LowerFull = 0.33,
80+
-- LowerNone = 0,
81+
-- UpperFull = 0.67,
82+
-- UpperNone = 1,
83+
-- },
84+
-- HueShift = -1,
85+
-- LumRange = {
86+
-- LowerFull = 0.7,
87+
-- LowerNone = 0.15,
88+
-- UpperFull = 1,
89+
-- UpperNone = 1,
90+
-- },
91+
-- LumScale = -1,
92+
-- RangeAmount = 0.5,
93+
-- SatRange = {
94+
-- LowerFull = 0.29,
95+
-- LowerNone = 0,
96+
-- UpperFull = 0.65,
97+
-- UpperNone = 1,
98+
-- },
99+
-- SatScale = -1,
100+
-- SrcHue = 1.312043,
101+
-- SrcLum = 0.739782,
102+
-- SrcSat = 0.473663,
103+
-- },
104+
-- }
105+
redcurve = "local_Redcurve",
106+
refineSaturation = "local_RefineSaturation",
71107
saturation = "local_Saturation",
72108
shadows2012 = "local_Shadows",
73109
sharpness = "local_Sharpness",
@@ -80,6 +116,14 @@ local localPresetMap = {
80116
whites2012 = "local_Whites"
81117
}
82118

119+
local tabular = {
120+
bluecurve = true,
121+
greencurve = true,
122+
redcurve = true,
123+
maincurve = true,
124+
pointColors = true,
125+
}
126+
83127
local function GetPresetFilenames()
84128
local filenames = { { title='', value='' }, }
85129
--Extract filename only from full paths
@@ -122,14 +166,29 @@ local function ApplyLocalPreset(LocalPresetFilename) --LocalPresetName eg: 'Bur
122166
--Apply preset to LR
123167
for param, MappedParam in pairs(localPresetMap) do
124168
local value = LocalPresets[LocalPresetName][param]
125-
if value == nil then value=0; end
126-
if MappedParam == 'local_Exposure' then
127-
value = value * 4
169+
170+
if tabular[param] then
171+
if value == nil then
172+
if param == 'pointColors' then
173+
LrDevelopController.setValue(MappedParam, {})
174+
else
175+
LrDevelopController.setValue(MappedParam, {"0,0","128,128","255,255"})
176+
end
177+
else
178+
LrDevelopController.setValue(MappedParam, value) --give them the table
179+
end
128180
else
129-
value = value * 100
181+
if value == nil then
182+
LrDevelopController.resetToDefault(MappedParam)
183+
MIDI2LR.PARAM_OBSERVER[MappedParam] = LrDevelopController.getValue(MappedParam)
184+
else
185+
if MappedParam == 'local_Exposure' then value = value * 4
186+
elseif MappedParam == 'hue' then value = value * 180
187+
else value = value * 100 end
188+
MIDI2LR.PARAM_OBSERVER[MappedParam] = value
189+
LrDevelopController.setValue(MappedParam, value)
190+
end
130191
end
131-
MIDI2LR.PARAM_OBSERVER[MappedParam] = value
132-
LrDevelopController.setValue(MappedParam, value)
133192
end
134193
end
135194
end

0 commit comments

Comments
 (0)