Created
January 19, 2015 07:06
-
-
Save dokluch/a588e40a8b3f0dcaf879 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var getTrueValues = function(layer, position, anchor, scale, rotation){ | |
if(layer.parent != null){ | |
var l = layer.parent.property("ADBE Transform Group"); | |
getTrueValues(layer.parent, position+l.property("ADBE Position").value, anchor+l.property("ADBE Anchor Point").value, [scale[0]*l.property("ADBE Scale").value[0], scale[1]*l.property("ADBE Scale").value[1]]/100, rotation+l.property("ADBE Rotate Z").value*Math.PI/180); | |
} | |
else{ | |
var obj = {pos: position, ap: anchor, sc: scale, rot: rotation}; | |
return(obj); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment