Skip to content

Instantly share code, notes, and snippets.

@dokluch
Created January 19, 2015 07:06
Show Gist options
  • Save dokluch/a588e40a8b3f0dcaf879 to your computer and use it in GitHub Desktop.
Save dokluch/a588e40a8b3f0dcaf879 to your computer and use it in GitHub Desktop.
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