well, you could still use hugo's solution, no?
- get width and height of selected node, store it
- reformat to custom format
- reformat to original format using "to box" and "distort"
like (please excuse my crude scripting)
n = nuke.selectedNode()
w = nuke.selectedNode().width()
h = nuke.selectedNode().height()
pA = nuke.selectedNode().pixelAspect
reformat1 = nuke.nodes.Reformat()
reformat1.knob("format").setValue("PAL")
reformat1.setInput(0, n)
reformat2 = nuke.nodes.Reformat()
reformat2.knob("type").setValue("to box")
reformat2.knob("resize").setValue("distort")
reformat2.knob("box_width").setValue(w)
reformat2.knob("box_height").setValue(h)
reformat2.setInput(0, reformat1)
you probably could also compare the width/height/pixel
aspect to a list of all your formats using a script and then
use this info, but unless you want to do something fancy the
simple approach above should work just as well.
++ chris
On 2/24/11 at 1:10 PM, [email protected] (Adam Wierzchowski) wrote:
Actually I need a name of the format. I'm doing reformat to
custom format and then I create next Reformat node which should
return to original format. Something like this:
reformat1 = nuke.nodes.Reformat()
reformat1.knob("format").setValue(customFormat)
reformat2 = nuke.nodes.Reformat()
reformat2.knob("format").setValue(origFormat)
Adam
_______________________________________________
Nuke-python mailing list
[email protected]
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/
nuke-python
_______________________________________________
Nuke-python mailing list
[email protected]
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python