Showing the changes to libraries/script-engine/src/ModelScriptingInterface.cpp (1 of 3 files). Show all
Unified · Split
| @@ -44,17 +44,10 @@ void meshesFromScriptValue(const QScriptValue& value, MeshProxyList &out) { · 43 unmodified lines | |||
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | QString ModelScriptingInterface::meshToOBJ(MeshProxyList in) { | 46 | QString ModelScriptingInterface::meshToOBJ(MeshProxyList in) { |
| 47 | bool success; | ||
| 48 | QString filename = "/tmp/okokok.obj"; | ||
| 49 | |||
| 50 | QList<MeshPointer> meshes; | 47 | QList<MeshPointer> meshes; |
| 51 | foreach (const MeshProxy* meshProxy, in) { | 48 | foreach (const MeshProxy* meshProxy, in) { |
| 52 | meshes.append(meshProxy->getMeshPointer()); | 49 | meshes.append(meshProxy->getMeshPointer()); |
| 53 | } | 50 | } |
| 54 | 51 | ||
| 55 | success = writeOBJToFile(filename, meshes); | 52 | return writeOBJToString(meshes); |
| 56 | if (!success) { | ||
| 57 | return ""; | ||
| 58 | } | ||
| 59 | return filename; | ||
| 60 | } | 53 | } |