Hello, I have question about exporting.
I change scale of objects just before exporting to OBJ, but when I open exported file in Blender it shows dimensions before scaling.
My code:
scene.traverse(function (object) {
if (object.isMesh) {
if (object.scale.x > 0) {
object.scale.x = object.scale.x / 100;
object.geometry.scale.x = object.scale.x / 100;
}
else {
object.scale.x = object.scale.x * 100;
}
if (object.scale.y > 0) {
object.scale.y = object.scale.y / 100;
}
else {
object.scale.y = object.scale.y * 100;
}
if (object.scale.z > 0) {
object.scale.z = object.scale.z / 100;
}
else {
object.scale.z = object.scale.z * 100;
}
}
});
try {
var result = exporter.parse(scene);
var blob = new Blob([result], { type: "text/plain;charset=utf-8" });
saveAs(blob, "filename.obj");
}
catch (error) {
bootbox.alert("Błąd zapisu do pliku OBJ. Prawodpodobnie jeden z elementów planszy jest nieprawidłowy");
}
Whats wrong with that code?
Thanks