when I try to open Lightroom on my PC, it answered "assertion failed". I allready tried to visit the "picture registrer" as recommanded by Adobe, and the register's name seems to be right. What more can I do? I downloaded the 30 das version and I bought the version 5 on CD.
assertion failed "Lightroom 5
Why have grey dots appeared on my photos? What do they mean? How do I remove them?
I am preparing a photo book and the images in my film strip have suddenly all acquired a grey dot. I am using OX 10.9.5 and LR 5.6.What do they mean? How do I remove them please?
How to keep a few values between calls to the menu handlers?
Hello,
I am displaying a dialog when clicking on a custom LrLibraryMenuItem.
LrLibraryMenuItems = {
title = 'My Dialog',
file = 'MyDialog.lua',
},
When I close this dialog I don't want the values in it to be lost. I cannot save them through LrPrefs because those values are usually a LrTasks or a LrProgressScope.
Maybe there is a global scope I can use throughout my plugin?
Thanks for your help again
this may seem simple, but what is the easiest, most painless way to take an LrPhoto and save it as a jpg of a specific size somewhere in the file system?
It's not really an export, but if I have to use LrExport to do it, that's fine.
Pass values from menu to plugin scripts
I wanted to operate plugin two mode in single *.lua scripts,
I know how to tell in info.lua making two menus in single plugin,
LrLibraryMenuItems = { | ||
{title = 'BLAH', | ||
file = 'BLAH.lua', | ||
enabledWhen = 'photosAvailable', | ||
}, | ||
{title = 'BLAH foeced mode', | ||
file = 'BLAH.lua', | ||
enabledWhen = 'photosAvailable', | ||
} |
Is there way to pass parameters for lua scripts from info.lua?
how to obtain values in lua scripts?
Bug: LrDate.timeFromComponents won't accept "local" as timeZone
The LR 3.0 SDK API Reference says about the "timeZone" parameter of LrDate.timeFromComponents:
But in fact, passing "local" or true as the timeZone is treated the same as UTC. You need to pass the value of LrDate.timeZone (). I've reported this.
catalog:getTargetPhotos does not acknowlege missing photos!
catalog:getTargetPhotos does not acknowlege missing photos! - they're just skipped over whether selected or not!
This is bad. Makes it darn hard to write plugins to resolve missing photo problems!
Actually, its worse than that - its returning photos that are not even selected, nor are even in the filmstrip!
Please - maybe: catalog:getTargetPhotos{ includeMissingPhotos=true }
UPDATE: There is a saving grace: the missing photos are included in catalog:getAllPhotos(). This is not ideal, since user does not necessarily want to do all photos, but at least it can be used to work around.
R
Displaying the Title for Export Context / Progress Scope
I'm creating a publish service plugin and right now I'm writing the processRenderedPhotos function. I've followed several examples of setting the progress title, but I can't seem to get it to work. I also tried loading the sample flickr plugin that comes with SDK, but when I try to upload photos to my flickr account, the title that is implemented in the code doesn't seem to work either. Here's the line of code from the sample flickr plugin:
local progressScope = exportContext:configureProgress { title = nPhotos > 1 and LOC( "$$$/Flickr/Publish/Progress=Publishing ^1 photos to Flickr", nPhotos ) or LOC "$$$/Flickr/Publish/Progress/One=Publishing one photo to Flickr", }
That code is in the FlickrExportServiceProvider.lua starting on line 774.
So far in my code, I don't have the code logic that actually uploads the photos. the only thing that shows up in lightroom is a progress bar that says "Upading Published collections" and then one that says "downloading comments". has anyone been able to get this to work? Thanks in advance.
Add selected photos to new collection
Probably a newby question, but how can I add selected photos to a new collection.
Reading the SDK doc:
- catalog:getTargetPhotos()
Return value
(array of LrPhoto) The photos. - collection:addPhotos( photos ):
Parameters
photos (array of LrPhoto) The photo objects.
To me catalog:getTargetPhotos() returns a array of LrPhoto and collection:addPhotos askes for an array of LrPhoto.
Yet I always get "An internal error has occurred: assertion failed".
Where do I go wrong?
I'm running the code below on an Windows XP SP3 machine with Lightroom 3.6
local LrTasks = import 'LrTasks'
local catalog = import "LrApplication".activeCatalog()
local LrFunctionContext = import 'LrFunctionContext'
local LrProgressScope = import 'LrProgressScope'
local LrDialogs = import 'LrDialogs'
local myLogger = import 'LrLogger'( 'AddImages' )
myLogger:enable( "logfile" )
function AddImagesToCollection()
LrTasks.startAsyncTask(function()
catalog:withWriteAccessDo( "Test", function()
local test1Collection = catalog:createCollection( "Test_1 Collection", nil, true )
local cat_photos = catalog.getTargetPhotos()
local nCountSelected = #cat_photos
myLogger:trace( 'number selected photos:', #cat_photos)
test1Collection:addPhotos{ cat_photos }
end)
end)
end
AddImagesToCollection()
ordinal position of images in catalog (which is the same as the filmstrip order?)
i'm using LrTasks to getAllPhotos in hopes of putting some image navigation inside my plugin module. i can get a list of images this way and even use them for my in-plugin navigation, but the order of the images is different from the order in the Lightroom "filmstrip" (or whatever that thing at the bottom of lightroom's main window is called). question: how do i get the ordinal position of images in that filmstrip using the SDK/API?
Issue with simple_list not allowing clicks
Hello,
I created a simple plugin to upload photos to meetup.com from lightroom. Since LR5, some users have complained that everything works for authentication, but when they try to select an option from a simple_list, the option appears unclickable.
It works great on my OS X install of lightroom 5. The people that complain seem to have Windows 7 64bit in common, although I'm not certain that's the cause or just a coincidence. Has anyone had this issue, and if so, any suggestions for repair?
Here is the download location of the plugin for those interested in testing: http://24moves.com/_lightup/
Thanks for any suggestions!
How do I revert back to my original LR
I ran a trial version of Adobe CC and now I can't get back to my original LR 5 version. It will open, but when I go to developer module it says I have to update/purchase the creative cloud version. How can I simply use my original boxed version?
"We can only wait from within a task" when calling LrTasks.execute?
I'm trying to write a plug-in that lives off the Library menu and calls out to an external application to do various activities based on the selected images in the library. I've got my dialog designed, am able to detect what images are selected, and am successfully building up the command line to the application I want to call.
Unfortunately, my call to LrTasks.execute results in the following error when run:
"We can only wait from within a task".
All the samples I've found in the forum don't seem to be doing anything special, they just call LrTasks.execute(commandLine). Can someone help me understand what I'm missing here?
Thanks!
Neil
Lightroom processes for ages after withProlongedWriteAccessDo
Hi,
I am considering a switch from Expression Media to Lightroom, and I wrote for that a Lightroom plugin that imports all my metadata from an EM XML file. Functionaly, it works great.
However, I have a performance issue problem: if I run the plugin on my whole photo collection (>30.000 items), then Lightroom gets crazy with the CPU and the memory after once my code returns.
The processing time seems exponential. If I run the plugin with 1.000 items, the return is almost instantaneous. On 5.000 items, it takes several minutes. With 30.000 items, it still wasn't finished after 30min, I killed Lightroom.
My guess is that Lightroom does some kind of post-processing, or maybe that's because Lightroom prepares the "undo".
Is that a known problem ?
Here is the skeleton of my code. Once doStuff2 returns, Lightroom does who knows what, and then doStuff returns too. This time seems exponential with the number of database changes my code causes.
function doStuff2(context, progress) local catalog = LrApplication.activeCatalog() local photos = catalog:getTargetPhotos() parseXml() for completed, photo in ipairs( photos ) do if progress:isCanceled() then return end photo:addKeyword(...) setMetadata(...) end function doStuff() local catalog = LrApplication.activeCatalog() catalog:withProlongedWriteAccessDo( { title="Import from Expression Media", func=doStuff2, caption="Initializing plugin", pluginName="Expression Media Import", optionalMessage = "The plugin will first read your Expression Media XML file and then import the data into Lightroom for " .. ( # catalog:getTargetPhotos() ) .. " photos" }) end import 'LrTasks'.startAsyncTask( doStuff )
thumbnail orientation
I notice that when I generate thumbnails from a catalog, they're frequently oriented wrong (rotated 90, -90, or 180 degrees). Is there something I can look for in the metadata for an image to give me guidance for rotating the image such that it is oriented correctly? I'm using Rob Cole's function to generate the thumbnails:
Here is a function to read preview images from active catalog
Export - Import
Hi I'd like to export files and have my program view the files and then add stars, flags, keywords, to the images.
When these images are imported back into lightroom I need this information visible in lightroom. Is this possible?
Feature Request: programmable thumb icon
'Twould be nice if a plugin could have a tiny little square alongside the Lightroom native icons in the thumbs to indicate stuff.
I'd settle for one per plugin...
Advice using getChildCollectionSets
Hi All -- I'm a newbie to the LR SDK and Lua and was hoping for a little advice using catalog:getChildCollectionSets.
First off, is there an easy way to get the length of the array returned? I know I can loop thru a For statement and also see that table:getn is not supported. Just wondering if there was an easier way.
Next - any advice or sample code calling this in LrTasks async statement. I was able to set this up and access the getChildCollectionSets returned array within the async loop, but not sure how to access it outside since it is async and timing/scope (i.e., testing when the async call is finished). A small snippet of code would be appreciated.
Thanks....Randy
remove cookies from LrHttp.post request?
is there any way to remove default cookies from a LrHttp post request?
It appears that LrHttp.post by default will set all cookies that have been received in previous requests. I've tried setting custom headers like this:
local headers = {
{ field = 'Content-type', value = 'application/x-www-form-urlencoded' },
{ field = 'Cookie', value = 'nocookies' },
}
but this will simply append the 'nocookies' value at the end of the cookie string. Setting an empty string or nil doesn't work either, so there doesn't appear to be a way to do a post and force no cookies to be passed.
I can't seem to change the value of an existing cookie either. For example if the cookie I received had the value:
session=abc; name=peter;
and I set a header: { field = 'Cookie', value = 'session=def'}
it will ultimately send a request with Cookie header:
Cookie: session=abc; name=peter;session=def
This makes it pretty much impossible to do anything useful with cookies for the post request. Or am I missing something here?
any suggestions appreciated,
Peter
Find Photos by capture time?
I'm having a bit of trouble finding photos by capture time. It seems that catalog:findPhotos() works on captureDate, but not time.
I have a photo that I know the date is 2010-11-28 02:10:00 - I can do a getAllPhotos() and dump the capture time to verify.
This works:
local catalog = import 'LrApplication'.activeCatalog()
local foundPhotos = catalog:findPhotos {
searchDesc = {
{
criteria = "captureTime",
operation = "in",
value = "2010-11-27",
value2 = "2010-11-29",
},
}
}
This doesn't:
searchDesc = {
{
criteria = "captureTime",
operation = "=",
value = "2010-11-28",
},
nor does:
value = "2010-11-28T02:10:00",
or does any other variant I've tried, and I've tried all the sqllite query formats for date time. In fact, I can't find any solution that a "=" criteria works for captureTime.
This is pretty big for my plugin... can anyone help? Please?