Examples of MotionCurve


Examples of org.jwildfire.create.tina.base.motion.MotionCurve

    if (!curve.isEnabled()) {
      curve.assignFromEnvelope(envelope);
      curve.setEnabled(true);
    }
    else {
      MotionCurve newParentCurve = new MotionCurve();
      newParentCurve.setEnabled(true);
      newParentCurve.assignFromEnvelope(envelope);
      while (curve.getParent() != null) {
        curve = curve.getParent();
      }
      curve.setParent(newParentCurve);
    }
View Full Code Here

Examples of org.jwildfire.create.tina.base.motion.MotionCurve

      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:
View Full Code Here

Examples of org.jwildfire.create.tina.base.motion.MotionCurve

              attrList.add(pXB.createAttr((fName + "_" + params[i]), (Double) vals[i]));
            }
            else {
              throw new IllegalStateException();
            }
            MotionCurve curve = v.getMotionCurve(params[i]);
            if (curve != null) {
              writeMotionCurve(pXB, attrList, fName + "_" + params[i], curve);
            }
          }
        }
View Full Code Here

Examples of org.jwildfire.create.tina.base.motion.MotionCurve

    }
  }

  protected void writeMotionCurves(Object source, SimpleXMLBuilder xb, List<SimpleXMLBuilder.Attribute<?>> attrList, String pNamePrefix, List<String> pNameBlackList) throws Exception {
    for (MotionCurveAttribute attribute : AnimationService.getAllMotionCurves(source)) {
      MotionCurve curve = attribute.getMotionCurve();
      String name = pNamePrefix == null ? attribute.getName() : pNamePrefix + attribute.getName();
      if (!pNameBlackList.contains(name)) {
        writeMotionCurve(xb, attrList, name, curve);
      }
    }
View Full Code Here

Examples of org.jwildfire.create.tina.base.motion.MotionCurve

    private final MotionCurve motionCurve;

    public ScriptContainer(JComboBox pScriptCmb, JWFNumberField pSscriptREd) {
      scriptCmb = pScriptCmb;
      scriptREd = pSscriptREd;
      motionCurve = new MotionCurve();
    }
View Full Code Here

Examples of org.jwildfire.create.tina.base.motion.MotionCurve

    func = VariationFuncList.getVariationFuncInstance(var.func.getName());

    // motionCurves
    motionCurves.clear();
    for (String name : var.motionCurves.keySet()) {
      MotionCurve copy = new MotionCurve();
      copy.assign(var.motionCurves.get(name));
      motionCurves.put(name, copy);
    }

    // params
    {
View Full Code Here

Examples of org.jwildfire.create.tina.base.motion.MotionCurve

  public MotionCurve createMotionCurve(String pName) {
    if (getMotionCurve(pName) != null) {
      throw new RuntimeException("Motion curve <" + pName + "> already exists");
    }
    MotionCurve curve = new MotionCurve();
    motionCurves.put(pName, curve);
    return curve;
  }
View Full Code Here

Examples of org.jwildfire.create.tina.base.motion.MotionCurve

            initialValue = Double.parseDouble(valStr);
          }
          catch (Exception ex) {
            initialValue = 0.0;
          }
          MotionCurve curve = var.getMotionCurve(propertyname);
          if (curve == null) {
            curve = var.createMotionCurve(propertyname);
          }
          variationControlsDelegates[pIdx].editMotionCurve(curve, initialValue, propertyname, "variation property \"" + propertyname + "\"");
          variationControlsDelegates[pIdx].enableControl(data.TinaNonlinearControlsRows[pIdx].getNonlinearParamsREd(), curve, false);
View Full Code Here

Examples of org.jwildfire.create.tina.base.motion.MotionCurve

      owner.refreshFlameImage(false);
    }
  }

  protected void editMotionCurve(String pPropName, String pLabel) {
    MotionCurve curve = getCurveToEdit(pPropName);
    double initialValue;
    try {
      initialValue = getInitialValue(pPropName);
    }
    catch (Exception ex) {
View Full Code Here

Examples of org.jwildfire.create.tina.base.motion.MotionCurve

    boolean mainButtonEnabled = false;
    boolean hasCurve = false;
    if (!pDisabled && isEnabled()) {
      controlEnabled = true;
      if (pPropertyName != null && pPropertyName.length() > 0) {
        MotionCurve curve = getCurveToEdit(pPropertyName);
        curveBtnEnabled = true;
        mainButtonEnabled = !curve.isEnabled();
        hasCurve = curve.isEnabled();
      }
      else {
        curveBtnEnabled = false;
        mainButtonEnabled = true;
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.