diff --git a/README.md b/README.md index 95c5d21..eed55f7 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,9 @@ For a complete guide on all the options of the plugin refere to the [How to use - Install it in Substance Painter by extracting the zip file in the documents folder: - - **For Windows 10** ``%userprofile%\Documents\Allegorithmic\Substance Painter`` - - **For Linux** ``~/Documents/Allegorithmic/Substance Painter`` - - **For MacOS** ``/Users/%username%/Documents/Allegorithmic/Substance Painter`` + - **For Windows 10** ``%userprofile%\Documents\Adobe\Adobe Substance 3D Painter`` + - **For Linux** ``~/Documents/Adobe/Adobe Substance 3D Painter`` + - **For MacOS** ``/Users/%username%/Documents/Adobe/Adobe Substance 3D Painter`` > :information_source: After you have extracted the archive open up Substance Painter and enable both plugins python > ![enable plugins](doc/_static/enable_plugins.jpg) diff --git a/megascan_link_python/log.py b/megascan_link_python/log.py index 396ea3a..47a2e08 100644 --- a/megascan_link_python/log.py +++ b/megascan_link_python/log.py @@ -55,7 +55,7 @@ def setUpLogger(cls): @classmethod def Log(cls, msg: str, logLevel=logging.INFO): - """Helper function used to log a massage to a file or if specified in the config file + """Helper function used to log a message to a file or if specified in the config file with the `outputConsole` propriety also to the Python Editor output of Substance Designer :param msg: the message to print diff --git a/megascan_link_python/sockets.py b/megascan_link_python/sockets.py index 9c40722..eaa397d 100644 --- a/megascan_link_python/sockets.py +++ b/megascan_link_python/sockets.py @@ -94,7 +94,7 @@ def run(self): break data = self._connection.recv(16) if data: - self._receivedData.write(data.decode("utf-8")) + self._receivedData.write(data.decode("utf-8","replace")) else: logger.Log('No more data from {}'.format(client_address), DEBUG) break diff --git a/megascan_link_python/websocket_link.py b/megascan_link_python/websocket_link.py index 7852923..9e6254c 100644 --- a/megascan_link_python/websocket_link.py +++ b/megascan_link_python/websocket_link.py @@ -25,6 +25,7 @@ def sendDataToJs(self, data: object): log.LoggerLink.Log("Sending data to JS plugin") jsonData = {"data": data, "settings": config.ConfigSettings.getAsDict()} + #log.LoggerLink.Log("Data {}".format(str(data))) ws.send(json.dumps(jsonData)) ws.close() except Exception as e: