Hi Mike,

There's no document for it as far as I know, but the syntax is basically TCL, with all commands unknown to TCL (e.g. "Grade") being interpreted as node types, and the lines inside the node types setting knob values.

However, I'd recommend you avoid working with .nk files if at all possible, as I'm sure you'll come up with all sorts of complications. If you want to create Nuke scripts from some other sort of scripting language - e.g., to match the output from a different application, or just perform an arbitrary set of operations - I'm sure you'd find it a lot easier to just start up Nuke in terminal mode (nuke -t) and use Nuke's own commands to create the script as you like it. That way you'll have access to higher-level commands such as nuke.createNode(), which will save headaches. If licensing is a worry, it may be useful to know that terminal mode only uses a render licence.

Of course, all of the above depends on exactly what you're trying to do, but I definitely think it's worth considering.

Cheers,

- Chris

On 07/07/2011 7:59 AM, Nathan Rusch wrote:
Not that I've seen or heard of. As far as layout goes, it's basically a TCL command stack, with serialized knob values. Node inputs are simply taken from immediate ancestors in the stack.
-Nathan

*From:* Mike Owen <mailto:[email protected]>
*Sent:* Wednesday, July 06, 2011 11:26 PM
*To:* Nuke Python discussion <mailto:[email protected]> ; Nuke user discussion <mailto:[email protected]> ; [email protected] <mailto:[email protected]>
*Subject:* [Nuke-python] Nuke *.nk File Specification Document
Hi all,
Does a Nuke *.nk File Specification Document, blog post, something else?...exist which documents how a Nuke script is laid out, how branches work, etc. The idea is I could just open up notepad, type a Nuke script, hit save and it would be fully compliant upon opening in Nuke. I'm aware of the basic concepts of how a Nuke script is laid out, I'm just wondering if The Foundry have documented their file format so new TD's, developers can read up on it:
NODETYPE {
knobName knobValue
knobName "knobValue"
knobName {{curve x#Frame# keyvalue x#Frame# keyvalue}}
}
Thanks,
Mike

------------------------------------------------------------------------
_______________________________________________
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


--
Chris Bevan, Senior Software Engineer
The Foundry, 6th Floor, The Communications Building
48 Leicester Square, London, WC2H 7LT
Tel: +44 (0)20 7968 6828 | Fax: +44 (0)20 7930 8906
Web: www.thefoundry.co.uk

The Foundry Visionmongers Ltd
Registered in England and Wales No: 4642027

_______________________________________________
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