Пример #1
0
  /** export blocks */
  public static void saveModelBuilder(ModelBuilder model, String filepath) {
    if (model == null) {
      Logger.get().log(Level.WARNING, "Tried to export a null model");
      return;
    }

    JSONObject json = new JSONObject();
    json.put("Name", model.getName());
    json.put("ModelParts", modelPartsBuilderToJSONArray(model.getParts()));
    JSONHelper.writeJSONObjectToFile(new File(filepath), json);
  }