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

P: Implement "LrDevelopController.duplicateMask"and duplicateMaskTool() in the SDK

Advocate ,
Feb 15, 2024 Feb 15, 2024

Copy link to clipboard

Copied

At today is impossible to directly duplicate a Mask with the SDK.

 

  • Please implement: LrDevelopController.duplicateMask () and LrDevelopController.duplicateMaskTool ()

 

.

Idea No status
TOPICS
SDK

Views

155

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
2 Comments
Advocate ,
Feb 15, 2024 Feb 15, 2024

Copy link to clipboard

Copied

I was able to create a "Duplicate Mask" command using this code.

 

 

 

local LrDevelopController = import "LrDevelopController"

local maskId = LrDevelopController.getSelectedMask ()
if maskId == nil then return end

LrDevelopController.duplicateAndInvertMask (maskId)

local maskId = LrDevelopController.getSelectedMask (maskId)
LrDevelopController.invertMask (maskId)

 

 

 

This workaround works BUT the resulting Mask is still bearing the suffix "Inverted" BUT obviously tis not inverted.

 

Screenshot 2024-02-15 at 14.44.11.png

 

 

Also history step states Duplicate and Invert (Name of the Mask) but again that is false.

 

Screenshot 2024-02-15 at 14.46.22.png

 

In this case the Step should at least state the usual generic SDK step "Camera Raw Settings" or "Multiple Settings"

 

Direct LrDevelopController.duplicateMask () would give us the correct result.

 

@John R Ellis 

I am not skilled enough to to create a code that sets a Mask with the correct suffix OR even allow to assign a custom name to the newly created mask but I think you know how to do it.

 

Perhaps you can already create a "Duplicate Mask" and "Duplicate and Invert" command" that allow users to immediately set the mask name upon duplication as I FR here: https://community.adobe.com/t5/lightroom-classic-ideas/p-masking-allow-to-immediately-quot-rename-qu...

 

 

 

.

 

 

Votes

Translate

Translate

Report

Report
Advocate ,
Feb 20, 2024 Feb 20, 2024

Copy link to clipboard

Copied

LATEST

FWIW I was able to create a script that duplicates a Mask WITH its settings BUT due to a missing parameter in the SDK is not duplicating all settings.

 

It should trivial to implement LrDevelopController.duplicateMask () 

 

.

 

Votes

Translate

Translate

Report

Report