diff --git a/src/qtgui/save.cpp b/src/qtgui/save.cpp index 37466fd6..c8f190fe 100644 --- a/src/qtgui/save.cpp +++ b/src/qtgui/save.cpp @@ -142,6 +142,14 @@ void saveScene(QWidget *parent, SceneContext *ctx, const QString &targetFile) { } fovProperty.setAttribute("value", QString::number(sceneCamera->getFov())); + QDomElement focusDepthProperty = findProperty(camera, "focusDepth"); + if (focusDepthProperty.isNull()) { + focusDepthProperty = doc.createElement("float"); + focusDepthProperty.setAttribute("name", "focusDepth"); + camera.insertBefore(focusDepthProperty, QDomNode()); + } + focusDepthProperty.setAttribute("value", QString::number(sceneCamera->getFocusDepth())); + QDomElement cameraTransform = findUniqueChild(camera, "transform"); if (cameraTransform.isNull()) { cameraTransform = doc.createElement("transform");