/** * Dump FBX to the given output stream. * * @param file the file to dump. * @param out the output stream where to output. */ public static void dumpFBX(FBXFile file, OutputStream out) { Map<Long, FBXElement> uidToObjectMap = createUidToObjectMap(file); PrintStream ps = new PrintStream(out); for (FBXElement rootElement : file.rootElements) { dumpFBXElement(rootElement, ps, 0, uidToObjectMap); } }
/** * Dump FBX to standard output. * * @param file the file to dump. */ public static void dumpFBX(FBXFile file) { dumpFBX(file, System.out); }
protected static void dumpFBXElement(FBXElement el, PrintStream ps, int indent, Map<Long, FBXElement> uidToObjectMap) { String indentStr = indent(indent * 4); String textId = el.id; Object property = el.properties.get(i); char propertyType = el.propertiesTypes[i]; dumpFBXProperty(el.id, propertyType, property, ps, uidToObjectMap); if (i != el.properties.size() - 1) { ps.print(", "); ps.println(" {"); for (FBXElement childElement : el.children) { dumpFBXElement(childElement, ps, indent + 1, uidToObjectMap);
ps.print("\"" + convertFBXString(str) + "\""); break; case 'R': if (element != null) { String name = (String) element.properties.get(1); ps.print("\"" + convertFBXString(name) + "\""); } else { ps.print(property); for (int j = 0; j < length; j++) { Object arrayEntry = Array.get(property, j); dumpFBXProperty(id, Character.toUpperCase(propertyType), arrayEntry, ps, uidToObjectMap); if (j != length - 1) { ps.print(",");