It is not currently possible to change the nodes exported by default from NukeStudio/Hiero, when exporting a Nuke script using the 'Export..' option or creating the Nuke script via 'Create Comp' or 'Create Comp Special...'.
At export time, the nodes that get added to the Nuke script are created via the hiero.core.nuke.ScriptWriter class. To manually change the default nodes you can override this class and customize the node knobs as required.
Below you can find an example illustrating how to customize the Read node knobs. The script works by:
1) Inheriting the original hiero.core.nuke.ScriptWriter class.
2) Subclassing the
addNode() method so that it calls the
onNodeAdded() for each node.
3) Defining the
onNodeAdded() method. This method defines what changes to apply to which nodes and can be edited to customize the required node settings.
4) Overriding the original ScriptWriter with the edited version.
To use the edited version, you have to save the Python script to .nuke/Python/Startup.
If the Python and Startup directories do not already exist in your .nuke directory, then you will need to create them manually. More information about these directories can be found here:
Q100142: How to execute Hiero Python code in Nuke Studio and Hiero on startup
The Python script can be downloaded from the link below.
We're sorry to hear thatPlease tell us why