With an active Python/BlinkScript file, use the command Nuke: Run Inside Nuke from the Command Palette or use the dedicated button in the editor's top right corner.
To use the Python stubs
Use the command Nuke: Add Python Stubs to add the stubs to your python.analysis.extraPaths setting.
Write import nuke into your script.
NOTE: Having a folder named nuke in your Workspace root-directory can cause problems for the suggestions.
1.4. BlinkScript
NOTE: BlinkScript features are available in a basic form. If you would like to see something more, feel free to make a request or open a PR. Also, check out Material Icon Theme that adds a Nuke icon for the .blink file.
Features
Code execution.
Syntax highlighting.
Code formatting.
Simple code suggestion.
Startup saturation snippet.
The extension will create a blinkscript node named after the active file.
If the node already exists, it will update the code and recompile it.
The accepted file extension code are .cpp or .blink.
1.5. PySide2 Template Project
You can create a quick pyside2 template project via the Nuke: Create a PySide2 plugin command. Once done, you can find the plugin inside ~/.nuke/NukeTools and ready to be used inside Nuke.
You can read more on the GitHub README of the project.
1.6. Available Commands
All commands are available by opening the Command Palette (Command+Shift+P on macOS and Ctrl+Shift+P on Windows/Linux) and typing in one of the following Command Name:
Command Name
Command ID
Description
Nuke: Launch main executable
nuke-tools.launchNuke
Launch main executable
Nuke: Launch alternative executable
nuke-tools.launchNukeAlt
Launch alternative executable
Nuke: Launch main executable with prompt
nuke-tools.launchNukeOptArgs
Launch main exec. with prompt for optional args
Nuke: Run Inside Nuke
nuke-tools.runCodeInsideNuke
Execute code inside Nuke
Nuke: Add Stubs to Workspace
nuke-tools.addPythonStubs
Add stubs path to workspace settings
Nuke: Add NukeServerSocket
nuke-tools.addNukeServerSocket
Add NukeServerSocket plugin to .nuke dir and menu.py
Nuke: Create a PySide2 plugin
nuke-tools.createPySide2Project
Create a PySide2 plugin from template
Nuke: Show Network Addresses
nuke-tools.showNetworkAddresses
Show network addresses
Nuke: Debug Message
nuke-tools.testRunInsideNuke
Quick test connection
NOTES:
Nuke: Run Code Inside Nuke command can be executed via a button in the Editor Toolbar.
Nuke: Add NukeServerSocket will copy the plugin folder inside $HOME/.nuke/NukeTools and create
an import statement inside the menu.py file. If menu.py does not exist, it will get created.
By default, the extension does not provide any shortcut. But you can assign each command to one. (see Key Bindings for Visual Studio Code for more information).
Restart the terminal instance instead of creating new ones. Use with caution. This option will terminate every Nuke process spawned by the extension. Useful when rapid testing GUI plugins that don't need saving the composition.
nukeTools.other.clearPreviousOutput: boolean
Clear the previous console output text.
nukeTools.network.enableManualConnection: boolean
If enabled, nukeTools.network.port and nukeTools.network.host will take over the default settings. You might need this option when connecting to another computer.
nukeTools.network.port: string
Specify a different port for the connection. This option only works if nukeTools.network.enableManualConnection is active. The server address should be the same as in the Nuke plugin.
nukeTools.network.host: string
Same as the port. The host could be the local host or the local IP.
nukeTools.network.debug: boolean
Show network debug information in the output window. Enabling this option will not clean the console output after code execution.