metadata
Steve Marschner 2011-06-20 17:38:05 +02:00
commit 6467c329e2
1 changed files with 8 additions and 0 deletions

View File

@ -142,6 +142,14 @@ void saveScene(QWidget *parent, SceneContext *ctx, const QString &targetFile) {
} }
fovProperty.setAttribute("value", QString::number(sceneCamera->getFov())); 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"); QDomElement cameraTransform = findUniqueChild(camera, "transform");
if (cameraTransform.isNull()) { if (cameraTransform.isNull()) {
cameraTransform = doc.createElement("transform"); cameraTransform = doc.createElement("transform");