Skip to content

Instantly share code, notes, and snippets.

@EricTRocks
Created April 21, 2016 19:04
Show Gist options
  • Save EricTRocks/e4e58c83ff884e960cf1785bc23b2724 to your computer and use it in GitHub Desktop.
Save EricTRocks/e4e58c83ff884e960cf1785bc23b2724 to your computer and use it in GitHub Desktop.
How to create a 2DArray of RTVals
import FabricEngine.Core as fabric
client = fabric.createClient()
client.loadExtension("Math")
matrixA = client.RT.types.Mat44()
matrixB = client.RT.types.Mat44()
matrixC = client.RT.types.Mat44()
matrixD = client.RT.types.Mat44()
array1 = client.RT.types.Mat44.createArray([matrixA, matrixB])
array2 = client.RT.types.Mat44.createArray([matrixC, matrixD])
registeredTypes = client.RT.types
mat44ArrayType = getattr(registeredTypes, 'Mat44[]')
matrix2DArray = mat44ArrayType.createArray([array1, array2])
print matrix2DArray
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment