Last active
December 17, 2015 23:59
-
-
Save nitoyon/5693725 to your computer and use it in GitHub Desktop.
Get selected file size and path in Lightroom
(tested with https://github.com/nitoyon/lua-console-lightroom-plugin & Lightroom 4.3)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local LrApplication = import 'LrApplication' | |
local catalog = LrApplication.activeCatalog() | |
local size = 0 | |
local pathes = "" | |
local photos = catalog:getMultipleSelectedOrAllPhotos() | |
for k,photo in ipairs(photos) do | |
size = size + photo:getRawMetadata("fileSize") | |
pathes = pathes .. "\n" .. photo:getRawMetadata("path") | |
end | |
return string.format("%.1f MB%s", size / 1024 / 1024, pathes) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment