ATTENTION: prototyping phase!
This project provides a system for remote interaction with Blender using XML-RPC. It consists of a Python server that runs as a Blender addon and a Clojure client that can make calls to this server to perform operations in Blender remotely.
The system allows for automation of Blender operations, integration of Blender with other software, and control of Blender from external scripts or applications. The server exposes various Blender operations via RPC, which can be called by the client.
Install the Blender addon:
Start the RPC server in Blender:
Set up the Clojure client:
rpc-client-clj
directory.clj -X client/main
).The server exposes the following RPC methods:
list_objects()
: Returns a list of all object names in the current Blender scene.import_obj(path)
: Imports an OBJ file at the specified path.eval_code(code)
: Evaluates the given Python code in Blender's context.move_object(object_name, x, y, z)
: Moves the specified object to the given coordinates.send_a(v)
, send_b(v)
, send_c(v)
, send_d(v)
: Sets the values of variables a, b, c, and d respectively.Example usage from the Clojure client:
(xml-rpc/call "http://localhost:8000" :eval_code "bpy.data.objects.keys()")
This call will return a list of all object names in the current Blender scene.
Ensure that Blender is running and the RPC server is started before attempting to use the Clojure client.