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

Using the LrHttp

$
0
0
Hi all,
I hope you can help.

I'm writing a plugin to allow users to export straight to a webservice written in asp.net.

here are the params needed.
http://barnaland.is/dev/DataStorage.asmx?op=AddFile

int
      int
      int
      int
      int
      string
      base64Binary
      string
      string
      string

I've played with the sample plugins in the sdk be able to get usertoken etc.. so I seem to be able to cover all but the acutal upload.

now how do I change this so the webservice gets all the params needed?

local postUrl = ''
info( 'uploading photo', params.filePath )
local filePath = assert( params.filePath )
params.filePath = nil
local fileName = LrPathUtils.leafName( filePath )
params.auth_token = params.auth_token or prefs.token
params.api_sig = FlickrAPI.makeApiSignature( params )

local mimeChunks = {}

for argName, argValue in pairs( params ) do
   if argName ~= 'api_sig' then
     mimeChunks[ #mimeChunks + 1 ] = { name = argName, value = argValue }
   end
end

mimeChunks[ #mimeChunks + 1 ] = { name = 'api_sig', value = params.api_sig }
mimeChunks[ #mimeChunks + 1 ] = { name = 'photo', fileName = fileName, filePath = filePath, contentType = 'application/octet-stream' }
     
-- Post it and wait for confirmation.
     
local result = LrHttp.postMultipart( postUrl, mimeChunks )

I hope you can help.

Checking if a photo has adjustments

$
0
0

Hi,

 

I am developing an export filter and I'm looking for a way to determine if an LRPhoto has any adjustments applied (i.e. if the "Photo has Develop adjustments" icon is displayed).

Since I couldn't find anything in the API, I am now using LRPhoto:getDevelopSettings() and check if some common settings are different from their default.

Of course, this is quite fragile, so I'd like to know if there is a better way to do that.

How to package ImageMagick binaries?

$
0
0

My plugin uses ImageMagick's convert and, rather than hassle users with downloading it themselves, I'd like to package it with the plugin. This seems straightforward for Windows since IM provides builds of convert.exe. OSX is not so clear since IM suggests building that from source. I'm not going to ask users to use Homebrew if I can avoid it and I don't want to provide my own build. Any tips from people here about what they've done to package IM tools?

 

db

Custom metadata plugin: how to run code automatically for new files?

$
0
0

I have a goal of seeing some Fuji-specific metadata fields within Lightroom. I can see these when I run Fuji files through Exiftool from the command line. I'd like to be able to filter and search on them. (Before going on, if anyone knows of an existing plugin that will import arbitrary EXIF data from Exiftool, please let me know.)

 

I can write a custom metadata plugin for this. Defining the custom fields and tagset is clear to me; I've done that before. What's not clear to me is how to trigger the code that scans files for the metadata and imports that. I can have the user do it manually by selecting images and then using a menu option - that's easy. Is there a way to invoke that automatically instead? Say, when files are imported?

 

Other opinions on how this could work smoothly are welcome. Thanks,

 

db

Creative SDK - Image Editor UI Authentication/Login (iOS)

$
0
0

down votefavorite

 

 

I was wondering if anyone could clarify something for us. Our startup is looking at an photo enhancer/editor - and I'm curious about the Adobe Image Editor UI, but was quite put off by making users have and Adobe account and having to log in. I have looked at all the documentation, sample code and it all points to the "Integrating the Authentication Component" here https://creativesdk.adobe.com/docs/ios/#/articles/gettingstarted/index.html. Is not the client-id/client-secret enough to know the billing scenario for us?

In fact, even ONE external login would kill user experience for our offering.I understand that the Cloud components would require separate logins, but we just want Image Editor UI, nothing else (and willing to pay for this obviously).

What I want to know is, would the users of our app have to login and (us) manage login state (with adobe) every time they want to use the Image Editor? If anyone could point me to the right documentation it would be great. I plan to write the wrappers for React Native once I can confirm this (yes, I'll open source it as well once I'm done).

Thanks

How to send lightroom data to arduino?

$
0
0

Has anyone done this?

 

I'm an industrial design student working on a project in school and I want a two way communication with lightroom. I want to have physical output (LED's, turning knobs) that sits on your desk next to your computer. Send commands from arduino is not a problem, i've done that already but i want output as well

has anyone any advice where to begin, or anyone could help me out?

I can program in arduino pretty good, and have some basics in python

 

 

THANKS!

Lightroom Exchange Classic dead?

$
0
0

Looks like the Adobe Lightroom Exchange Classic is dead.  The last submitted plugin is dated 10/14/13.  My submission from last fall is still stuck in Status: New Submission awaiting review.

LrTasks.execute problem on windows

$
0
0

Hi everybody,

 

I wrote a script to convert image after export. It works very well on Mac, but I can't run the same function on Windows.

 

This is the part of the wrong code:

 

 

-- pluginPath = path of the plugin like ~/plugin.lrplugin/
-- filePath = path of the image like ~/image.cr2
-- output = path of output command like ~/image.txt


local binExe = 'start ' .. pluginPath .. '\\bin\\convert.exe' -- not working
if MAC_ENV then
 -- exec path for Mac (& force language to english; seem to be unnecessary LANG=C LC_ALL=C LANGUAGE=en)
 binExe = 'exec "' .. pluginPath .. '/bin/convert" '
end
command = binExe .. '"' .. filePath .. '" > "' .. output .. '"'


result = LrTasks.execute(command)

 

 

I tried a lot of combination with simple or double quote but nothing!

 

I hope you can help me to solve it!

 

Many thanks

Tof


Overriding image width with updateExportSettings

$
0
0

Writing my first lightroom plugin, I have created a minimal example which should set the photo width here and included below. However I can not get the image to be the 400 x 400 specified.

 

ExportFilterProvider400.lua

local LrView = import 'LrView'
local bind   = LrView.bind
--------------------------------------------------------------------------------
-- This function will create the section displayed on the export dialog
-- when this filter is added to the export session.

local function sectionForFilterInDialog( f, propertyTable )
  return {    title = LOC "$$$/SDK/MetaExportFilter/SectionTitle=400x400 Filter",  }
end

--------------------------------------------------------------------------------
-- Example on updating export settings
local function updateExportSettings( exportSettings )
  exportSettings.LR_size_maxHeight = 400  exportSettings.LR_size_maxWidth  = 400  exportSettings.LR_size_doConstrain = true
end

--------------------------------------------------------------------------------
return {
sectionForFilterInDialog = sectionForFilterInDialog,
updateExportSettings     = updateExportSettings    , --Does this works
}

 

Info.lua

 

return {  LrSdkVersion        = 3.0,  LrSdkMinimumVersion = 1.3, -- minimum SDK version required by this plugin  LrPluginName        = "400x400 Export",  LrToolkitIdentifier = 'sample.export400x400',  LrExportFilterProvider = {    title = LOC "$$$/SDK/MetaExportFilter/Sample=400x400 Size", -- the string that appears in the export filter section of the export dialog in LR    file  = 'ExportFilterProvider400.lua', -- name of the file containing the filter definition script    id    = "metadata1",  -- unique identifier for export filter  },  VERSION = { major=5, minor=0, revision=0, build=907681, },
}

 

Adobe Lightroom can load the plugin, and add it to the export session, but the updateExportSettings do not seem to take effect. Tested in Lightroom 5.3.

 

 

Thanks

ftp settings file

$
0
0

Is it possible to customize the

Ftp Upload service provider plugin for lightroom to have directly the user, pass ftp.

So one can provide the plugin to customers without giving them too much work to do?

How to fix LR5.6 preview cache error message

$
0
0

LR5.6 will not start up.  I am getting message "Lightroom encountered an error when reading from its preview cache and needs to quit"  "Lightroom will attempt to fix this problem the next time it launches"

 

Restart LR and keep getting same error message.

 

How do I fix this?

 

Bob

edit text multiple lines

$
0
0

I  have some text I'd like to have a user edit from within a dialog with the editable field spanning several lines. Is this even possible? The best I can get so far is multiple lines using a static_text field or an edit_text field that can't be made anything other than a single line in height.

 

Does anyone have any thoughts?

 

 

thanks.

Develop setting names in LR3 and LR4,5

$
0
0

Hello

 

I'm trying to work with develop setting.

to get current setting I use

photo:getDevelopSettings()

 

and for set settings I use

LrApplication.addDevelopPresetForPlugin

photo:applyDevelopPreset

 

The problem is. If in LR3 (bot Mac and Win) I modify a settings with keyname "Contrast" then it is correctly applied this setting to LR's develop seting "Contrast" and everuthing works as it should.

 

But in LR 4 and LR 5 it just create an inner plug-in seting with name "Contrast" what has not any affect on LR's setting "Contrast"

 

I looked throw many pages of this forum and dint meet any mention about same problem. But I met what sometimes in some samples the develop settings are named as i.e "Exposure2012" instead of "Exposure".  There is a some special rules how to use setting's keys to access to standard LR develop settings independly of LR version?

Using getDevelopSettings()

$
0
0

Hello!

My name is Roman. I try to make a simple LR plug-in with following functions:

1. Plug-in must send commands via PC's COM port,

2. Plug-in must provide the list of presets to apply it to all photos in catalog,

3. Plug-in must provide the batch crop function.

 

Now I'm working with presets and something works fine (with kind help of johnrellis). For example, following code really changes all selected photos:

 

LrTasks.startAsyncTask(function() 

  catalog:withWriteAccessDo("PresetTry", function()

    local cat_photos = catalog.targetPhotos

    for i, photo in ipairs(cat_photos) do                 

      local preset = LrApplication.addDevelopPresetForPlugin( _PLUGIN, "TestPreset", { Shadows2012 = .4,  Exposure2012 = .3 })

      photo:applyDevelopPreset(preset, _PLUGIN)                   

    end

  end)

end)

 

 

But there are some problems:

 

1. When I try to get some information from loaded image some methods works, some don't.

For example, photo:getFormattedMetadata("fileSize") and photo:getFormattedMetadata("fileType") works fine, but

local settings = photo:getDevelopSettings()

LrDialogs.message( string.format("%d", settings["Exposure2012"]) )

returns 0. At the same time I see that Exposure is equal to 0.3 (after the previous code was executed) in the Develop tab.

Maybe, the original image wasn't changed with photo:applyDevelopPreset(preset, _PLUGIN), so original Exposure wasn't changed. 

 

2. I created some presets with names, for example, FirstPreset, SecondPreset etc. How can I apply it to images in my plug-in? I searched through the forum, but found nothing about it. 

 

3. I use the following code to get all photos in catalog:

local cat_photos = catalog.targetPhotos

for i, photo in ipairs(cat_photos) do                 

     _some_code_here_                

end

It works fine when I select all photos in catalog manually (when they all highlighted), but it doesn't when only one photo is selected - then I handle this and only this photo. What could be the problem?


Thank you in advance.

Best regards

Roman

Multiple menus in .info file

$
0
0

If I add multiple menus to my plugin in the .info file, rather than pointing each item to a different lua file, is there a way that I can point them all to the same lua file then detect which menu item has been selected using code in that single lua file?

 

Thanks

 

LrExportMenuItems = {
{
title = "One",
file = "Extras.lua",
},
{
title = "Two",
file = "Extras.lua",
}
},

Adobe Standard

$
0
0

Why does Adobe Standard not appear in Profile under Camera Calibration in the Develop Module?

Lightroom 6.0 SDK - improvement LrDevelopController

$
0
0

Dear Power SDK User ,

 

Thanks for all new great features insides SDK 6.0 !! In particular LrDevelopController !

 

About this new namespace, I've some questions.

 

Why we need to be on Develop module to apply developement parameters ? Could it be possible to apply them programmatically instead of "visual programmatically" like Excel Macro ?

This is what I want (and do actually):


  1. Import new photo above the existing photo
  2. Create a develop snapshop for the new one
  3. Select existing photo
  4. get develop settings of existing photo
  5. select new imported photo
  6. refresh catalog:getTargetPhoto() (if not, the next line apply on the existing photo and not on the new one)
  7. Develop Controller set value for each parameters getted from existing photo
  8. create a new snapshot



It seems that Develop Snapshot take no effect when it was done programmatically ?

 

A snippet is more useful

 

local import = catalog:withWriteAccessDo('Import', function(context)

    local photoImported = catalog:addPhoto(newPhoto, existingPhoto, 'above')

     

    photoImported:createDevelopSnapshot("Before syncing params", true) -- same image after setters no OK (need to be like after imported: empty; not like after setters new values)

 

    catalog:setSelectedPhotos(existingPhoto, {photoImported })

    local syncParams = existingPhoto:getDevelopSettings()

    --LrSelection.nextPhoto() -- no effect

    --LrSelection.previousPhoto() -- no effect

    

    catalog:setSelectedPhotos(photoImported , {})

    local convertedPhoto = catalog:getTargetPhoto()

 

-- workaround to wait for displaying image :

    while convertedPhoto:getFormattedMetadata("fileName") ~= photoImported:getFormattedMetadata("fileName") do

        convertedPhoto = catalog:getTargetPhoto()

    end

 

    for k, v in pairs(syncParams) do

        LrDevelopController.startTracking(k)

        LrDevelopController.setValue(k, v)

        LrDevelopController.stopTracking()

    end

 

    photoImported:createDevelopSnapshot("After syncing params", true) -- same image after setters OK

 

end,

{timeout = 30}

)

 

 

What I have noticed:

 

If the display isn't finished when you do setSelectedPhotos or nextPhoto(): LrDevelopController.setValue use the existing photo to apply setting and not the new one.

 

If you decide to apply them on a lot of picture, it will take a long time to do that because you need to wait the new displayed picture who refresh before set new values.

 

Why it isn't possible to do something like that ? (like copy paste settings) without needed to select and reselect and deselect and select ..

 

local syncParams = existingPhoto:getDevelopSettings()

newPhoto:setDevelopSettings(syncParams)

 

Maybe I was wrong, but I have not found a "simple" solution to set development values

Hope you'll have a nice workaround

Thanks,

Tof


If you want to try the plugin, you can download source here kichetof / lr_cr2hdr — Bitbucket

Retrieve altitude / elevation based on GPS location

$
0
0

When in the Map module manually adding the location to an photo, Lightroom both retrieves the latitude / longitude and the altitude.

 

I have several tracklogs / photos I have the GPS location, but without the altitude / elevation and I would like to retrieve them as Lightroom can.

 

Question: is there a function that can retrieve the altitude based on the GPS location?

 

I know that I can retrieve them from GeoNames.org for example, but I'm curious if I can use a Lightroom build-in function that.

Also GeoNames.org only returns elevation as whole numbers as Lightroom in the Map modules give them with one decimal. Living in a flat area this makes some difference.

Destination field/button is missing for the import of images...

User Scripting (not plugins) in Lightroom?

$
0
0
Hi,

I don't know if any of you have been following the Export Keywords problem, but a KB article including a fix has been published about it. http://kb.adobe.com/selfservice/viewContent.do?externalId=kb405074&sliceId=2

This wouldn't normally be a subject for this forum, but the fix (an SQL update) is delivered via a .lua file that is:
* installed into a Scripts directory in the Lightroom presets directory (it wasn't present on my system prior to this)
* Enables a Scripts menu (to the right of the Window menu) and the first item is "Open User Scripts Folder"
* presents a dialog box (with a few options) that runs the SQL then restarts the product

Why I'm interested is it appears the Lightroom team has already baked a User Scripting mechanism into the product, beyond the plugin SDKs that have officially been announced. This hints at wider capability for us to extend the product - that certainly grabs my attention.

This is the first time I've seen any form of scripting (beyond that included in the Plugin SDK) publicly acknowledged albiet indirectly. Does anyone know where to find documentation about User Scripting capabilities/SDK/etc? Can anyone glean additional information from the fix that was published? I'm hoping one of you more experienced development types may be able to shed more light on this.

Thanks,
Matt
Viewing all 53524 articles
Browse latest View live


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