oliviano
2/23/2019 - 5:31 AM

Matrix

 m = tdu.Matrix()
 m.translate(5, 0, 0)
 m.rotate(0, 45, 0)
 op('someNode').store(‘xformMat’, m)
 
and in the node parameter you would put:

 op('someNode').fetch(‘xformMat’)
 
 #from SnL Project:
 def getPointPos(index)
  myPoint = gamePathGeo.points[int(Index)]
  return(myPoint.x , myPoint.y, myPoint.z)
 
 def matrixTransfromPos(positionX,positionY,positionZ ):
	#create empty matrix object
	mGamePath = tdu.Matrix()
	#get matrix from GamePath geo component
	mGamePath = op.Render.op('renderNetwork/gamePath').transform()
	#Instanciate Postion as a td.position object
	position = tdu.Position(positionX,positionY,positionZ)
	# create an empty td.position
	newPosition = tdu.Position()
	# get position transformed by matrix.
	newPosition = mGamePath * position
	
	#print("My New Position____" , newPosition)
	return(newPosition)