# Open the curves adjustment layer dialog

**URL:** <https://forums.creativeclouddeveloper.com/t/open-the-curves-adjustment-layer-dialog/7881>\
**Category:** UXP Plugin API\
**Created:** [May 12, 2024, 7:36pm UTC](https://forums.creativeclouddeveloper.com/t/open-the-curves-adjustment-layer-dialog/7881 "2024-05-12T19:36:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaltepeter](https://avatars.discourse-cdn.com/v4/letter/k/bc79bd/32.png) [@kaltepeter](https://forums.creativeclouddeveloper.com/u/kaltepeter)\
**Post date:** [May 12, 2024, 7:36pm UTC](https://forums.creativeclouddeveloper.com/t/open-the-curves-adjustment-layer-dialog/7881/1 "2024-05-12T19:36:37Z")

</div>

I am working on a plugin and I want to have a way to create a curves adjustment layer and show the full modal (not just the panel) and also have a separate button to re-open that same modal after the layer is created.

I figured out how to get the modal open while creating a new curves adjustment layer.

```auto
export const createCurvesLayer = async () => {
  const descriptors = [
    {
      _obj: "make",
      _target: [
        {
          _ref: "adjustmentLayer",
        },
      ],
      using: {
        _obj: "adjustmentLayer",
        type: {
          _obj: "curves",
          presetKind: {
            _enum: "presetKindType",
            _value: "presetKindDefault",
          },
        },
      },
      _isCommand: true,
      _options: {
        dialogOptions: "display",
      },
    },
  ];
  const results = await action.batchPlay(descriptors, {
    // modalBehavior: "execute",
  });

```

With this code I get these two modals:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/xdplugins/original/2X/4/44d97f377e7bec72e1100ebfbe2b82582a8f728a.jpeg)

Setting the ‘dialogOptions’ to display shows both the layer options modal and the modal I am after.

How can I:

- Skip the ‘new layer options modal’ and just show the ‘curves modal’.
- Re-launch the ‘curves modal’ after the action curves adjustment layer is added and the original modal is closed. (edit adjustment layer curves, separate from this batch play)
