I need to run a SimpleXMLRPCServer in blender-2.57, but it stops at the line “serve_forever()”.
The code is:
from xmlrpc.server import SimpleXMLRPCServer
from xmlrpc.server import SimpleXMLRPCRequestHandler
class RequestHandler(SimpleXMLRPCRequestHandler):
rpc_paths = ('/RPC2',)
server = SimpleXMLRPCServer(("localhost", 8000),requestHandler=RequestHandler)
server.register_introspection_functions()
class MyFuncs:
def mul(self, x, y):
return x * y
server.register_instance(MyFuncs())
server.serve_forever()
But now I have another problem. Let’s say that in function “mul” I have something like: bpy.context.active_object. Than comes an error “‘Context’ object has no attribute ‘active_object’”. It turns out that i do not have full access to blender objects in the thread.