creates a valid USD path from a string
| 51 | namespace usd_utils { |
| 52 | // creates a valid USD path from a string |
| 53 | inline std::string toPath(std::string& s) { |
| 54 | std::replace_if(s.begin(), s.end(), |
| 55 | [](char c) { return c < 48 || (c < 65 && c > 57) || (c < 97 && c > 90) || c > 122; }, |
| 56 | '_'); |
| 57 | return s; |
| 58 | } |
| 59 | |
| 60 | template<typename T> |
| 61 | pxr::VtArray<T> toVtArray(const std::vector<T>& vec) { |
no test coverage detected