Showing the changes to interface/src/renderer/GeometryCache.cpp (1 of 7 files). Show all
Unified · Split
| @@ -734,6 +734,29 @@ void NetworkGeometry::setTextureWithNameToURL(const QString& name, const QUrl& u · 733 unmodified lines | ||
| 734 | 734 | } |
| 735 | 735 | } |
| 736 | 736 | |
| 737 | +QStringList NetworkGeometry::getTextureNames() const { | |
| 738 | + QStringList result; | |
| 739 | + for (int i = 0; i < _meshes.size(); i++) { | |
| 740 | + const NetworkMesh& mesh = _meshes[i]; | |
| 741 | + for (int j = 0; j < mesh.parts.size(); j++) { | |
| 742 | + const NetworkMeshPart& part = mesh.parts[j]; | |
| 743 | + | |
| 744 | + if (!part.diffuseTextureName.isEmpty()) { | |
| 745 | + result << part.diffuseTextureName; | |
| 746 | + } | |
| 747 | + | |
| 748 | + if (!part.normalTextureName.isEmpty()) { | |
| 749 | + result << part.normalTextureName; | |
| 750 | + } | |
| 751 | + | |
| 752 | + if (!part.specularTextureName.isEmpty()) { | |
| 753 | + result << part.specularTextureName; | |
| 754 | + } | |
| 755 | + } | |
| 756 | + } | |
| 757 | + return result; | |
| 758 | +} | |
| 759 | + | |
| 737 | 760 | /// Reads geometry in a worker thread. |
| 738 | 761 | class GeometryReader : public QRunnable { |
| 739 | 762 | public: |