some bugfixes, nicer importer XML output
parent
715c0589f7
commit
622dfa78f7
|
@ -96,6 +96,8 @@ bool cleanupPass(DOMNode *node, const std::set<std::string> &removals) {
|
||||||
XMLString::release(&value);
|
XMLString::release(&value);
|
||||||
}
|
}
|
||||||
XMLString::release(&nodeName);
|
XMLString::release(&nodeName);
|
||||||
|
} else if (node->getNodeType() == DOMNode::TEXT_NODE) {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
DOMNode *child = node->getFirstChild();
|
DOMNode *child = node->getFirstChild();
|
||||||
while (child) {
|
while (child) {
|
||||||
|
@ -181,7 +183,8 @@ void GeometryConverter::convert(const std::string &inputFile,
|
||||||
XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc = parser->parse(wrapper);
|
XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc = parser->parse(wrapper);
|
||||||
XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *adj = parser->parseURI(adjustmentFile.c_str());
|
XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *adj = parser->parseURI(adjustmentFile.c_str());
|
||||||
|
|
||||||
std::set<std::string> removals;
|
std::set<std::string> removals, emptyList;
|
||||||
|
cleanupPass(adj, emptyList);
|
||||||
findRemovals(adj, removals);
|
findRemovals(adj, removals);
|
||||||
cleanupPass(doc, removals);
|
cleanupPass(doc, removals);
|
||||||
|
|
||||||
|
@ -212,6 +215,7 @@ void GeometryConverter::convert(const std::string &inputFile,
|
||||||
}
|
}
|
||||||
|
|
||||||
for (DOMNode *child = adjRoot->getFirstChild(); child != 0; child=child->getNextSibling())
|
for (DOMNode *child = adjRoot->getFirstChild(); child != 0; child=child->getNextSibling())
|
||||||
|
if (child->getNodeType() == DOMNode::ELEMENT_NODE)
|
||||||
docRoot->insertBefore(doc->importNode(child, true), insertBeforeNode);
|
docRoot->insertBefore(doc->importNode(child, true), insertBeforeNode);
|
||||||
|
|
||||||
DOMLSSerializer *serializer = impl->createLSSerializer();
|
DOMLSSerializer *serializer = impl->createLSSerializer();
|
||||||
|
|
|
@ -64,7 +64,8 @@ private:
|
||||||
static int localWorkerCtr = 0, remoteWorkerCtr = 0;
|
static int localWorkerCtr = 0, remoteWorkerCtr = 0;
|
||||||
|
|
||||||
MainWindow::MainWindow(QWidget *parent) :
|
MainWindow::MainWindow(QWidget *parent) :
|
||||||
QMainWindow(parent), ui(new Ui::MainWindow), m_activeWindowHack(false) {
|
QMainWindow(parent), ui(new Ui::MainWindow),
|
||||||
|
m_networkReply(NULL), m_activeWindowHack(false) {
|
||||||
Logger *logger = Thread::getThread()->getLogger();
|
Logger *logger = Thread::getThread()->getLogger();
|
||||||
|
|
||||||
#if defined(__OSX__)
|
#if defined(__OSX__)
|
||||||
|
@ -289,6 +290,8 @@ MainWindow::~MainWindow() {
|
||||||
ServerConnection &c = m_connections[i];
|
ServerConnection &c = m_connections[i];
|
||||||
scheduler->unregisterWorker(c.worker);
|
scheduler->unregisterWorker(c.worker);
|
||||||
}
|
}
|
||||||
|
if (m_networkReply)
|
||||||
|
m_networkReply->abort();
|
||||||
#if defined(__OSX__)
|
#if defined(__OSX__)
|
||||||
delete ui->menuBar;
|
delete ui->menuBar;
|
||||||
#endif
|
#endif
|
||||||
|
@ -381,7 +384,7 @@ void MainWindow::adjustSize() {
|
||||||
|
|
||||||
void MainWindow::checkForUpdates(bool notifyIfNone) {
|
void MainWindow::checkForUpdates(bool notifyIfNone) {
|
||||||
m_notifyIfNoUpdates = notifyIfNone;
|
m_notifyIfNoUpdates = notifyIfNone;
|
||||||
m_networkManager->get(QNetworkRequest(QUrl("http://www.mitsuba-renderer.org/version")));
|
m_networkReply = m_networkManager->get(QNetworkRequest(QUrl("http://www.mitsuba-renderer.org/version")));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::onNetworkFinished(QNetworkReply *reply) {
|
void MainWindow::onNetworkFinished(QNetworkReply *reply) {
|
||||||
|
|
|
@ -145,6 +145,7 @@ private:
|
||||||
ServerWidget *m_serverWidget;
|
ServerWidget *m_serverWidget;
|
||||||
ref<QConsoleAppender> m_consoleAppender;
|
ref<QConsoleAppender> m_consoleAppender;
|
||||||
QNetworkAccessManager *m_networkManager;
|
QNetworkAccessManager *m_networkManager;
|
||||||
|
QNetworkReply *m_networkReply;
|
||||||
QProgressBar *m_progress;
|
QProgressBar *m_progress;
|
||||||
QLabel *m_progressLabel;
|
QLabel *m_progressLabel;
|
||||||
QWidget *m_progressWidget;
|
QWidget *m_progressWidget;
|
||||||
|
|
|
@ -62,9 +62,9 @@ PreviewSettingsDialog::PreviewSettingsDialog(QWidget *parent, SceneContext *ctx,
|
||||||
cap->isSupported(RendererCapabilities::EGeometryShaders)));
|
cap->isSupported(RendererCapabilities::EGeometryShaders)));
|
||||||
ui->previewMethodCombo->setCurrentIndex(ctx->previewMethod);
|
ui->previewMethodCombo->setCurrentIndex(ctx->previewMethod);
|
||||||
ui->toneMappingMethodCombo->setCurrentIndex(ctx->toneMappingMethod);
|
ui->toneMappingMethodCombo->setCurrentIndex(ctx->toneMappingMethod);
|
||||||
|
m_ignoreEvent = false;
|
||||||
ui->exposureSlider->setValue((int) ((ctx->toneMappingMethod == EGamma
|
ui->exposureSlider->setValue((int) ((ctx->toneMappingMethod == EGamma
|
||||||
? ctx->exposure : ctx->reinhardBurn)*100));
|
? ctx->exposure : ctx->reinhardBurn)*100));
|
||||||
m_ignoreEvent = false;
|
|
||||||
ui->keySlider->setValue((int) ((ctx->reinhardKey-REINHARD_MIN)/REINHARD_RANGE * 100));
|
ui->keySlider->setValue((int) ((ctx->reinhardKey-REINHARD_MIN)/REINHARD_RANGE * 100));
|
||||||
ui->diffuseReceiversBox->setEnabled(ui->diffuseSourcesBox->isChecked());
|
ui->diffuseReceiversBox->setEnabled(ui->diffuseSourcesBox->isChecked());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue