Skip to main content
C.Cella
Legend
January 28, 2024
Question

What is the method to perform "Add/Subtract Tool of the selected type" using the SDK

  • January 28, 2024
  • 1 reply
  • 424 views

I am trying to figure out the method to method to perform "Add/Subtract Tool of the selected type" using the SDK.

The current KBSC assigned to those commands are not good anymore to me and so I would rather create equivalent scripts myself to which assign my own KBSC.

 

I would also like to create my own "Intersect Tool of the selected type" script because that command is missing.

 

I tried to use LrDevelopController.getSelectedMaskTool ()  but it doesn't' seem to be the right choice.

 

Can anyone enlighten me?

 

 

This topic has been closed for replies.

1 reply

johnrellis
Legend
January 31, 2024

[Catching up on SDK issues...]

 

See these three methods:

 

LrDevelopController.addToCurrentMask()

LrDevelopController.subtractFromCurrentMask()

LrDevelopController.intersectWithCurrentMask()

C.Cella
C.CellaAuthor
Legend
January 31, 2024

If I write the following but it doens't work.

 

local LrDevelopController = import "LrDevelopController"

LrDevelopController.getSelectedMaskTool ()
LrDevelopController.intersectWithCurrentMask ()

 

 

I was expecting the maskTool provided by the LrDevelopController.getSelectedMaskTool  to be used but I still need to specify the maskType maskSubtype to intersect myself.

 

Several weeks ago I already have created all Intersections, with all tools, but what I need is a "Intersect Tool of the selected type".

 

I am just a bit lost here.

.

 

.

 

 

 

 

johnrellis
Legend
January 31, 2024

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

 

Looking at the description in the API Reference, intersectWithCurrentMask() applies to the currently selected mask in the user interface:

 

So for example:

LrDevelopController.intersectWithCurrentMask ("aiSelection", "sky")