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.
- Please find more information about the .nuke directory here: Q100048: Nuke Directory Locations
If the Python and Startup directories do not already exist in your .nuke directory, then you will need to create them manually.
The Python script can be downloaded from the link below.
We're sorry to hear thatPlease tell us why