MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/MaterialX / expandTypeSet

Function expandTypeSet

python/Scripts/comparenodedefs.py:98–111  ·  view source on GitHub ↗

Expand type groups to concrete types. Returns list of (concreteType, groupName) tuples.

(types, typeGroups, typeGroupVariables)

Source from the content-addressed store, hash-verified

96 return result, None
97
98def expandTypeSet(types, typeGroups, typeGroupVariables):
99 '''Expand type groups to concrete types. Returns list of (concreteType, groupName) tuples.'''
100 result = []
101 for t in types:
102 if t in typeGroups:
103 for concrete in typeGroups[t]:
104 result.append((concrete, t))
105 elif t in typeGroupVariables:
106 baseGroup = typeGroupVariables[t]
107 for concrete in typeGroups[baseGroup]:
108 result.append((concrete, t))
109 else:
110 result.append((t, None))
111 return result
112
113
114# -----------------------------------------------------------------------------

Callers 1

expandSpecSignaturesFunction · 0.85

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected