Skip to main content
Inspiring
November 7, 2024
Question

Filter SDK: "MaskData" is always NULL

  • November 7, 2024
  • 0 replies
  • 116 views

I am using Photoshop 2025 and develop a filter which contains a preview that is `gpb->displayPixels()`.

 

The filter is only applied to the selection of the user. However, I also want to display this behavior in the preview. But I can't find out how to find out what (non-rectangular) area the user has selected.

 

As soon as I select something, then `pb->haveMask` becomes `1`.  But `pb->maskData` is always `NULL`. I have never seen it becoming something different.

 

So, how can I find out the selection mask of the user?

 

Thank you for the help!

 

---

 

Just in case it has something to do with filter cases PiPL setting; all 7 cases have this value:

 

```

"\001", // inputHandling [Preprocessing actions on the image data] = 01h (filterDataHandlingNone)
"\001", // outputHandling [Postprocessing actions on the image data] = 01h (filterDataHandlingNone)
"\003", // flags1 [Flags for how the filter case information should be treated] = 03h (in Filter Factory: 00h)
// 1 PIFilterDontCopyToDestinationBit = true (in Filter Factory: false)
// 2 PIFilterWorksWithBlankDataBit = true (in Filter Factory: false)
// 4 PIFilterFiltersLayerMaskBit = false
// 8 PIFilterWritesOutsideSelectionBit = false
"\000", // flags2 [Reserved] = 00h

```

 

This topic has been closed for replies.