Material: Material editor enhancements

Improves compatibility when using the legacy editor.

Corrects a number of issues that prevented saved files from being displayed when using the legacy editor.

Reduces the verbosity of console messages.
This commit is contained in:
David Carter
2024-02-04 10:55:56 -05:00
committed by Chris Hennes
parent 2ae5663144
commit 2a60613257
7 changed files with 81 additions and 25 deletions

View File

@@ -242,8 +242,8 @@ void MaterialYamlEntry::addToTree(
QString propertyValue =
QString::fromStdString((itp->second).as<std::string>());
if (type == MaterialValue::Image) {
propertyValue =
propertyValue.remove(QRegularExpression(QString::fromStdString("[\r\n]")));
propertyValue = propertyValue.remove(
QRegularExpression(QString::fromStdString("[\r\n]")));
}
finalModel->setPhysicalValue(QString::fromStdString(propertyName),
propertyValue);
@@ -309,8 +309,8 @@ void MaterialYamlEntry::addToTree(
QString propertyValue =
QString::fromStdString((itp->second).as<std::string>());
if (type == MaterialValue::Image) {
propertyValue =
propertyValue.remove(QRegularExpression(QString::fromStdString("[\r\n]")));
propertyValue = propertyValue.remove(
QRegularExpression(QString::fromStdString("[\r\n]")));
}
finalModel->setAppearanceValue(QString::fromStdString(propertyName),
propertyValue);