darktable script to show the different prefference types that are possible with the Lua
This commit is contained in:
81
contrib/preferenceExcamples.lua
Normal file
81
contrib/preferenceExcamples.lua
Normal file
@@ -0,0 +1,81 @@
|
||||
--[[
|
||||
This file is part of darktable,
|
||||
Copyright 2014 by Tobias Jakobs.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
]]
|
||||
--[[
|
||||
darktable script to show the different prefference types that are possible with the Lua
|
||||
|
||||
USAGE
|
||||
* require this script from your main lua file
|
||||
]]
|
||||
dt = require "darktable"
|
||||
dt.configuration.check_version(...,{2,0,1})
|
||||
|
||||
dt.preferences.register("preferenceExcamples", -- script: This is a string used to avoid name collision in preferences (i.e namespace). Set it to something unique, usually the name of the script handling the preference.
|
||||
"preferenceExcamplesString", -- name
|
||||
"string", -- type
|
||||
"Excample String", -- label
|
||||
"Excample String Tooltip", -- tooltip
|
||||
"String") -- default
|
||||
|
||||
dt.preferences.register("preferenceExcamples", -- script: This is a string used to avoid name collision in preferences (i.e namespace). Set it to something unique, usually the name of the script handling the preference.
|
||||
"preferenceExcamplesString", -- name
|
||||
"bool", -- type
|
||||
"Excample Boolean", -- label
|
||||
"Excample Boolean Tooltip", -- tooltip
|
||||
true) -- default
|
||||
|
||||
dt.preferences.register("preferenceExcamples", -- script: This is a string used to avoid name collision in preferences (i.e namespace). Set it to something unique, usually the name of the script handling the preference.
|
||||
"preferenceExcamplesString", -- name
|
||||
"integer", -- type
|
||||
"Excample Integer", -- label
|
||||
"Excample Integer Tooltip", -- tooltip
|
||||
2, -- default
|
||||
1, -- min
|
||||
99) -- max
|
||||
|
||||
dt.preferences.register("preferenceExcamples", -- script: This is a string used to avoid name collision in preferences (i.e namespace). Set it to something unique, usually the name of the script handling the preference.
|
||||
"preferenceExcamplesString", -- name
|
||||
"float", -- type
|
||||
"Excample Float", -- label
|
||||
"Excample Float Tooltip", -- tooltip
|
||||
1.3, -- default
|
||||
1, -- min
|
||||
99, -- max
|
||||
0.5) -- step
|
||||
|
||||
dt.preferences.register("preferenceExcamples", -- script: This is a string used to avoid name collision in preferences (i.e namespace). Set it to something unique, usually the name of the script handling the preference.
|
||||
"preferenceExcamplesString", -- name
|
||||
"file", -- type
|
||||
"Excample File", -- label
|
||||
"Excample File Tooltip", -- tooltip
|
||||
"") -- default
|
||||
|
||||
dt.preferences.register("preferenceExcamples", -- script: This is a string used to avoid name collision in preferences (i.e namespace). Set it to something unique, usually the name of the script handling the preference.
|
||||
"preferenceExcamplesString", -- name
|
||||
"directory", -- type
|
||||
"Excample Directory", -- label
|
||||
"Excample Directory Tooltip", -- tooltip
|
||||
"") -- default
|
||||
|
||||
dt.preferences.register("preferenceExcamples", -- script: This is a string used to avoid name collision in preferences (i.e namespace). Set it to something unique, usually the name of the script handling the preference.
|
||||
"preferenceExcamplesString", -- name
|
||||
"enum", -- type
|
||||
"Excample Enum", -- label
|
||||
"Excample Enum Tooltip", -- tooltip
|
||||
"Enum 1", -- default
|
||||
"Enum 1", "Enum 2") -- values
|
||||
|
||||
Reference in New Issue
Block a user