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(&nodeName);
|
||||
} else if (node->getNodeType() == DOMNode::TEXT_NODE) {
|
||||
return true;
|
||||
}
|
||||
DOMNode *child = node->getFirstChild();
|
||||
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 *adj = parser->parseURI(adjustmentFile.c_str());
|
||||
|
||||
std::set<std::string> removals;
|
||||
std::set<std::string> removals, emptyList;
|
||||
cleanupPass(adj, emptyList);
|
||||
findRemovals(adj, removals);
|
||||
cleanupPass(doc, removals);
|
||||
|
||||
|
@ -212,7 +215,8 @@ void GeometryConverter::convert(const std::string &inputFile,
|
|||
}
|
||||
|
||||
for (DOMNode *child = adjRoot->getFirstChild(); child != 0; child=child->getNextSibling())
|
||||
docRoot->insertBefore(doc->importNode(child, true), insertBeforeNode);
|
||||
if (child->getNodeType() == DOMNode::ELEMENT_NODE)
|
||||
docRoot->insertBefore(doc->importNode(child, true), insertBeforeNode);
|
||||
|
||||
DOMLSSerializer *serializer = impl->createLSSerializer();
|
||||
DOMConfiguration *serConf(serializer->getDomConfig());
|
||||
|
|
|
@ -64,7 +64,8 @@ private:
|
|||
static int localWorkerCtr = 0, remoteWorkerCtr = 0;
|
||||
|
||||
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();
|
||||
|
||||
#if defined(__OSX__)
|
||||
|
@ -289,6 +290,8 @@ MainWindow::~MainWindow() {
|
|||
ServerConnection &c = m_connections[i];
|
||||
scheduler->unregisterWorker(c.worker);
|
||||
}
|
||||
if (m_networkReply)
|
||||
m_networkReply->abort();
|
||||
#if defined(__OSX__)
|
||||
delete ui->menuBar;
|
||||
#endif
|
||||
|
@ -381,7 +384,7 @@ void MainWindow::adjustSize() {
|
|||
|
||||
void MainWindow::checkForUpdates(bool 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) {
|
||||
|
|
|
@ -145,6 +145,7 @@ private:
|
|||
ServerWidget *m_serverWidget;
|
||||
ref<QConsoleAppender> m_consoleAppender;
|
||||
QNetworkAccessManager *m_networkManager;
|
||||
QNetworkReply *m_networkReply;
|
||||
QProgressBar *m_progress;
|
||||
QLabel *m_progressLabel;
|
||||
QWidget *m_progressWidget;
|
||||
|
|
|
@ -62,9 +62,9 @@ PreviewSettingsDialog::PreviewSettingsDialog(QWidget *parent, SceneContext *ctx,
|
|||
cap->isSupported(RendererCapabilities::EGeometryShaders)));
|
||||
ui->previewMethodCombo->setCurrentIndex(ctx->previewMethod);
|
||||
ui->toneMappingMethodCombo->setCurrentIndex(ctx->toneMappingMethod);
|
||||
m_ignoreEvent = false;
|
||||
ui->exposureSlider->setValue((int) ((ctx->toneMappingMethod == EGamma
|
||||
? ctx->exposure : ctx->reinhardBurn)*100));
|
||||
m_ignoreEvent = false;
|
||||
ui->keySlider->setValue((int) ((ctx->reinhardKey-REINHARD_MIN)/REINHARD_RANGE * 100));
|
||||
ui->diffuseReceiversBox->setEnabled(ui->diffuseSourcesBox->isChecked());
|
||||
|
||||
|
|
Loading…
Reference in New Issue