Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


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

3 Votes
LEGEND ,
Jun 17, 2013 Jun 17, 2013

Copy link to clipboard

Copied

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
Bug Fixed
TOPICS
Desktop

Views

23

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Apr 21, 2015 Apr 21, 2015
This should be fixed in Lightroom CC/Lightroom 6.

Votes

Translate

Translate
20 Comments
Adobe Employee ,
Jun 21, 2013 Jun 21, 2013

Copy link to clipboard

Copied

Hi Rob- can you elaborate what you mean by not working properly?

I am able to create virtual copies via the SDK whether I am in grid or loupe view. The virtual copies are all created properly.

Note, we do not support more than one name for a virtual copy. All virtual copies will have the same copy name when multiple photos are selected.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 21, 2013 Jun 21, 2013

Copy link to clipboard

Copied

Hi Paul,

|> "we do not support more than one name for a virtual copy"

I was only able to get multiple copies by passing multiple names, for example:

catalog:createVirtualCopies( name1, name2, name3 )

which were indeed used as I'd hoped (but in grid view only). But perhaps I/we have been calling it wrong.

Would you mind enumerating what the parameter(s) should be?

Thanks,
Rob

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 21, 2013 Jun 21, 2013

Copy link to clipboard

Copied

Hi Paul,

Just re-checked behavior (win7/64):

catalog:createVirtualCopies( name )

In grid view, with two photos selected (for example) creates 2 virtual copies (both having the specified copy name). So far so good...

However, in loupe view or develop module, the same statement only creates one virtual copy (although it does return an array of two lr-photos, it's just that only one of them is a newly created virtual copy - the other is the original master/base copy).

Is that not how it works for you? are we comparing oranges to oranges, or apples?

Rob

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jun 24, 2013 Jun 24, 2013

Copy link to clipboard

Copied

Rob that is not the behavior I am seeing. With multiple photos selected, I am seeing multiple virtual copies created (one for each selection) even when in loupe view. Do you have a a plug-in with the bare minimum to reproduce this issue? Some sample code may help (I realize it is a single call in question, but obviously we are doing something different so the context may be relevant.)

Thanks,

-paul

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 25, 2013 Jun 25, 2013

Copy link to clipboard

Copied

Test plugin here:

http://www.robcole.com/LrForumSupport...

Thanks,
Rob

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 30, 2013 Jun 30, 2013

Copy link to clipboard

Copied

Have you been able to try the test plugin? (link is in the post below)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 10, 2013 Jul 10, 2013

Copy link to clipboard

Copied

Paul,

Have you been able to run the test plugin?

Rob

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 19, 2013 Jul 19, 2013

Copy link to clipboard

Copied

Paul - you still alive?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 29, 2013 Jul 29, 2013

Copy link to clipboard

Copied

Replies here not making it through your spam filter, Paul?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 14, 2013 Aug 14, 2013

Copy link to clipboard

Copied

Knock-knock (anybody home?)...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 18, 2013 Aug 18, 2013

Copy link to clipboard

Copied

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 )

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 30, 2013 Aug 30, 2013

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 30, 2013 Aug 30, 2013

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 17, 2013 Sep 17, 2013

Copy link to clipboard

Copied

Not fixed in Lr5.2 - what happened Paul?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 01, 2014 Jan 01, 2014

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 02, 2014 Jan 02, 2014

Copy link to clipboard

Copied

Thanks D.

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

R.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 29, 2014 Apr 29, 2014

Copy link to clipboard

Copied

Not fixed in Lr5.4.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Dec 09, 2014 Dec 09, 2014

Copy link to clipboard

Copied

I've reproduced this issue. A bug has been filed.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 16, 2014 Dec 16, 2014

Copy link to clipboard

Copied

Great, thanks Paul.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 21, 2015 Apr 21, 2015

Copy link to clipboard

Copied

LATEST
This should be fixed in Lightroom CC/Lightroom 6.

Senior Product Manager - Customer Advocacy - Digital Imaging

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines