Package org.jwildfire.create.tina.animate

Examples of org.jwildfire.create.tina.animate.XFormScript


    return res;
  }

  private XFormScript getXFormScriptFromUI(JComboBox pCmb, JWFNumberField pField) {
    XFormScriptType scriptType = (XFormScriptType) pCmb.getSelectedItem();
    XFormScript res = new XFormScript(scriptType != null ? scriptType : XFormScriptType.NONE, pField.getDoubleValue());
    res.getAmplitudeCurve().assign(curves.get(pField.getMotionPropertyName()).getCurve());
    return res;
  }
View Full Code Here


        pMovie.getGlobalScripts()[i] = readGlobalScript(ATTR_SCRIPT_GLOBAL + idxStr, ATTR_SCRIPT_GLOBAL + idxStr + AMPLITUDE_POSTFIX, ATTR_SCRIPT_GLOBAL + idxStr + AMPLITUDE_CURVE_POSTFIX, atts);
      }
    }

    if ((hs = atts.get(ATTR_SCRIPT_XFORM)) != null) { // legacy
      pMovie.getxFormScripts()[0] = new XFormScript(XFormScriptType.valueOf(hs), 1.0);
    }
    for (int i = 0; i < FlameMovie.SCRIPT_COUNT; i++) {
      String idxStr = String.valueOf(i + 1);
      if ((hs = atts.get(ATTR_SCRIPT_XFORM + idxStr)) != null) {
        pMovie.getxFormScripts()[i] = readXFormScript(ATTR_SCRIPT_XFORM + idxStr, ATTR_SCRIPT_XFORM + idxStr + AMPLITUDE_POSTFIX, ATTR_SCRIPT_XFORM + idxStr + AMPLITUDE_CURVE_POSTFIX, atts);
View Full Code Here

    AbstractFlameReader.readMotionCurveAttributes(pAtts, script.getAmplitudeCurve(), pAttrScript + Tools.CURVE_POSTFIX + "_");
    return script;
  }

  private XFormScript readXFormScript(String pAttrScript, String pAttrScriptAmplitude, String pAttrScriptAmplitudeCurve, XMLAttributes pAtts) {
    XFormScript script = new XFormScript();
    String hs;
    if ((hs = pAtts.get(pAttrScript)) != null) {
      try {
        script.setScriptType(XFormScriptType.valueOf(hs));
      }
      catch (Exception ex) {
        ex.printStackTrace();
      }
    }
    if ((hs = pAtts.get(pAttrScriptAmplitude)) != null) {
      script.setAmplitude(Double.parseDouble(hs));
    }
    AbstractFlameReader.readMotionCurveAttributes(pAtts, script.getAmplitudeCurve(), pAttrScript + Tools.CURVE_POSTFIX + "_");
    return script;
  }
View Full Code Here

      movie.getGlobalScripts()[2] = new GlobalScript(GlobalScriptType.MOVE_CAM_Z, amplitude);
    }

    {
      double amplitude = -0.5 * Math.random() * 1.0;
      movie.getxFormScripts()[0] = new XFormScript(XFormScriptType.ROTATE_2ND_XFORM, amplitude);
    }

    return movie;
  }
View Full Code Here

      movie.getGlobalScripts()[2] = new GlobalScript(GlobalScriptType.MOVE_CAM_Z, amplitude);
    }

    {
      double amplitude = -0.5 * Math.random() * 1.0;
      movie.getxFormScripts()[0] = new XFormScript(XFormScriptType.ROTATE_FIRST_XFORM, amplitude);
    }

    return movie;
  }
View Full Code Here

TOP

Related Classes of org.jwildfire.create.tina.animate.XFormScript

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.