thanks for your reply and sorry for not replying earlier.
I did take a look at your script, but couldn't get it to work. I copied to corner pin matrix values to a new corner pin, but they don't seem to match. Any idea? Then again, I'm no python expert.
The script Pete O'Connel posted to this list eralier works, but I don't get any animated values out of it. Anyone know how to modyfi it? Basically I want to run the script on a corner-pin node, and create a Gridwarp with that transform matrix.
Here's Pete's script again. Hope you don't mind me reposting it.
import nukedef getTheCornerpinAsMatrix():
projectionMatrixTo = nuke.math.Matrix4()
projectionMatrixFrom = nuke.math.Matrix4()
#dir(projectionMatrix) theCornerpinNode = nuke.selectedNode()
imageWidth = float(theCornerpinNode.width())
imageHeight = float(theCornerpinNode.height())
to1x = theCornerpinNode['to1'].value()[0]
to1y = theCornerpinNode['to1'].value()[1] to2x = theCornerpinNode['to2'].value()[0]
to2y = theCornerpinNode['to2'].value()[1] to3x = theCornerpinNode['to3'].value()[0]
to3y = theCornerpinNode['to3'].value()[1] to4x = theCornerpinNode['to4'].value()[0]
to4y = theCornerpinNode['to4'].value()[1]
from1x = theCornerpinNode['from1'].value()[0] from1y = theCornerpinNode['from1'].value()[1]
from2x = theCornerpinNode['from2'].value()[0] from2y = theCornerpinNode['from2'].value()[1]
from3x = theCornerpinNode['from3'].value()[0] from3y = theCornerpinNode['from3'].value()[1]
from4x = theCornerpinNode['from4'].value()[0] from4y = theCornerpinNode['from4'].value()[1]
projectionMatrixTo.mapUnitSquareToQuad(to1x,to1y,to2x,to2y,to3x,to3y,to4x,to4y)
projectionMatrixFrom.mapUnitSquareToQuad(from1x,from1y,from2x,from2y,from3x,from3y,from4x,from4y)
theCornerpinAsMatrix = projectionMatrixTo*projectionMatrixFrom.inverse() theCornerpinAsMatrix.transpose()
return theCornerpinAsMatrix