How to get Transform values from layer

How can we use a getter object with batchPlay to get the values of a layer’s transform?
Screenshot 2023-02-08 at 2.42.04 PM

For example, get the rotation angle.

For which layer kind? Bitmap? Smart object? Text?

Is there a way to get the information for any type of object in a layer? For example, this tiger shape?

Screenshot 2023-02-09 at 10.22.43 AM

Thanks!

This information is preserved in Smart Objects and Text Layers. In case of shapes… some predefined shapes have info about its original state so you could calculate something but I don’t think it would be usable for custom shapes.

For Transform>Rotation, is there a way to set the angle in which you want to rotate? I am using this getter object:

const setter = {
            "_obj":"rotateEventEnum",
            "_target":[
               {
                  "_enum":"ordinal",
                  "_ref":"layer",
                  "_value":"targetEnum"
               }
            ],
            "angle":{
               "_unit":"angleUnit",
               "_value": value
            }
         }

However, it seems like “angleUnit” is the amount to turn, instead of setting it to that angle. Without getting the originally rotation value, it won’t be possible to set the rotation to a specific value.

Any ideas on how we can do this, since you said getting transformation values differ depending on what type of layer.

For smart object you can reset deformation and set rotation again. But it will destroy also other tranformations. Or you can calculate angle yourself based on SO corner points. For text layer there should be 2D transformation matrix so you can use it to calculate the initial angle.