Photoshop: Is there way how to read deformations values applied on Smart Object via a Script?

  • 2
  • Question
  • Updated 2 years ago
  • (Edited)
Is there way how to read deformations values applied on Smart Object?

Now I can only compute scale ratio and propabably I could read warp deformation, but not skew, rotation, perspective, ...
Photo of Jaroslav Bereza

Jaroslav Bereza

  • 810 Posts
  • 188 Reply Likes

Posted 3 years ago

  • 2
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 823 Reply Likes
Those are only stored as the array of corner points.  Photoshop internally turns the corner locations into the final transformation sequence.
Photo of Jaroslav Bereza

Jaroslav Bereza

  • 810 Posts
  • 188 Reply Likes
So is it somehow readable?

The worst scenario is read PSD file :-D 
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 823 Reply Likes
The warp parameters are something else entirely.  They should be part of the smart object descriptor, but I'm not sure if the values are documented anywhere.

The array of corner points is certainly readable.  (you're looking for 8 doubles: 4 pairs of X,Y values).
Photo of Jaroslav Bereza

Jaroslav Bereza

  • 810 Posts
  • 188 Reply Likes
It would be nice to have it in the documentation.
:-)

You mean this corner points: 
1) http://sklad.bereza.cz/00-jarda/00_screenshot/2016-04-27_230156.png
or this?
2) http://sklad.bereza.cz/00-jarda/00_screenshot/2016-04-27_230259.png
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 823 Reply Likes
Yes, those corner points.
The destination points are the only ones stored, since the original points are implied by the original image data.
Photo of Jaroslav Bereza

Jaroslav Bereza

  • 810 Posts
  • 188 Reply Likes
Hmm there is nothing about Smart Objects: https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/

Edit: I found it. It's called "Placed Layer"
(Edited)
Photo of Jaroslav Bereza

Jaroslav Bereza

  • 810 Posts
  • 188 Reply Likes
Partly solved in PS CC2017

Corner values are accessible with AM code. (Smart objects)