NukeServerSocket v1.5
This location is for Registered Users Only.
Perhaps you need to login or register.
13.1, 12.2, 11.3 or later
Linux, Mac, Windows


1. NukeServerSocket README
A Nuke plugin that will allow code execution from the local network via TCP/WebSocket connections and more.
Changelog
v0.5.0 2022-02-25
- WebSocket communication protocol for browser-based text editors.
- Fixed: Python2 code execution when using the Nuke Internal engine..
v0.4.1 2022-02-18
- Switch code execution engine settings.
v0.4.0 2022-02-17
- Intercept exceptions inside Nuke's thread to extension output.
- Configurable timeout settings.
- Display timeout timers in UI.
v0.3.0 2022-02-06
- Various fixes and optimizations for code execution.
v0.2.0 2021-10-29
- Connections timeouts.
- Various fixes and optimizations.
v0.1.0 2021-09-23
- Execute BlinkScript code.
- Send/Receive Nodes from another instance.
- New About widget.
- API now accepts also simple strings when sending a request.
- Under the hood optimizations.
1.1. Client applications
Client applications that can use NukeServerSocket:
- Nuke Tools - Visual Studio Code extension.
- Nuke Tools ST - Sublime Text package.
- DCC WebSocket - Visual Studio Code Web extension.
1.2. Features
- Send Python or BlinkScript code to be executed inside Nuke from your local network.
- Multiple computers can connect to the same Nuke instance.
- Receive/Send nodes from another Nuke instance in your local network.
- Not bound to any application. (more on Extendibility)
- WebSocket compatible for browser-based text editors.
1.3. Installation
Save the plugin in your .nuke directory or in a custom directory and then import NukeServerSocket
in your menu.py.
Remember: If you use a custom plugin path, add the path in your init.py: nuke.pluginAddPath('custom/path')
.
N.B. if your downloaded zip folder has a different name (NukeServerSocket-master, NukeServerSocket-0.0.2 etc._), then you need to rename it to just NukeServerSocket.
1.4. Usage
1.4.1. Receive incoming request
Open the NukeServerSocket panel and with the mode on Receiver, start the server by clicking Connect.
If you receive a message: 'Server did not initiate. Error: The bound address is already in use', just change the Port to a random number between
49152
and65535
and try again. It means that probably you have a connection listening on that port already. Also when connected, you could test the receiver with the Test Receiver button.
When connected, NukeServerSocket will listen for incoming request on the IP Address and Port shown in the plugin.
Now you can send code from Visual Studio Code with Nuke Tools or any other method you prefer.
1.4.2. Receive/Send nodes
1.4.2.1. Send
When sending nodes, switch the mode from Receiver to Sender and be sure that there is another NukeServerSocket instance listening for incoming network request (Receive incoming request). Select the nodes you want to send a click Send Selected Nodes.
By default, the IP Address on the sender points to the local IP address, so, if you want to send nodes between the same computer, you should only specify the Port. When sending nodes to another computer, you will also need to specify the IP Address of the computer you want to send the nodes.
1.4.2.2. Receive
When receiving nodes just follow the steps for Receive incoming request for the receiving instance and the Send steps for the sending instance.
1.5. Settings
The settings can be accessed from the plugin toolbar
-
Code Execution Engine: Change the engine that is executing the code.
- Nuke Internal: Nuke
executeInMainThread
function. - Script Editor: Nuke Script Editor widget.
- Nuke Internal: Nuke
-
Connection Type: Change the internal connection protocol for the client-server.
- TCP: The default type of connection. If unsure, use this.
- WebSocket: Similar to the TCP, allows two-way interactive communication session between the user's browser and the internal server. Use this when using a browser-based text editor.
Changing connection type while connected, could cause some errors.
-
Mirror To Script Editor: Allows to mirror the input/output code to the internal script editor.
- Override Output Editor: Mirror output to the internal script editor.
- Format Text: The script editor output window will received a formatted version of the code result.
- Clear Output: The script editor output window will clear the code after each execution.
- Show File Path: The script editor output window will display the full file path of the file being executed.
- Show Unicode: The script editor output window will display a unicode character `` that indicates the start of the code execution result.
- Override Input Editor: Mirror input to the internal script editor.
-
Timeout: Terminate the connection when the server is inactive or it wasn't able to establish a successful connection, in the time specified.
- Server: Set the timeout when clicking the Connect button. Defaults to
10
minutes. - Receiver: Set the timeout for when clicking the Test Receiver button. Defaults to
10
seconds. - Send Nodes: Set the timeout when clicking Send Nodes button. Defaults to
30
seconds.
- Server: Set the timeout when clicking the Connect button. Defaults to
1.6. Extendibility
At its core, the plugin is just a server socket that awaits for an incoming request, performs the operations inside Nuke and returns the result. Nothing ties it to any application per se.
This makes it very easy to implement a new client, without the need to modify NukeServerSocket source code. The client needs only to send the data at the specified address inside NukeServerSocket.
More information and examples on the wiki page.
1.7. Test plugin locally
The plugin can be launched locally outside the Nuke application. This is useful for testing code and implementing new features more rapidly.
More information on the wiki page.
1.8. Known Issues
- Creating a modal window with the Nuke internal code execution engine, will cause Nuke to freeze. A workaround is to switch to the Script Editor engine.
- Settings window doesn't display the tooltip text.
- When changing workspace with an active open connection, Nuke will load a new plugin instance with the default UI state. This would look as if the previous connection has been closed, where in reality is still open and listening. One way to force close all of the connections is to restart Nuke, or you can wait for the connection timeout.
1.9. Compatibility
Nuke version: 11,12, 13.
Because Nuke 11 uses an early version of PySide2, future compatibility is not a guarantee.
While it should work the same on all platforms, it has been currently only tested on:
- Linux:
- CentOS 8
- MacOS:
- Mojave 10.14.06
- Catalina 10.15.07
- Windows 10
1.10. Demo
Execute code from Visual Studio Code
Send nodes
Comments
note: you have a misspell a bit github link (colon missing)
Traceback (most recent call last):
File "C:/Users/[Hidd en]/.nuke/menu. py", line 2, in
import NukeServerSocke t
File "C:\Program Files\Nuke14.0v 1\pythonextensi ons\site-packag es\shiboken2\fi les.dir\shiboke nsupport\__feat ure__.py", line 142, in _import
return original_import (name, *args, **kwargs)
File "C:\Users/[Hidden]/.nuke\NukeServerSocke t\__init__.py", line 2, in
from . import src
File "C:\Program Files\Nuke14.0v 1\pythonextensi ons\site-packag es\shiboken2\fi les.dir\shiboke nsupport\__feat ure__.py", line 142, in _import
return original_import (name, *args, **kwargs)
File "C:\Users/[Hidden]/.nuke\NukeServerSocke t\src\__init__.py", line 15, in
from . import main
File "C:\Program Files\Nuke14.0v 1\pythonextensi ons\site-packag es\shiboken2\fi les.dir\shiboke nsupport\__feat ure__.py", line 142, in _import
return original_import (name, *args, **kwargs)
File "C:\Users/[Hidden]/.nuke\NukeServerSocke t\src\main.py", line 16, in
from .connection import QServer, SendTestClient, SendNodesClient
File "C:\Program Files\Nuke14.0v 1\pythonextensi ons\site-packag es\shiboken2\fi les.dir\shiboke nsupport\__feat ure__.py", line 142, in _import
return original_import (name, *args, **kwargs)
File "C:\Users/[Hidden]/.nuke\NukeServerSocke t\src\connection\__init__.py", line 3, in
from .nss_server import QServer
File "C:\Program Files\Nuke14.0v 1\pythonextensi ons\site-packag es\shiboken2\fi les.dir\shiboke nsupport\__feat ure__.py", line 142, in _import
return original_import (name, *args, **kwargs)
File "C:\Users/[Hidden]/.nuke\NukeServerSocke t\src\connection\nss_server.py", line 8, in
from PySide2.QtWebSo ckets import QWebSocketServe r
File "C:\Program Files\Nuke14.0v 1\pythonextensi ons\site-packag es\shiboken2\fi les.dir\shiboke nsupport\__feat ure__.py", line 142, in _import
return original_import (name, *args, **kwargs)
ModuleNotFoundError: No module named 'PySide2.QtWebSo ckets'
Or is there a way to bypass this?
Thanks!
RSS feed for comments to this post