public Object load(AssetInfo info) throws IOException {
    this.assetManager = info.getManager();

    InputStream in = info.openStream();
    try {
      key = info.getKey();
      if (key.getExtension().equals("j3m") && !(key instanceof MaterialKey)) {
        throw new IOException("Material instances must be loaded via MaterialKey");
      } else if (key.getExtension().equals("j3md") && key instanceof MaterialKey) {
        throw new IOException("Material definitions must be loaded via AssetKey");
      }
      loadFromRoot(BlockLanguageParser.parse(in));
    } finally {
      if (in != null) {
        in.close();
      }
    }

    if (material != null) {
      // material implementation
      return material;
    } else {
      // material definition
      return materialDef;
    }
  }
  public void applySettings(WizardDescriptor wiz) {
    // reset
    wiz.putProperty("path", null);
    wiz.putProperty("manager", null);
    wiz.putProperty("dataobject", null);
    wiz.putProperty("assetdata", null);
    wiz.putProperty("mainkey", null);
    wiz.putProperty("destpath", null);

    wiz.putProperty("assetlist", null);
    wiz.putProperty("failedlist", null);
    wiz.putProperty("model", null);

    UberAssetLocator.resetLocatedList();
    UberAssetLocator.setFindMode(true);
    manager.clearCache();
    wiz.putProperty("path", currentPath);
    wiz.putProperty("manager", manager);
    wiz.putProperty("dataobject", dataObject);
    wiz.putProperty("assetdata", data);
    wiz.putProperty("mainkey", mainKey);
    if (mainKey != null) {
      wiz.putProperty(
          "destpath",
          "Models/"
              + mainKey.getName().replaceAll(mainKey.getExtension(), "").replaceAll("\\.", "")
              + "/");
    }
  }