Hi Marcus , Justin , If I just want to use it as remotely standalone mayapy which control by my currently GUI maya . how can I register all maya command inside ? ( The purpose is to fully remotely control the standalone mayapy ) , appreciate if you guys can answer this question from a junior , thanks a lot !
在 2015年5月20日星期三 UTC+8下午11:11:46,Marcus Ottosson写道: > > Does anyone have experience with it? What are your thoughts, compared to > other forms of RPC? > > - https://docs.python.org/2/library/simplexmlrpcserver.html > > I found it hidden away amongst the default Python libraries and am quite > astounded by it’s simplicity. > > # From within Mayafrom SimpleXMLRPCServer import SimpleXMLRPCServerimport > threading > from maya import cmds > > server = SimpleXMLRPCServer(("127.0.0.1", 8000)) > server.register_function(cmds.createNode) > > t = threading.Thread(target=server.serve_forever) > t.daemon = True > t.start() > > And then, from a terminal. > > >>> import xmlrpclib>>> proxy = > >>> xmlrpclib.ServerProxy("http://127.0.0.1:8000/")>>> > >>> proxy.createNode("mesh")'polySurfaceShape1' > > Resources: > > - pymotw1 > > <http://pymotw.com/2/SimpleXMLRPCServer/index.html#module-SimpleXMLRPCServer> > - pymotw2 <http://pymotw.com/2/xmlrpclib/> > > > -- > *Marcus Ottosson* > [email protected] <javascript:> > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/7c34be2a-daa8-47ea-a01d-6a6a4d789503%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
