WebSocket server for Blender
The server sends its state to the clients, and can receive a few commands to edit Blender remotely.
- Download WebSocket-for-Python
- Copy the directory
- in Blender, go to
Install from file...and select the file
- Enable the add-on by ticking the corresponding box
Preferences are shown by expanding the add-on box. In particular, you can choose which data to send to the clients, in order to lower communication for unused data.
Include the library as usual in your HTML.
blender = new BlenderWebSocket();
Specifies client-side axis permutation.
In Blender, the coordinate system is right-handed and Z is vertical, but you may want another axis depending on your rendering engine. Only applies on objects' location and scale, not rotation.
axes parameter is a string (up to 3 characters) containing the mapping for each axis. The first character is the mapping for the resulting X axis, and so on. The character could either be
z (positive) or
Example: if you want a right-handed coordinate system and Y as vertical axis, call
Copyright (c) 2015 Bloutiouf aka Jonathan Giroux