Fixes bug #203: Fog material reference inside sensor disappears

metadata
Wenzel Jakob 2013-09-30 11:16:26 +02:00
parent 126aa5e885
commit 24720d5bd3
1 changed files with 10 additions and 0 deletions

View File

@ -231,6 +231,16 @@ void saveScene(QWidget *parent, SceneContext *ctx, const QString &targetFile) {
setProperties(ctx->doc, rfilter,
ctx->scene->getFilm()->getReconstructionFilter()->getProperties());
// ====================================================================
// Serialize medium references of the sensor
// ====================================================================
QList<QDomElement> oldSensorReferences = findAllChildren(oldSensor, "ref");
oldSensorReferences.append(findAllChildren(oldSensor, "medium"));
for (int i=0; i<oldSensorReferences.size(); ++i)
sensor.appendChild(ctx->doc.importNode(oldSensorReferences[i], true));
// ====================================================================
// Serialize the integrator configuration
// ====================================================================