Skip to content

Releases: p4vv37/blender_command_port

Fixed module import error

29 Oct 20:04
5b1de61
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 1.2.0...2.0.1

Support for new Blender releases

05 Oct 07:43
5b1de61
Compare
Choose a tag to compare
  • Merged pull request #20 from masscollaborationlabs
  • Minor fixes

Many improvements and fixes

05 Apr 08:04
Compare
Choose a tag to compare
  • Fix for issue #8 Merged changes from JeffHanna
  • Fix for issue #4 - keeping port opened between scenes
    Cleanup

1.1.1

09 Jul 06:09
Compare
Choose a tag to compare

Fix for: Name changed from USER_PREFERENCES to PREFERENCES in Blender 2.8

1.1.0

07 Jul 12:08
Compare
Choose a tag to compare
  • Introduced retries on connecting
  • Added an option for using an application environment when executing commands (share environment property in settings) - issue 1
  • Added a shutdown of connection before closing link
  • Added a 1s. timeout

1.0.1-Blender-2.80

24 May 06:33
Compare
Choose a tag to compare

Improved naming

1.0.0-Blender-2.80

28 Oct 21:45
Compare
Choose a tag to compare

Versioon 1.0.0 updated for Python 2.80+

1.0.0 - Basic working addon

10 Jul 23:57
Compare
Choose a tag to compare

Blender Command Port

Command Port addon for Blender.

How to use

Installing

Open User Preferences and click Install from File under Add-ons. Then navigate to the downloaded zip archive of this plugin and select it.

Starting the port

Command port can be configured and started from a Blender Command Port section of "Data" panel.
Command port configuration

Basic usage

Command should be sent to command port as a text. It can be also done sent from Python:

import socket


def send_command(command):
    clientsocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    clientsocket.connect(('localhost', 5000))
    clientsocket.sendall(command.encode())
    while True:
        res = clientsocket.recv(4096)
        if not res:
            break
        print(res.decode())
    clientsocket.close()

send_command("""
j = 0
for i in range(10):
    print(j)
    j+=i*2
j
""")

Another way is to use execute_file_in_blender.py script to create a run configuration in PyCharm that executes a file in Blender. Path to a file must be passed as a first script parameter, port need to be passed as a second one.
PyCharm configuration

Authors

License

This project is licensed under the MIT License