• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
2

SDK Naming History Step

Participant ,
Nov 04, 2023 Nov 04, 2023

Copy link to clipboard

Copied

I am working on a Lightroom Classic plugin. Does anyone know if there is a way to set the history step name on the right-hand side of the history panel? See the screenshot. 

 

cwurzbach_0-1699117899613.png

 

TOPICS
SDK

Views

156

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 ,
Nov 04, 2023 Nov 04, 2023

Copy link to clipboard

Copied

I haven't found a way for plugins to control any aspect of history steps.

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
Participant ,
Nov 04, 2023 Nov 04, 2023

Copy link to clipboard

Copied

I know you can control the name of the history step (the name on the left-hand side of my screenshot) but I didn't know if there was a way to control the text on the right-hand side. Thanks again for your insight on this @johnrellis, it's much appreciated.

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 ,
Nov 04, 2023 Nov 04, 2023

Copy link to clipboard

Copied

[This post contains formatting and embedded images that don't appear in email. View the post in your Web browser.]

 

Do you know how to set the name of the history step?  With all my plugins, the "actionName" parameter supplied to catalog:withWriteAccessDo() sets the name in the Edit > Undo menu, but the history step always appears as "Camera Raw Settings":

 

johnrellis_0-1699149066930.png

johnrellis_1-1699149305446.png

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
Participant ,
Nov 04, 2023 Nov 04, 2023

Copy link to clipboard

Copied

I know how to set it for photo:applyDevelopSettings, which is what I am using. The history step can be named via photo:applyDevelopSettings( settings, optHistoryName [name history step here], optFlattenAutoNow ).

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 ,
Nov 05, 2023 Nov 05, 2023

Copy link to clipboard

Copied

"The history step can be named via photo:applyDevelopSettings( settings, optHistoryName [name history step here], optFlattenAutoNow )"

 

Thanks much, I forgot that was documented in SDK 11.2.  

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
Participant ,
Nov 09, 2023 Nov 09, 2023

Copy link to clipboard

Copied

@johnrellis Glad to help!

 

I'm reading through the SDK documentation and it indicates you can provide a name for the "undo/redo name" for LrTasks.startAsyncTask via LrTasks.startAsyncTask( func, optName [name goes here] ) but I can't seem to make it work for some reason.

 

Here is an example code:

 

LrTasks.startAsyncTask( function()
... task here ...
end)

 

I am not sure where or how to insert the optName. The following code doesn't work:

 

LrTasks.startAsyncTask( function(), "name",
... task here ...
end)

 

Any guidance? Your initial reply made me realize that many of my "Undo/Redo Names" are not defined so I am trying to set the names now. Otherwise, I get "Undo/Redo Names" like this: 

 

Screenshot 2023-11-09 at 10.56.59 PM.png

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 ,
Nov 10, 2023 Nov 10, 2023

Copy link to clipboard

Copied

[This post contains formatting and embedded images that don't appear in email. View the post in your Web browser.]

 

The names of Undo steps are provided via the first argument to catalog:withWriteAccessDo(), e.g. 

 

catalog:withWriteAccessDo ("My Crop", function ()
    photo:applyDevelopSettings {...}
    end)

 

 

The "optName" passed as the second argument to LrTasks.startAsyncTask (fun, optName) is "for debugging only".  I assume that name gets attached to the task and will appear in the debugging facility Adobe uses for its Lua framework.  I've never seen that name appear anywhere in any value returned by the SDK nor in the Lua debugging hooks my Debugging Toolkit uses.

 

Thus, I never pass a name, since it has no apparent use to mere mortals.

 

johnrellis_0-1699635099810.png

 

 

This suggests you're passing an untranslated ZString to catalog:withWriteAccessDo():

 

catalog:withWriteAccessDo (
    "$$$/AgLibrary/CameraRawView/Ops/CropAspect=Set Crop Aspect Ratio",
    function () ... end)

 

 

rather than translating it with LrTranslation.LOC:

 

catalog:withWriteAccessDo (
    LOC ("$$$/AgLibrary/CameraRawView/Ops/CropAspect=Set Crop Aspect Ratio"),
    function () ... 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
Participant ,
Nov 11, 2023 Nov 11, 2023

Copy link to clipboard

Copied

LATEST

@johnrellis thanks for the clarification on this. Good to know that the optName is for debugging only. 

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