for (Layer layer : pFlame.getLayers()) {
switch (pScript.getScriptType()) {
case ROTATE_FULL: {
int idx = 0;
for (XForm xForm : layer.getXForms()) {
MotionCurve curve = xForm.getRotateCurve();
EnvelopePoints points = new EnvelopePoints(pScript, pFrameCount, pFPS, EnvelopePointsShape.RAMP, idx++ % 2 == 0 ? 360.0 : -360.0);
addEnvelope(pFrameCount, curve, points.getEnvX(), points.getEnvY());
}
}
break;
case ROTATE_POST_FULL: {
int idx = 0;
for (XForm xForm : layer.getXForms()) {
MotionCurve curve = xForm.getPostRotateCurve();
EnvelopePoints points = new EnvelopePoints(pScript, pFrameCount, pFPS, EnvelopePointsShape.RAMP, idx++ % 2 == 0 ? 360.0 : -360.0);
addEnvelope(pFrameCount, curve, points.getEnvX(), points.getEnvY());
}
}
break;
case ROTATE_FIRST_XFORM:
case ROTATE_2ND_XFORM:
case ROTATE_3RD_XFORM:
case ROTATE_4TH_XFORM:
case ROTATE_5TH_XFORM:
case ROTATE_LAST_XFORM:
case ROTATE_FINAL_XFORM: {
XForm xForm = null;
xForm = getXForm(pScript.getScriptType(), layer, xForm);
if (xForm != null) {
EnvelopePoints points = new EnvelopePoints(pScript, pFrameCount, pFPS, EnvelopePointsShape.RAMP, 360.0);
MotionCurve curve = xForm.getRotateCurve();
addEnvelope(pFrameCount, curve, points.getEnvX(), points.getEnvY());
}
}
break;
case ROTATE_POST_FIRST_XFORM:
case ROTATE_POST_2ND_XFORM:
case ROTATE_POST_3RD_XFORM:
case ROTATE_POST_4TH_XFORM:
case ROTATE_POST_5TH_XFORM:
case ROTATE_POST_LAST_XFORM:
case ROTATE_POST_FINAL_XFORM: {
XForm xForm = null;
xForm = getXForm(pScript.getScriptType(), layer, xForm);
if (xForm != null) {
EnvelopePoints points = new EnvelopePoints(pScript, pFrameCount, pFPS, EnvelopePointsShape.RAMP, 360.0);
MotionCurve curve = xForm.getPostRotateCurve();
addEnvelope(pFrameCount, curve, points.getEnvX(), points.getEnvY());
}
}
break;
default: