# Get skew from smartObject

**URL:** <https://forums.creativeclouddeveloper.com/t/get-skew-from-smartobject/6442>\
**Category:** Photoshop\
**Tags:** uxp, javascript\
**Created:** [June 27, 2023, 4:10pm UTC](https://forums.creativeclouddeveloper.com/t/get-skew-from-smartobject/6442 "2023-06-27T16:10:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Test](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@Test](https://forums.creativeclouddeveloper.com/u/Test)\
**Post date:** [June 27, 2023, 4:10pm UTC](https://forums.creativeclouddeveloper.com/t/get-skew-from-smartobject/6442/1 "2023-06-27T16:10:55Z")

</div>

Hi,  
Is it possible to obtain or calculate skew (skewX, skewY) transform from smartObject.

I can get information about object vertices using smartObjectMore.transform and calculate rotation like in this example [http://forums.creativeclouddeveloper.com/t/access-smartobject-transform-properties/5349/6](http://forums.creativeclouddeveloper.com/t/access-smartobject-transform-properties/5349/6), but don’t know how to get skew.

---

<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:** [June 27, 2023, 8:10pm UTC](https://forums.creativeclouddeveloper.com/t/get-skew-from-smartobject/6442/2 "2023-06-27T20:10:31Z")

</div>

Sadly using transform corner points is exactly what you need to calculate with.

---

<div class="post-metadata">

**Author:** ![SkipIntro](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/skipintro/32/2338_2.png) [@SkipIntro](https://forums.creativeclouddeveloper.com/u/SkipIntro)\
**Post date:** [July 6, 2023, 4:18pm UTC](https://forums.creativeclouddeveloper.com/t/get-skew-from-smartobject/6442/3 "2023-07-06T16:18:16Z")

</div>

I haven’t been doing UXP for a while so I forget what’s in the transform object, but I believe the skew info is in the _smartObjectMore.nonAffineTransform_ section. I think it’s like rotation though in that you have to manually compare the affine transforms points compared to the default dimensions to calculate what kind of skew is going on.

---

<div class="post-metadata">

**Author:** ![Test](https://avatars.discourse-cdn.com/v4/letter/t/f9ae1b/32.png) [@Test](https://forums.creativeclouddeveloper.com/u/Test)\
**Post date:** [July 7, 2023, 7:15am UTC](https://forums.creativeclouddeveloper.com/t/get-skew-from-smartobject/6442/4 "2023-07-07T07:15:12Z")

</div>

The vertex coordinates in transform and nonAffineTransform are exactly the same. Scale, skew and rotation have been applied to the object. I did not find how to separate and extract this data, although it is visible in the info panel when pressing ctrl + t

---

<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:** [July 9, 2023, 7:24am UTC](https://forums.creativeclouddeveloper.com/t/get-skew-from-smartobject/6442/5 "2023-07-09T07:24:22Z")

</div>

This could help: [Transformation matrix - Wikipedia](https://en.wikipedia.org/wiki/Transformation_matrix)
