Skip to content

Commit

Permalink
Fix decode utf-8
Browse files Browse the repository at this point in the history
Fixed typo
Updated README
  • Loading branch information
faggionluca committed Feb 11, 2022
1 parent e15006e commit a1f8edf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion megascan_link_python/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion megascan_link_python/sockets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions megascan_link_python/websocket_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a1f8edf

Please sign in to comment.