I may be wrong, but if I remember correctly, by the time "beforeFrameRender"
is called it's too late to change knob values. Try using a "beforeRender"
callback instead, which should happen before the Write node is executed.


On Mon, Jul 4, 2011 at 11:27 AM, Gerard Keating <[email protected]> wrote:

> Hi,
> I have this code in my init.py
>
> def myBeforeFrameRender(*args, **kwargs):
>    nuke.tprint("myBeforeFrameRender called")
>    nuke.tprint(args)
>    nuke.tprint(kwargs)
>    writeNode = nuke.thisNode()
>    nuke.tprint("Write node =%s", writeNode)
>    writeNode['metadata'].setValue("all metadata")
>    mdn = nuke.nodes.ModifyMetaData()
>    mdn['metadata'].fromScript('{set "Tape Name" gerTest}')
>    oldInput=writeNode.dependencies()[0]
>    writeNode.setInput(0, mdn)
>    mdn.setInput(0, oldInput)
>    nuke.tprint(writeNode.metadata())
>
> nuke.callbacks.addBeforeFrameRender(myBeforeFrameRender)
>
> But the exr generated do not the the "Tape Name" header information.
> Can anyone see what I am doign wrong?
> Is there an easier way to add some metadata?
>
> Thanks in advance,
> Gerard Keating.
> _______________________________________________
> Nuke-python mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to