ok, answering late but answering anyway... I havn't tested your scripts, just looked at what you reported, but here is my take on it...
first and foremost, some clarification * an image id (image.id) is a unique identifier to the image's entry in the database. It doesn't change for the whole life of the image and duplicates have different ids. you can see an image's id in the image information lib in lighttable view. As a consequence images id can be non-contiguous (if you remove an image) and thus are not good for indexing tables * darktable.collection is all the images currently selected by the collection module (not filters) it is a normal DT table, so it's index starts at 1 and ends at <number of images> it is important to follow this rules to have ipairs work correctly. This means that this index is just the index, it is NOT the image.id * darktable.action_images is the "logical images on which to act". When you press a shortcut in DT (for example to apply a colorlabel) the selected images will be affected. If there are no selected images, the image under the cursor will be affected. Lua scripts that implement shorcuts need to follow that logic, to keep the UI consistant. However, it is hard to implement that logic in lua. This table is a table of "images that my script should apply to" it should be used to implement that sort of things again it is not a hash of id, it's a table that you can iterate once this has been cleared, I don't see any bug in what you have reported. I may be wrong though, don't hesitate to reply now, you might need another API to easily access images, which can be interesting to discuss, feel free to start a new thread for that On Fri, Jan 8, 2016 at 2:23 PM, Christian <christian.kanz...@gmx.at> wrote: > Hi, > > > Am 2016-01-08 13:07, schrieb dt-l...@stefan-klinger.de: > ... > > > > > > My understanding of the (not so good) documentation is this: > > > > “`darktable.collection` Allows to access the currently worked on > > images, i.e the ones selected by the collection lib.” > > > > so this represents the collection [3] > > > > “Filtering (rating etc) does not change that collection.” > > > > Planily wrong, as can be observed by testing. > > > ... > The commend of the commit which adds dt.collection explains a bit more > what dt.collection is for [0]. It is/was planed to add dt.visible also. > > > > > > It is a bug, is it? > > > If I look at my output of your sample script this look like a bug. If I > filter for more than a specific number of images the image ID comes up: > > > --- action images --- > 1 51 /home/chri/Bilder/108_1803/IMGP2002.DNG > --- collection --- > 1 1 /home/chri/Bilder/69_2015033033_imgp9330no.jpg > 2 2 /home/chri/Bilder/69_2015033033_imgp9330no_01.jpg > 3 3 /home/chri/Bilder/69_2015033033_imgp9330no_02.jpg > 4 4 /home/chri/Bilder/IMGP0092.jpg > 5 5 /home/chri/Bilder/IMGP0695.jpg > 6 6 /home/chri/Bilder/IMGP0695_01.jpg > 7 48 /home/chri/Bilder/108_1803/IMGP1999.DNG > 8 49 /home/chri/Bilder/108_1803/IMGP2000.DNG > 9 50 /home/chri/Bilder/108_1803/IMGP2001.DNG > 10 51 /home/chri/Bilder/108_1803/IMGP2002.DNG > > > Funny ;-) > > > Stefan > > Christian > > > [0] > > https://github.com/darktable-org/darktable/commit/7dcc8c6393c78c5b5aadbf47b1e7e383d70b3778 > > > ------------------------------------------------------------------------------ > _______________________________________________ > Darktable-users mailing list > Darktable-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/darktable-users >
------------------------------------------------------------------------------
_______________________________________________ Darktable-users mailing list Darktable-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/darktable-users