# BlenderAddons **Repository Path**: AlonAzrael/BlenderAddons ## Basic Information - **Project Name**: BlenderAddons - **Description**: addons for blender - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-06-18 - **Last Updated**: 2020-12-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Blender RPC Server ## Usage To use RPC Server in blender, there are three steps to follow. ### Install addon This directory itself is RPC addon. You should install RPC addon in blender. To be more specific, you can either copy this directory to blender addon_contrib directory manually, or you can zip this directory into a zip file, then install from blender interface. ### Activate addon In blender interface, after installing RPC addon, activate RPC addon. It will load RPC addon, along with `rpcmq` module. ### Run RPC Server In blender python console, input command ```python import rpcmq; THREAD = rpcmq.runRpcServer(); ``` Basically, it create a thread to start a flask server, that can accpet a remote function, and execute it, look at test.py for more details. Note that due to some limitations in blender, if you try to join flask server thread with main thread, blender would crash. it seems like blender do not supported thread running in blender main thread, we will dig into this issue, but for now, be careful with joining thread. Also, after close blender interface on Windows, blender process will not terminate, because flask server thread is still running, so you need to manually kill blender interface process, we are still looking a better way to shutdown flask server thread.