Skip to main content
Participant
February 24, 2023
Answered

listening to socket in Substance painter (without --enable-remote-scripting)

  • February 24, 2023
  • 1 reply
  • 1276 views

We are looking for a way to remote substance painter,

However, in case that substance painter might not be opened with "--enable-remote-scripting".

Could it be any programable API or any other way to connect to substance with a port?

This topic has been closed for replies.
Correct answer Léna Piquet Froyok

Hi !

If you don't have the "--enable-remote-scripting" command line, then the only other solution is to provide/use your own WebSocket server to transmit commands to Painter.

With the old Javscript API, qml provided a native way to do this, but you won't have access to the new Python API with it.

Python can support WebSocket servers too, but that will require the setup of additional modules and might be a bit more complicated to put in place to handle sending/receiving commands without blocking the application (because Python runs inside the main thread).

1 reply

Léna Piquet Froyok
Adobe Employee
Léna Piquet FroyokCorrect answer
Adobe Employee
February 28, 2023

Hi !

If you don't have the "--enable-remote-scripting" command line, then the only other solution is to provide/use your own WebSocket server to transmit commands to Painter.

With the old Javscript API, qml provided a native way to do this, but you won't have access to the new Python API with it.

Python can support WebSocket servers too, but that will require the setup of additional modules and might be a bit more complicated to put in place to handle sending/receiving commands without blocking the application (because Python runs inside the main thread).

Participant
March 1, 2023

hi, thanks for the reply.

I tried the Python way today, but I was stocked by loading addition module "websocket" that we put into the path "C:\Program Files\Adobe\Adobe Substance 3D Painter\resources\pythonsdk\Lib\site-packages".

It kept showing loading page while we restart the application. Do we need LICENSE for it or somthing went wrong?

Léna Piquet Froyok
Adobe Employee
Adobe Employee
March 1, 2023

It's unlikely I know which module you are using, so you will have to specify. There are plenty available for Python. 🙂

As for installing modules, I strongly recommend putting them outside of Painter and referencing them like so: https://substance3d.adobe.com/documentation/ptpy/tutorials/loading-external-python-modules

 and https://substance3d.adobe.com/documentation/ptpy/api/plugins/substance_painter_plugins