Quantcast
Channel: Adobe Community : Popular Discussions - Lightroom SDK
Viewing all 53524 articles
Browse latest View live

trouble with withWriteAccessDo

$
0
0

I'm trying to create and add a keyword and I'm consistently getting

 

LrCatalog:withWriteAccessDo: could not execute action 'SetKeywords'. It was blocked by another write access call, and no timeout parameters were provided.

 

my code looks like this

 

 

     import 'LrTasks'.startAsyncTask(                                                                                                        LrCatalog:withWriteAccessDo('SetKeywords',                                                                                         function(context)                                                            local myKeyword = catalog:createKeyword( 'XYZA: test', {}, true, nil  )                                                            photo:addKeyword(myKeyword )                                                       end                                                  )     

 

 

 


How would I even provide a timeout parameter or is that a red herring? (apologies for the way this code looks but i cannot figure out this wysiwyg editor and  i just want to insert code)


FTP appears to be broken with upgrade to High Sierra.

$
0
0

I've just upgraded to OS X High Sierra and my publish plugin has stopped working. It appears to connect but fails when trying to put a file. Some research shows that Apple seem to have ditched FTP entierly in favour of SFTP. I can't be sure that this is what's at the root of the issue however no code has been touched since the last time it was working, before the OS X upgrade. Lightroom is fully up to date.

 

I'm now testing using MAMP locally and I know these things:

 

* The plugin can LrFtp.create() to the MAMP ftp server but dies in putFile  - I've had doubts in the past about how reliable the return from create() is; it may not be correctly creating.

* In a terminal I can sftp to the MAMP ftp server - ftp no longer exists in the bash search path so who knows. However ...

* Using the Transmit client, I can no longer FTP to the MAMP server but I can SFTP to it.

* If I set 'sftp' protocol in LrFTP.create() it fails with the not very helpful message "connection to the server failed"

* LrFtp isn't very helpful when things go wrong, beyond saying, more or less, "something has gone wrong."

 

At this point I'm stumped. If anyone has any thoughts they'd be much appreciated.

 

thanks.

Hiding a tab?

$
0
0

I'd like to show a tab view in a dialog with different amount of tabs depending on some variable.

However, the following code does not seem to work, it always shows two tabs (i.e. the visible -variable in the second tab_view_item is ignored).

 

f:tab_view {
     f:tab_view_item {
          visible = true,
          title = "Tab 1",
          identifier = "Tab1",
          f:static_text {
               title = "Some text to show"
          },
     },
     f:tab_view_item {
          visible = false,
          title = "Tab 2",
          identifier = "tab2",
     },

},

 

 

Is the syntax correct or is there any other way to make a tab with dynamically set number of tabs?

 

Thank you,

Keijo K.

Flag for commented photos

$
0
0

Hello,
I have a plugin where we can add a comment on a photos.
These comments are on the comment panel of lightroom.

 

I heard about a flag to show which photos are commented?
Is there any solution that allow us to have a good visualisation of the commented photos?

 

 

For the moment, the users need to go through all the photos to find the ones commented.

 

Thank you very much,

All the best
Martin

Use plug-in metadata for file renaming?

$
0
0

Hi there,

 

I'm writing a plug-in that adds a new export method to Lightroom and that defines some plug-in metadata fields.  I'd like the users to use these metadata fields to define their file renaming pattern in the export dialog. That means I'd like to create a token pattern from a plug-in metadata field.

 

Is there a way to accomplish this?

 

Regards,

Robin

Lightroom 6 SDK Changes

$
0
0

It seems that there are new classes with LR6:

 

LrDevelopController

LrApplicationView

LrSelection

LrSlideshow

LrSounds

LrTether

LrUndo

 

For my purposes, LrDevelopController sounds promising

 

Jarno

Moving files using the Lightroom SDK

$
0
0

I've been playing with the Lightroom SDK and I'm trying to move files within Lightroom.

I can use the SDK to create a folder and move the file into it but Lightroom does not know the file has moved.

Is there a way to tell Lightroom the files has moved using the SDK?

Get Quick Collection, set target collection

$
0
0

Two questions in one:

 

How do I get the Quick Collection? I can get a string id using catalog.kQuickCollectionIdentifier but I can't figure out how to use it. getCollectionByLocalIdentifier doesn't seem to do the trick.

 

There doesn't seem to be an obvious way to set the target collection programmatically. Is there a way?

 

 

thanks.


How to open XML file to string in a LightRoom plugin?

$
0
0

I need to:

1) Open a XML file to a Lightroom's String

2) Parse some data from It with LrXml

3) Show to the user

 

I Don't have any ideas to do the first point, please help me.

Access issue Lightroom catalog

$
0
0

Dear Adobe-Team, Dear Community,

 

I am a member of a team developing a program on OS X that needs access to the Lightroom catalog (lrcat). From the lrcat we read some information for further plugin exports. To retrieve these informations we handle the lrcat as SQL database and do some SQLite queries. The results we need will be delivered by these queries as output data and will be used for further processes by our export-plugin.

 

If we are access the lrcat and request our SQLite queries under prior OS X versions and an running Lightroom CC instance everything works fine. But if we are working on the newest OS X El Capitan versions and Lightroom is running we are not able to access the lrcat anymore. The lrcat is locked until Lightroom will be closed.

 

Does anyone still noticed a related problem? Does Lightroom changes anything on it's lrcat access under the newest OS X versions?

 

Thanks in advance

LrFileUtils.createDirectory and Windows environment variable paths

$
0
0

I am trying to use the Windows %TEMP% environment variable to create a directory for myself, but cannot get it to parse the %TEMP%.

 

something like

tempPath = '%TEMP%\\my_temp'

LrFileUtils.createDirectory( tempPath )

 

but it doesn't work.  I've tried every which way to escape the %.  Anyone have any ideas?!?!

 

-Brian

getDevelopSettings().Exposure2012 returns -999999

$
0
0

In my Relative adjustments plug-in I use the getDevelopSettings() to get the original values for, for example, Exposure2012.

 

One client had a problem and diving into this I discovered that when, for example when retrieving the Exposure setting, in some cases LR returns -99999 instead of the real values. Although, when navigating to the image, the settings in de Basic panel are correct.
This client is on LR5.

 

Reproduce:

  1. Run the test plug-in below on a large folder (> 200) with RAW files
    Sometimes the error occurs direct, sometimes after applying a setting on a undeveloped image.
  2. Otherwise
    1. (Create a new catalog, Best to experiment on a new catalog)
    2. Import 200 - 300 RAW photos
    3. Select them all and apply Auto-Tone to all of them (Library module & Grid) -> Right mouse click -> Develop settings -> Auto tone.
    4. Run the code below and see what's in the log file.

On some photos this -99999 is returned and on others not. Mostly on photos not visible on screen.

When in Develop mode, I scroll through all the photos manually, then afterwards it seems fine. Caching problem??

 

Questions:

  • Any tips & tricks how to solve this issue?
  • Did I miss some thing?
  • How can I correct this behavior?

 

Info.lua

local info =
{    LrSdkVersion        = 4.0,    LrToolkitIdentifier = 'com.LightroomStatistics.lightroom.develop.test',    LrPluginName        = "Test",    LrPluginInfoUrl     = 'http://www.LightroomStatistics.com/',    LrAlsoUseBuiltInTranslations = true,       VERSION = { major=0, minor=1, revision=1, build=0, },       LrHelpMenuItems = {        {            title = "List exposure setting photos",            file = "ShowSettings.lua",        },    },
}

return info

 

ShowSettings.lua

local LrTasks = import 'LrTasks'
local catalog = import "LrApplication".activeCatalog()
local ProgressScope = import 'LrProgressScope'
local LrDialogs = import 'LrDialogs'
local LrView = import 'LrView'
local LrPathUtils = import 'LrPathUtils'
local LrFileUtils = import 'LrFileUtils'

local logFilename = 'ExposureSettings'
local myLogger = import 'LrLogger'( logFilename )
myLogger:enable( "logfile" )

--[[--------------------------------------------------------------------------
Name        emptyLogFile
Purpose        Clears the existing log file.

From cookbook: http://cookbooks.adobe.com/post_Clearing_your_logfile_automatically-19677.html
----------------------------------------------------------------------------]]
function emptyLogFile()
    --local myLogger = import 'LrLogger'( 'Stash' )    myLogger:disable()           logPath = LrPathUtils.child(LrPathUtils.getStandardFilePath('documents'), logFilename .. ".log")    if LrFileUtils.exists( logPath ) then        local success, reason = LrFileUtils.delete( logPath )        if not success then            logger:error("Error deleting existing logfile!" .. reason)        end    end    myLogger:enable( "logfile" )
end

--[[--------------------------------------------------------------------------
Main function

Name        Select images
Purpose        This plug-in will select every second photo.            The selected photo is the first photo to be selected and then every second            photo will also be selected.

Version        1.0
Developer    D. Holtman
----------------------------------------------------------------------------]]
LrTasks.startAsyncTask( function()    emptyLogFile()       --    Get all the selected photos and the active photo    local cat_photos = catalog:getTargetPhotos()    local nCountSelected = #cat_photos    myLogger:info('List table develop settings')    for i, photo in ipairs(cat_photos) do        local devSettings = photo:getDevelopSettings()        local name = photo:getFormattedMetadata( "fileName" )        myLogger:info('Photo', name, devSettings.Exposure2012)    end       LrDialogs.message('Listing exposure', 'Finished')
end)

Accessing hierarchical keywords within a plugin

$
0
0

Hello

with photo:getFormattedMetadata("keywordTags") or photo:getFormattedMetadata("keywordTagsForExport") I can get keywords of a photo. But how can I get the hierarchical keywords?

 

Thank you

How to obfuscate code for lrplugin?

$
0
0

I don't want to let users read my code inside my Lightroom plugin: is there any method to obfuscate It?

Plug-in code works on mac but fails on windows

$
0
0

Some good guys are trying to get a open sourced plug-in to run under Windows, which works perfectly fine under Mac:

Plugin Fails on Windows. An internal error has occurred. · Issue #11 · musselwhizzle/Focus-Points · GitHub

 

If anyone here has any experience with scripting lightroom under Windows and can help to find/fix the initial version there that would be greatly appreciated.

Just to get over the initial Windows hurdle.

 

It just seems so strange that some things work on a Mac but not on Windows.


Flaw in displaying an image over a viewFactory:catalog_photo on Windows

$
0
0

On Mac everything is working fine, but on Windows, when I display an image over a catalog_photo in a dialog, it is displayed with a grey background instead of a transparent background (even if I set background_color to LrColor()

 

Has someone encountered this sort of problem or has someone an idea where it could come from ?

 

Thansk !

 

Capture 2017-01-12 à 23.29.54.png

Lua Global Folder in Mac

$
0
0

Hi guys,

 

I am trying to debug my plugin using zero brane.

 

Debugging Adobe Lightroom plugins with ZeroBrane Studio - ZeroBrane

 

I have to copy related files into ~/Library/Application\ Support/Adobe/Lightroom/Modules/mobdebug.lrmodule  folder but I don't have  'Modules' into Lightroom folder. I tried to create that folder by manually but my debugging didn't work.

 

Can someone have any idea?

 

Thanks in advance.

[Q] Is it possible to Lightroom can connect WebSocket server on localhost?

$
0
0

Hi all,

 

I have current running WebSocket server on localhost.

I'd like to make Lightroom plugin that connect the server.

 

My understanding is following.

     * Lightroom modules cannot add third party code like LuaRocks installation.

     * Lightroom 6/CC has LrSocket and LrHttp.

 

Is that possible to implement WebSocket client on top or LrSocket or any other way?

 

Thank you,

Naoki

[Q] Selected slider

$
0
0

Hi all,

 

When user clicked Develop:Basic:Highlights (label), it shows "Modify Highlights with +/- Keys".

At this point, can we tell "Highlights" is selected from API?

 

I tried LrDevelopController.getSelectedTool(), but it seems not for this purpose.

 

Thank you,

Naoki

[Q] Event handling tool, module and image

$
0
0

Hi all,

 

I'm still new to Lua and not sure if we can implement in SDK,

but I'd like to handle following events.

 

1) Current module changes

    There is LrApplicationView.getCurrentModuleName().

 

2) Current tool changes in Develop mode

    There is LrDevelopController.getSelectedTool().

 

3) Selected image changes

     There is LrCatalog.getTargetPhoto() and LrCatalog.getTargetPhotos()

 

1)-3) seems at least readable, so I think we can implement as timered polling.

But can it be event driven like addEventListner function in JavaScript?

 

Thank you,

Naoki

Viewing all 53524 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>