lua API changes in darktable 3.0

The following additions have been made to the lua API:

Darkroom

darktable.gui.views.darkroom.display_image() returns the image currently displayed in darkroom mode.

darktable.gui.views.darkroom.display_image(image) displays the specified image in darkroom mode. If the current view is not darkroom mode, then darkroom mode is activated.

Lighttable

darktable.gui.libs.lighttable_mode.layout() changes the lighttable layout to file manager, zoomable light table, or culling. If no argument is supplied, the current layout is returned.

darktable.gui.libs.lighttable_mode.zoom_level() changes the zoom level of the current layout. if no zoom level is supplied, then the current zoom level is returned.

darktable.gui.libs.filter.sort() changes the sort by field in lighttable view. If no argument is supplied, the current value of the sort by combobox is returned.

darktable.gui.libs.filter.sort_order() set the sort order to ascending or descending. If no order is supplied, the current order is returned.

darktable.gui.libs.filter.rating() changes the view combobox to one of the star ratings, all, unstarred only, rejected only, or all except rejected. If no argument is supplied, the current setting is returned.

darktable.gui.libs.filter.rating_comparator() changes the rating comparison to one of equal, not equal, less than or equal, less than, greater than or equal or greater than. If no argument is supplied, then the current value is returned.

Panels

darktable.gui.panel_visible() returns true if the specified panel is visible, otherwise false.

darktable.gui.panel_hide() hides the specified panel.

darktable.gui.panel_show() shows the specified panel.

darktable.gui.panel_hide_all() hides all panels.

darktable.gui.panel_show_all() shows all panels.

Demonstration Code

There are example scripts showing how to use the new functions in the Lua Scripts Repository in the examples section.

Merry Christmas,

Bill

6 Likes