| 1296 | } |
| 1297 | |
| 1298 | bool Material::isAppearanceModelComplete(const QString& uuid) const |
| 1299 | { |
| 1300 | if (!hasAppearanceModel(uuid)) { |
| 1301 | return false; |
| 1302 | } |
| 1303 | |
| 1304 | auto& manager = ModelManager::getManager(); |
| 1305 | |
| 1306 | try { |
| 1307 | auto model = manager.getModel(uuid); |
| 1308 | for (auto& it : *model) { |
| 1309 | QString propertyName = it.first; |
| 1310 | auto property = getAppearanceProperty(propertyName); |
| 1311 | |
| 1312 | if (property->isNull()) { |
| 1313 | return false; |
| 1314 | } |
| 1315 | } |
| 1316 | } |
| 1317 | catch (ModelNotFound const&) { |
| 1318 | return false; |
| 1319 | } |
| 1320 | |
| 1321 | return true; |
| 1322 | } |
| 1323 | |
| 1324 | void Material::saveGeneral(QTextStream& stream) const |
| 1325 | { |