Evaluating transformation values for Smart Objects has proven elusive for Scripting so far to the best of my knowledge.
And plain ArtLayers have no such »memory« as they simply contain the pixels that result from the transformation.
If you have a duplicate of the untransformed Layer one might be able to concoct a complicated Scripting approach, but that seems a bit excessive.