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

Function getConvertedValue

python/Scripts/mxvalidate.py:320–329  ·  view source on GitHub ↗
(elem)

Source from the content-addressed store, hash-verified

318
319# Return a value string for the element, converting units if appropriate
320def getConvertedValue(elem):
321 if elem.getType() in ["float", "vector2", "vector3", "vector4"]:
322 if elem.hasUnit():
323 u = elem.getUnit()
324 print ("[Unit for %s is %s]" % (elem.getName(), u))
325 if elem.hasUnitType():
326 utype = elem.getUnitType()
327 print ("[Unittype for %s is %s]" % (elem.getName(), utype))
328 # NOTDONE...
329 return elem.getValueString()
330
331def getGeoms(elem, resolve):
332 s = ""

Callers 3

listContentsFunction · 0.85
listShaderBindingsFunction · 0.85
traverseInputsFunction · 0.85

Calls 4

printFunction · 0.85
getTypeMethod · 0.45
getNameMethod · 0.45
getValueStringMethod · 0.45

Tested by

no test coverage detected