Skip to main content
areohbee
Legend
Jun 17, 2013 8:13 AM UTC
Released

P: SDK: catalog:createVirtualCopies only works properly in grid view.

When more than one photo is selected, and more than one copy name is passed, I mean, in Windows anyway, maybe Mac too.

First off, I realize the SDK v5 has not been released, so if this bug report is premature, just ignore it.

That said, I wanted to report ASAP in the hopes that it will be fixed before SDK 5 is released, if applicable.

Problem is, plugin has no official way of assuring Lr is in grid mode. So createVirtualCopies needs to be fixed, or we need a way to force grid view, or both.

Again, my apologies in advance: I acknowledge this is an undocumented function.

Rob

This topic is closed to new replies. Start a new post to keep the conversation going.

20 replies

Legend
Apr 21, 2015 6:21 PM UTC
This should be fixed in Lightroom CC/Lightroom 6.
Translate
johnrellis
Legend
Dec 17, 2014 7:06 AM UTC
Great, thanks Paul.
Translate
Participating Frequently
Dec 9, 2014 7:41 PM UTC
I've reproduced this issue. A bug has been filed.
Translate
areohbee
areohbeeAuthor
Legend
Apr 30, 2014 1:24 AM UTC
Not fixed in Lr5.4.
Translate
areohbee
areohbeeAuthor
Legend
Jan 3, 2014 12:33 AM UTC
Thanks D.

I'm not sure why we're getting the silent treatment.

R.
Translate
Inspiring
Jan 1, 2014 9:28 AM UTC
I ran the script from Rob as listed above.

This problem is not solved in 5.3 version.

I tested it with 3 different computers:
1: Windows 7 Home Home Premium Edition
2: MacBook Air 11"
3: Laptop Windows 8.0

Conclusion:
1) On all three computers the test fails
2) On each computer the fail situation is different!!

Please solve this bug, because my plug-in relies on this great functionality!
Contact me if you need more info.

Computer 1: Windows 7
Loupe: Not Ok, failded
Grid: Ok.
Develop: Ok.

Lightroom version: 5.3 [938183]
Operating system: Windows 7 Home Premium Edition
Version: 6.1 [7601]
Application architecture: x64
System architecture: x64
Logical processor count: 8
Processor speed: 3,4 GHz
Built-in memory: 8173,1 MBWindows 7:

Computer 2: MacBook Air
Loupe: Not Ok, failed
Grid: Ok.
Develop: Not Ok, failed

Lightroom version: 5.3 [938183]
Operating system: Mac OS 10
Version: 10.9 [0]
Application architecture: x64
Logical processor count: 4
Processor speed: 1,7 GHz
Built-in memory: 4096,0 MB
Real memory available to Lightroom: 4096,0 MB

Computer 3: Laptop Windows 8
Loupe: Ok
Grid: Ok.
Develop: Not Ok, failed

Lightroom version: 5.3 [938183]
Operating system: Windows 8 Home Premium Edition
Version: 6.2 [9200]
Application architecture: x64
System architecture: x64
Logical processor count: 8
Processor speed: 2,3 GHz
Built-in memory: 6029,6 MB
Real memory available to Lightroom: 6029,6 MB
Real memory used by Lightroom: 629,8 MB (10,4%)
Virtual memory used by Lightroom: 606,4 MB
Translate
areohbee
areohbeeAuthor
Legend
Sep 17, 2013 10:44 PM UTC
Not fixed in Lr5.2 - what happened Paul?
Translate
areohbee
areohbeeAuthor
Legend
Aug 30, 2013 10:46 AM UTC
Thanks for checking D. I'm surprised it works for you in develop module - I just double-checked, 2 selected, got this:

Not sure why the results would not be the same for us, but regardless - there's definitely a bug... - thanks again, R.
Translate
Inspiring
Aug 30, 2013 10:34 AM UTC
Hi Rob, I ran your test and my results are:
Library Grid: 2 selected -> 2 Virtual copies created: test Ok
Library Loupe: 2 selected -> 1 Virtual copy created: test NOT Ok
Develop: 2 selected -> 2 Virtual copies created: test Ok

So yes, I support your point!

My system:
Windows 7-64 bits
Lightroom version: 5.0 [907681]
Operating system: Windows 7 Home Premium Edition
Version: 6.1 [7601]
Application architecture: x64
System architecture: x64
Translate
areohbee
areohbeeAuthor
Legend
Aug 18, 2013 9:24 AM UTC
Just double-checked that the test plugin is downloading OK. In any case, here is the guts of it:

local LrDialogs = import 'LrDialogs'

local LrTasks = import 'LrTasks'
local LrFunctionContext = import 'LrFunctionContext'
local LrApplication = import 'LrApplication'
local LrFileUtils = import 'LrFileUtils'

LrFunctionContext.postAsyncTaskWithContext( "CreateVirtualCopyTest", function( context )

LrDialogs.attachErrorDialogToFunctionContext( context )

local catalog = LrApplication.activeCatalog()
local targets = catalog:getTargetPhotos()
if #targets < 2 then
LrDialogs.message( "This test requires multiple photos." )
return
end
if #targets > 10 then
LrDialogs.message( "This test requires 10 or less target photos." )
return
end

for i, photo in ipairs( targets ) do
if photo:getRawMetadata( 'isVirtualCopy' ) then
LrDialogs.message( "Selected photos must not be virtual copies" )
return
end
end

local answer = LrDialogs.confirm( "Go? (" .. #targets .. " photos are selected)" )
if answer == 'ok' then
-- fine
else
LrDialogs.message( "canceled" )
return
end

local copies = catalog:createVirtualCopies( "CreateVirtualCopyTest" )
if #copies ~= #targets then
LrDialogs.message( "wrong number of copies created" )
return
end
for i, photo in ipairs( copies ) do
if not photo:getRawMetadata( 'isVirtualCopy' ) then
LrDialogs.message( "Test failed - '" .. photo:getRawMetadata( 'path' ) .. "' is not a virtual copy." )
return
end
end

LrDialogs.message( "Test passed - all copies are virtual.", "I bet you're in grid view(?) - now try it in loupe view or develop module - I bet it will fail (always fails on my setup anyway), or at least if you're testing it in Windows - may not fail on Mac: dunno." )

end )
Translate