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.
Execute BlinkScript
The extension will create a blinkscript node named after the currently active file.
If the node already exists, it will only modify the code and recompile it.
The accepted file extension code are .cpp or .blink.
1.5. 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: Show Network Addresses
nuke-tools.showNetworkAddresses
Show network addresses
Nuke: Debug Message
nuke-tools.testRunInsideNuke
Quick test connection
Nuke: Run Code Inside Nuke command can get executed through a button in the Editor Toolbar.
The button can be disabled in the settings.
Nuke: Add NukeServerSocket will copy the plugin folder inside $HOME/.nuke and append
an import statement inside the menu.py file: import NukeServerSocket. 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.other.showToolbarButton: boolean
Show the execute code button in the editor toolbar.
nukeTools.network.enableManualConnection: boolean
If enabled, nukeTools.network.port and nukeTools.network.host will take over the default settings. This option is needed when connecting to another computer.
nukeTools.network.port: string
Specify a different port for the connection. This option will only work if nukeTools.network.enableManualConnection is enabled. 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 prevent the console from being cleared after code execution.