Working with modules from Lua scripts in darktable

okay, can I find the list of names and corresponding decimal values in your source code on github?

currently I get negative values, it seems not to be an index value.

It is the index * -1 (in order to distinguish the first index from 100%).

Not my source code, the source code of dt. Usually for me the easiest way to find a combo entry is to search for its ā€œnameā€ over the whole source. You can do this by going to GitHub - darktable-org/darktable: darktable is an open source photography workflow application and raw developer and pressing the ā€œ.ā€ (full stop) key. This starts visual studio code web edition and you can then do a full search using the third icon on the top left.

1 Like

Hi,

are there any MacOS users using scripts like this?

There is an issue on github:

dt.gui.action(ā€œiop/exposure/exposureā€,0,ā€œbuttonā€,ā€œonā€,1.0000)

leads to a segmentation fault and crash of darktable on MacOS 12.2.1. Is that a known problem?

@dterrahe did you here about that segmentation fault?

If not, I would create a dt issue.

No, didnā€™t know about it.

When opening an issue, please address the following questions:
Does the same segfault happen when enabling other color pickers via dt.gui.action or is it just exposure/exposure?
If the latter, does it work correctly when toggling the button using the mouse or are there sometimes crashes then too?

There is a new version of the Initial Workflow Module script, you can find it here:

This release offers some bugfixes, new options and a configurable timeout handling. The readme describes it in more detail. It should work with dt 4.2.1 and 4.3.0-1486

Have fun!

5 Likes

I actually tried it last nightā€¦works great. One thing was weird at first. I downloaded the script and then a zip of the git and copied the script to my lua folder.

It was not in the script manager and it would not preview in file explorer.

I did a few things to try to figure out what was going onā€¦

Win 11 had detected that the file was not from my computer and had blocked it.

I am not sure what does or does not trigger thisā€¦

I went in to the properties and selected unblock and applied and then things were normalā€¦

I thought at first that copying it over the previous version had somehow failed but that was not itā€¦ in any case ā€¦something to check for Windows users if you see the script not available when you think it should be ā€¦ :slight_smile:

The lua script was blocked, or all git content?

Perhaps .lua files are detected as dangerous script files? Perhaps Win11 protects your script folder in AppLocalData?

What happens if you just copy the .lua file?

Ya that is what I did actuallyā€¦ just copy and it doesnā€™t say anything unless you go into properties and there it says windows has blocked it because it came from another computer.

It allows unblock and then everything works fineā€¦

Thanks for this great addition to dt, I tried it yesterday on MacOS and it works fine. I had a crash when I set it to work on 25 images, dt still does that from time to time. I am using the dev build.
Would it be possible to add input color profile to the list? Depending on the software used to import from the card (photo mechanic is the culprit), dt sets it to rec709 instead of rec2020. Using a style does not work until I compress the history stackā€¦
I still use PM because I need to sort and cull before importing. Digikam is great but not for that.
Sorry for the ramble, your script is great as it is already and could be a basis for a permanent add-on to dt.

2 Likes

Are you talking working profile??

No, input color profile.

@Ulrich_Gesing can you add a check to make sure you are in darkroom view before applying darkroom actions?

1 Like

Yes: The buttons donā€™t make any sense in the lighttable view, Iā€™ll lock them.

But I would agree: darktable shouldnā€™t crash no matter what a script does. The automation facade should protect the application.

I just wondered why it would be either ā€¦are you talking about raw filesā€¦ would they not be stand or enhanced matrix?? I know some people use rec2020 as a tweak in place of a input profile when dealing with blue lights but are you saying you use it for your input profile??

Should be fixed in master

I can confirm that: There is no crash with dt 4.3.0+1565

There is a new bugfix release, buttons are enabled depending on darktable view. You can find it here:

3 Likes

I tried the updated script over the weekend. Works great. With a delay of 2000, I donā€™t get skipping of images anymore. Thanks for the hard work!

1 Like

The script works perfectly. It would be great to have the option to create presets with the parameters depending the set of images to develop.