# How to get deformation info for a Custom Warp

**URL:** <https://forums.creativeclouddeveloper.com/t/how-to-get-deformation-info-for-a-custom-warp/5831>\
**Category:** UXP Plugin API\
**Tags:** feature-request\
**Created:** [February 10, 2023, 3:52pm UTC](https://forums.creativeclouddeveloper.com/t/how-to-get-deformation-info-for-a-custom-warp/5831 "2023-02-10T15:52:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cesarphernandez](https://avatars.discourse-cdn.com/v4/letter/c/a183cd/32.png) [@cesarphernandez](https://forums.creativeclouddeveloper.com/u/cesarphernandez)\
**Post date:** [February 10, 2023, 3:52pm UTC](https://forums.creativeclouddeveloper.com/t/how-to-get-deformation-info-for-a-custom-warp/5831/1 "2023-02-10T15:52:51Z")

</div>

With this batchplay action, I can get all document data in JSON File

```auto
let result = await batchPlay(
          [{
            _obj: "get",
            _target: [
                {
                  _property: "json"
                },
                {
                  _ref: "document",
                  _id: this._id,
                },
            ],
            expandSmartObjects: true,
            getTextStyles: true,
            getFullTextStyles: true,
            getDefaultLayerFX: true,
            layerID: 0,
            getCompLayerSettings: true,
            getPathData: true,
            imageInfo: true,
            compInfo: true,
            layerInfo: true,
            includeAncestors: true,
          }],{})
        resolve(result)

```

After obtain JSON file, I need info of a custom warp in Smart object, all I get of this info is:

```auto
"quiltWarp": {
                    "warpStyle": "warpCustom",
                    "warpValue": 0,
                    "warpPerspective": 0,
                    "warpPerspectiveOther": 0,
                    "warpRotate": "horizontal",
                    "bounds": {
                        "top": 0,
                        "left": 0,
                        "bottom": 5000,
                        "right": 3333
                    },
                    "uOrder": 4,
                    "vOrder": 4,
                    "deformNumRows": 16,
                    "deformNumCols": 16
                },

```

Is there any way to get all matrix or all info of this warp in Smart Objects like a next image

 ![Screenshot 2023-02-10 at 10.50.47 AM](https://us1.discourse-cdn.com/flex015/uploads/xdplugins/original/2X/5/5ee70fd7c4114313ec8ca42225bdd03e2520dc9f.png)

Appreciate your help with this.

---

<div class="post-metadata">

**Author:** ![Jarda](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/jarda/32/1909_2.png) [@Jarda](https://forums.creativeclouddeveloper.com/u/Jarda)\
**Post date:** [February 10, 2023, 9:50pm UTC](https://forums.creativeclouddeveloper.com/t/how-to-get-deformation-info-for-a-custom-warp/5831/2 "2023-02-10T21:50:11Z")

</div>

I think you want this

 ![image](https://us1.discourse-cdn.com/flex015/uploads/xdplugins/original/2X/8/88396e09e237ded342435441025b22d9a3d33b01.png)

```javascript
const {executeAsModal} = require("photoshop").core;
const {batchPlay} = require("photoshop").action;

async function actionCommands() {
   const result = await batchPlay(
      [
         {
            _obj: "get",
            _target: [
               {
                  _ref: "layer",
                  _id: 5 // change this ID
               },
               {
                  _ref: "document",
                  _id: 81 // change this ID
               }
            ],
            _options: {
               dialogOptions: "dontDisplay"
            }
         }
      ],
      {}
   );
   
   const data = result["0"].smartObjectMore.quiltWarp.customEnvelopeWarp;
}

async function runModalFunction() {
   await executeAsModal(actionCommands, {"commandName": "Action Commands"});
}

await runModalFunction();

```

---

<div class="post-metadata">

**Author:** ![cesarphernandez](https://avatars.discourse-cdn.com/v4/letter/c/a183cd/32.png) [@cesarphernandez](https://forums.creativeclouddeveloper.com/u/cesarphernandez)\
**Post date:** [February 13, 2023, 2:15pm UTC](https://forums.creativeclouddeveloper.com/t/how-to-get-deformation-info-for-a-custom-warp/5831/3 "2023-02-13T14:15:25Z")

</div>

I think this might work for me. Thank you so much !!
