Skip to content

Commit

Permalink
Import: [skip ci] for glTF export set scale factor of 0.001 because l…
Browse files Browse the repository at this point in the history
…engths are measured in meters
  • Loading branch information
wwmayer committed Apr 10, 2021
1 parent 4e4068e commit e01f0d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Mod/Import/Gui/AppImportGuiPy.cpp
Expand Up @@ -693,7 +693,8 @@ class Module : public Py::ExtensionModule<Module>
TColStd_IndexedDataMapOfStringString aMetadata;
RWGltf_CafWriter aWriter (name8bit.c_str(), file.hasExtension("glb"));
aWriter.SetTransformationFormat (RWGltf_WriterTrsfFormat_Compact);
//aWriter.ChangeCoordinateSystemConverter().SetInputLengthUnit (0.001);
// https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#coordinate-system-and-units
aWriter.ChangeCoordinateSystemConverter().SetInputLengthUnit (0.001);
aWriter.ChangeCoordinateSystemConverter().SetInputCoordinateSystem (RWMesh_CoordinateSystem_Zup);
Standard_Boolean ret = aWriter.Perform (hDoc, aMetadata, Message_ProgressRange());
if (!ret) {
Expand Down

0 comments on commit e01f0d2

Please sign in to comment.