Does  your corner pin uses expressions? You may need to bake/generate the animated values.

Magno.


Hi Magno,

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


Best regards,

Simon


2012/6/14 Magno Borgo <mag...@pop.com.br>
The attached script should get you started.



I found this, http://forums.thefoundry.co.uk/phpBB2/viewtopic.php?t=5810&view=previous&sid=5a7db5ea82b78d9cb79f400e14b18493 but unless I'm missing something it doen't seem to work for animated corner pins. Anyone know of a way?

Best regards,
Simon



--
**************************
Magno Borgo

www.borgo.tv
www.boundaryvfx.com

_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python





--
**************************
Magno Borgo

www.borgo.tv
www.boundaryvfx.com
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to