| 517 | } |
| 518 | |
| 519 | std::vector<std::pair<aiTextureType, std::string>> SceneParser::normalize_texture_paths(std::vector<std::pair<aiTextureType, std::string>>& paths) |
| 520 | { |
| 521 | std::vector<std::pair<aiTextureType, std::string>> normalized_paths; |
| 522 | normalized_paths.reserve(paths.size()); |
| 523 | |
| 524 | for (auto pair : paths) |
| 525 | { |
| 526 | size_t find_index = pair.second.find("%20"); |
| 527 | while (find_index != (size_t)-1) |
| 528 | { |
| 529 | pair.second = pair.second.replace(find_index, 3, " "); |
| 530 | find_index = pair.second.find("%20"); |
| 531 | } |
| 532 | |
| 533 | normalized_paths.push_back(pair); |
| 534 | } |
| 535 | |
| 536 | return normalized_paths; |
| 537 | } |
| 538 | |
| 539 | CPUMaterial SceneParser::offset_textures_indices(const CPUMaterial& renderer_material, int offset) |
| 540 | { |