Skip to main content
Participant
October 5, 2022
Question

How to create New Mask Type brush

  • October 5, 2022
  • 1 reply
  • 128 views

Hello.  I have issue with functionality add new mask

in documents 

 

LrDevelopController.createNewMask( maskType, maskSubtype )
Create a new mask.
Must be called while the Develop module is active.
First supported in version 11.0 of the Lightroom SDK.

Parameters
1. maskType
(string) type of tool to be created, one of: "brush", "gradient", "radialGradient", "rangeMask", "aiSelection".
2. maskSubtype
(string) subtype of tool to be created, only used when maskType is "rangeMask" or "aiSelection", one of: "color", "luminance", "depth", "subject", "sky".

 

But when I run my script with cod

 

LrDevelopController.goToMasking()
LrDevelopController.createNewMask("brush", "")

 

Masking panel open but Brush not

 

Can you please tell me where I went wrong?

This topic has been closed for replies.

1 reply

johnrellis
Legend
October 5, 2022

A quick test indicates you should leave off the second parameter (or pass nil):

 

LrDevelopController.createNewMask ("brush")

 

That works for me.

Participant
October 13, 2022

Thank you! 

I also wrapped this call 

        LrDevelopController.goToMasking()
        LrTasks.startAsyncTask( function()
            LrDevelopController.createNewMask("brush")
        end, "OpenBrush" )