IPL file; quaternion to euler parameters

gokuta

Hello! I desperately need to convert quaternion rotations, that are found in .ipl files, to euler parameters! Now,... not every function is going to do this, because the correct conversion depends on correct rotation sequence. And the question is... which one is correct!? As far as I tested, it's Y-X-Z, but it also does not convert all object correctly; miscalculations are being made when rotation of an object is complex (like rotating around every axis more than half the turn).