Try this:
L = this_comp.layer(“Layer 1”);
s = L.scale/100;
u = L.to_world_vec([s[0],0,0]);
v = L.to_world_vec([0,s[1],0]);
w = L.to_world_vec([0,0,s[2]]);
sinb = clamp(w[0],-1,1);
b = Math.asin(sinb/this_comp.pixel_aspect);
cosb = Math.cos(b);
if (Math.abs(cosb) > .0005){
c = -Math.atan2(v[0],u[0]);
a = -Math.atan2(w[1],w[2]);
}else{
a = Math.atan2(u[1],v[1]);
c = 0;
}
[radians_to_degrees(a),radians_to_degrees(b),radians_to_degrees(c)]
Substitute your layer for “Layer 1”.
Dan