Hide .baked items from the Asset Browser

This commit is contained in:
Atlante45 2017-08-29 16:43:25 -07:00
parent 3aee6db1e8
commit da2bede6fe
2 changed files with 12 additions and 3 deletions

View file

@ -521,9 +521,11 @@ void AssetServer::handleGetAllMappingOperation(ReceivedMessage& message, SharedN
replyPacket.writePrimitive(count);
for (auto it = _fileMappings.cbegin(); it != _fileMappings.cend(); ++ it) {
replyPacket.writeString(it.key());
replyPacket.write(QByteArray::fromHex(it.value().toString().toUtf8()));
replyPacket.writePrimitive(getAssetStatus(it.key(), it.value().toString()));
auto mapping = it.key();
auto hash = it.value().toString();
replyPacket.writeString(mapping);
replyPacket.write(QByteArray::fromHex(hash.toUtf8()));
replyPacket.writePrimitive(getAssetStatus(mapping, hash));
}
}

View file

@ -202,6 +202,13 @@ void AssetMappingModel::refresh() {
auto existingPaths = _pathToItemMap.keys();
for (auto& mapping : mappings) {
auto& path = mapping.first;
const QString HIDDEN_BAKED_CONTENT_FOLDER = "/.baked/";
if (path.startsWith(HIDDEN_BAKED_CONTENT_FOLDER)) {
// Hide baked mappings
continue;
}
auto parts = path.split("/");
auto length = parts.length();