Skip to content

Commit

Permalink
Merge pull request #200 from capricorn8/master
Browse files Browse the repository at this point in the history
Changes contributing to the release content of v2.1.0
  • Loading branch information
capricorn8 authored Jan 27, 2025
2 parents ad6e594 + 201e5e5 commit 1279715
Show file tree
Hide file tree
Showing 424 changed files with 12,979 additions and 9,797 deletions.
36 changes: 28 additions & 8 deletions focuspoints.lrdevplugin/FocusPoint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
local LrSystemInfo = import 'LrSystemInfo'
local LrFunctionContext = import 'LrFunctionContext'
local LrApplication = import 'LrApplication'
local LrApplicationView = import 'LrApplicationView'
local LrDialogs = import 'LrDialogs'
local LrView = import 'LrView'
local LrColor = import 'LrColor'
Expand All @@ -37,8 +38,23 @@ local function showDialog()
local photoView = nil
local dialogScope = nil
local rendererTable = nil

-- throw up this dialog as soon as possible as it blocks input which keeps the plugin from potentially launching
local switchedToLibrary = nil

-- only on WIN (issue #199):
-- when launched in Develop module switch to Library to enforce that a preview of the image is available
-- must switch to loupe view because only in this view previews will be rendered
-- perform module switch as early as possible to give Library time to create a preview if none exists
if WIN_ENV then
local moduleName = LrApplicationView.getCurrentModuleName()
if moduleName == "develop" then
LrApplicationView.switchToModule("library")
LrApplicationView.showView("loupe")
switchedToLibrary = true
LrTasks.sleep(2.5) -- timing-specific; might need to be increased on certain systems. Perhaps make it configurable?
end
end

-- throw up this dialog as soon as possible as it blocks input which keeps the plugin from potentially launching
-- twice if clicked on really quickly
-- let the renderer build the view now and show progress dialog
LrFunctionContext.callWithContext("innerContext", function(dialogContext)
Expand All @@ -50,7 +66,7 @@ local function showDialog()
functionContext = dialogContext,
}
dialogScope:setIndeterminate()

if (targetPhoto:checkPhotoAvailability()) then
local photoW, photoH = FocusPointDialog.calculatePhotoDimens(targetPhoto)
rendererTable = PointsRendererFactory.createRenderer(targetPhoto)
Expand All @@ -59,21 +75,21 @@ local function showDialog()
if photoView == nil then
errorMsg = "No Focus-Point information found"
end
else
else
errorMsg = "Unmapped points renderer"
end
else
else
errorMsg = "Photo is not available. Make sure hard drives are attached and try again"
end
end)
LrTasks.sleep(0) -- this actually closes the dialog. go figure.

-- by displaying the error outside of the dialogContext, it allows the progress dialog to close
if (errorMsg ~= nil) then
LrDialogs.message(errorMsg, nil, nil)
return
end

if (dialogScope:isCanceled() or photoView == nil) then
return
end
Expand All @@ -86,7 +102,11 @@ local function showDialog()
contents = FocusPointDialog.createDialog(targetPhoto, photoView)
}
rendererTable.cleanup()


if WIN_ENV and switchedToLibrary then
LrApplicationView.switchToModule("develop")
end

end)
end

Expand Down
2 changes: 1 addition & 1 deletion focuspoints.lrdevplugin/Info.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ return {
},
},

VERSION = { major=2, minor=0, revision=0, build=1, },
VERSION = { major=2, minor=1, revision=0, build=0, },

LrPluginInfoProvider = 'FocusPointsInfoProvider.lua',

Expand Down
Binary file modified focuspoints.lrdevplugin/bin/exiftool.exe
Binary file not shown.
6 changes: 3 additions & 3 deletions focuspoints.lrdevplugin/bin/exiftool/README
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ your home directory, then you would type the following commands in a
terminal window to extract and run ExifTool:

cd ~/Desktop
gzip -dc Image-ExifTool-13.10.tar.gz | tar -xf -
cd Image-ExifTool-13.10
gzip -dc Image-ExifTool-13.15.tar.gz | tar -xf -
cd Image-ExifTool-13.15
./exiftool t/images/ExifTool.jpg

Note: These commands extract meta information from one of the test images.
Expand Down Expand Up @@ -167,7 +167,7 @@ for calculating digest values and providing other features listed below:

COPYRIGHT AND LICENSE

Copyright 2003-2024, Phil Harvey
Copyright 2003-2025, Phil Harvey

This is free software; you can redistribute it and/or modify it under the
same terms as Perl itself.
Expand Down
Loading

0 comments on commit 1279715

Please sign in to comment.