String getMeshState(Mesh mesh, String type) { StringBuffer s = new StringBuffer(); if (mesh == null) return ""; if (mesh.showPoints) appendCmd(s, type + " dots"); if (mesh.drawTriangles) appendCmd(s, type + " mesh"); if (!mesh.fillTriangles) appendCmd(s, type + " nofill"); if (!mesh.visible) appendCmd(s, type + " off"); return s.toString(); }
String getShapeState() { StringBuffer s = new StringBuffer(); for (int i = 0; i < meshCount; i++) { String cmd = meshes[i].scriptCommand; if (cmd == null) continue; Mesh mesh = meshes[i]; if (mesh.modelIndex > 0 && modelCount > 1) appendCmd(s, "frame " + viewer.getModelNumber(mesh.modelIndex)); s.append(cmd + "\n"); if (cmd.charAt(0) != '#') { s.append(getMeshState(mesh, myType)); if (mesh.vertexColixes == null) appendCmd(s, getColorCommand("$" + mesh.thisID, mesh.colix)); } } return s.toString(); }