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

Function _writeTransformSpace

python/Scripts/genmdl.py:215–218  ·  view source on GitHub ↗
(file, outputType, functionName, input, fromspace, tospace)

Source from the content-addressed store, hash-verified

213 file.write(INDENT + 'if (mxp_value1 ' + comparator + ' mxp_value2) { return mxp_in1; } return mxp_in2;\n' )
214
215def _writeTransformSpace(file, outputType, functionName, input, fromspace, tospace):
216 file.write(INDENT + 'state::coordinate_space fromSpace = ::mx_map_space(' + fromspace + ');\n')
217 file.write(INDENT + 'state::coordinate_space toSpace = ::mx_map_space(' + tospace + ');\n')
218 file.write(INDENT + 'return mk_' + outputType + '( state::' + functionName + '(fromSpace, toSpace, ' + input + '));\n')
219
220def writeNormalMap(file):
221 file.write(INDENT + 'if (mxp_space == "tangent")\n')

Callers 1

mainFunction · 0.85

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected