MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / toPath

Function toPath

src/serializers/USDSerializer.h:53–58  ·  view source on GitHub ↗

creates a valid USD path from a string

Source from the content-addressed store, hash-verified

51namespace 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) {

Callers 2

createMaterialsMethod · 0.85
object_id_uniqueMethod · 0.85

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected