<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Controlling XSI remotely using sockets</title>
	<atom:link href="http://www.xsi-blog.com/archives/132/feed" rel="self" type="application/rss+xml" />
	<link>http://www.xsi-blog.com/archives/132</link>
	<description>People and thoughts behind XSI in production...</description>
	<pubDate>Tue, 06 Jan 2009 08:16:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Kel Solaar</title>
		<link>http://www.xsi-blog.com/archives/132#comment-17328</link>
		<dc:creator>Kel Solaar</dc:creator>
		<pubDate>Sun, 14 Sep 2008 18:55:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=132#comment-17328</guid>
		<description>Hello o/

I tried the remote socket connection, and Alloys Baillet technique, in both of the case XSI is stuck/frozen and only reacting to remote commands, is there a way to make it like maya with it's commandPort command?</description>
		<content:encoded><![CDATA[<p>Hello o/</p>
<p>I tried the remote socket connection, and Alloys Baillet technique, in both of the case XSI is stuck/frozen and only reacting to remote commands, is there a way to make it like maya with it&#8217;s commandPort command?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mr_Nitro</title>
		<link>http://www.xsi-blog.com/archives/132#comment-15475</link>
		<dc:creator>Mr_Nitro</dc:creator>
		<pubDate>Sat, 23 Jun 2007 10:09:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=132#comment-15475</guid>
		<description>hi,
I'm trying to mess with xsi 'intelligent' object control...  trying to build up a meta-language for querying or performing task remotely on  a scene, but I'd like to still have manual control on the scene itself while I telnet to the inside-xsi python server, what happens is that when I enter the server main loop xsi gets stuck with it until I quit the connection, I wonder if there's some way to have it go 'remote' only when a socket event happens... maybe that Pexpect  can do that? or it takes full control of the spawned apps?

cheers</description>
		<content:encoded><![CDATA[<p>hi,<br />
I&#8217;m trying to mess with xsi &#8216;intelligent&#8217; object control&#8230;  trying to build up a meta-language for querying or performing task remotely on  a scene, but I&#8217;d like to still have manual control on the scene itself while I telnet to the inside-xsi python server, what happens is that when I enter the server main loop xsi gets stuck with it until I quit the connection, I wonder if there&#8217;s some way to have it go &#8216;remote&#8217; only when a socket event happens&#8230; maybe that Pexpect  can do that? or it takes full control of the spawned apps?</p>
<p>cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nano</title>
		<link>http://www.xsi-blog.com/archives/132#comment-15280</link>
		<dc:creator>Nano</dc:creator>
		<pubDate>Wed, 16 May 2007 02:19:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=132#comment-15280</guid>
		<description>I am picking up python scripting, our script helps me a lot to understand some tricks - thanks</description>
		<content:encoded><![CDATA[<p>I am picking up python scripting, our script helps me a lot to understand some tricks - thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aloys Baillet</title>
		<link>http://www.xsi-blog.com/archives/132#comment-11239</link>
		<dc:creator>Aloys Baillet</dc:creator>
		<pubDate>Thu, 11 Jan 2007 03:42:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=132#comment-11239</guid>
		<description>Another way of doing the same thing but easier: use the XMLRPC (XML Remote Procedure Call) libraries and server provided by Python.

Ex, run this python from inside XSI:

class MyFuncs:
    def log(self, s):
        Application.LogMessage(s)
        return 'Done!'

from SimpleXMLRPCServer import SimpleXMLRPCServer
server = SimpleXMLRPCServer(("localhost", 8000))
server.register_introspection_functions()
server.register_instance(MyFuncs())
server.serve_forever()


# And run this from a console, replace localhost by the name of the computer XSI is running on:
import xmlrpclib
server = xmlrpclib.ServerProxy("http://localhost:8000")
server.log ("This is a test!")


Cheers,

Aloys</description>
		<content:encoded><![CDATA[<p>Another way of doing the same thing but easier: use the XMLRPC (XML Remote Procedure Call) libraries and server provided by Python.</p>
<p>Ex, run this python from inside XSI:</p>
<p>class MyFuncs:<br />
    def log(self, s):<br />
        Application.LogMessage(s)<br />
        return &#8216;Done!&#8217;</p>
<p>from SimpleXMLRPCServer import SimpleXMLRPCServer<br />
server = SimpleXMLRPCServer((&#8221;localhost&#8221;, 8000))<br />
server.register_introspection_functions()<br />
server.register_instance(MyFuncs())<br />
server.serve_forever()</p>
<p># And run this from a console, replace localhost by the name of the computer XSI is running on:<br />
import xmlrpclib<br />
server = xmlrpclib.ServerProxy(&#8221;http://localhost:8000&#8243;)<br />
server.log (&#8221;This is a test!&#8221;)</p>
<p>Cheers,</p>
<p>Aloys</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kim Aldis</title>
		<link>http://www.xsi-blog.com/archives/132#comment-11041</link>
		<dc:creator>Kim Aldis</dc:creator>
		<pubDate>Mon, 08 Jan 2007 12:45:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=132#comment-11041</guid>
		<description>I originally came up with the idea when I was thinking of ways to distribute frames around a farm with xsi. The idea was to just kick off XSIbatch on all the machines then send them render commands for individual frames. I scrapped it in the end when I found a better way - the idea of leaving xsi running for thousands of frames didn't seem appealing - but for anything that requires sporadic processing in XSI when you don't want the overhead of continually reloading scenes, this would be the way to go.

You could easily use (p)Expect to drive XSI with little modification of the given code, in fact it's probably the best way to go because Expect can wait on completion at the other end.

I also liked the way the SDK example used the timer event to look for inputs on the port in the background. That's neat and potentially quite useful if you can find a use for it. I think it's a good idea waiting for a problem, to some degree.</description>
		<content:encoded><![CDATA[<p>I originally came up with the idea when I was thinking of ways to distribute frames around a farm with xsi. The idea was to just kick off XSIbatch on all the machines then send them render commands for individual frames. I scrapped it in the end when I found a better way - the idea of leaving xsi running for thousands of frames didn&#8217;t seem appealing - but for anything that requires sporadic processing in XSI when you don&#8217;t want the overhead of continually reloading scenes, this would be the way to go.</p>
<p>You could easily use (p)Expect to drive XSI with little modification of the given code, in fact it&#8217;s probably the best way to go because Expect can wait on completion at the other end.</p>
<p>I also liked the way the SDK example used the timer event to look for inputs on the port in the background. That&#8217;s neat and potentially quite useful if you can find a use for it. I think it&#8217;s a good idea waiting for a problem, to some degree.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven Caron</title>
		<link>http://www.xsi-blog.com/archives/132#comment-10902</link>
		<dc:creator>Steven Caron</dc:creator>
		<pubDate>Fri, 05 Jan 2007 19:10:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=132#comment-10902</guid>
		<description>i may have been premature in my posting. looking now my response might not replace what you have outlined here. so these may work together.

"...How would you use this?"

the only use i see for controlling XSI like this would be to extend batch scripting to automate interaction with multiple programs...

example...

-start XSI
-run code to process and export something like a .objs and some cache files to a database
-start other program (houdini, maya)
-run code to query database, import the output from XSI, run some procedural tasks, and export some data
-start XSI again
-run some code to query database, import the output from ''other program'', and handle the data (final rendering)
-start composite program or use FXtree in previous session
-run code to query database to build slap comps from rendered output

another idea that would only work if the pexpect module can work with multiple apps at once...

-start 2 instances of XSI
-export a list of .emdls, .objs, .xsi, etc.
-as they finish load them in the other instance of XSI
-run code to preform sanity checks, check for corruption and other failures, render thumbnails for use in a database or a catalouge of your assets</description>
		<content:encoded><![CDATA[<p>i may have been premature in my posting. looking now my response might not replace what you have outlined here. so these may work together.</p>
<p>&#8220;&#8230;How would you use this?&#8221;</p>
<p>the only use i see for controlling XSI like this would be to extend batch scripting to automate interaction with multiple programs&#8230;</p>
<p>example&#8230;</p>
<p>-start XSI<br />
-run code to process and export something like a .objs and some cache files to a database<br />
-start other program (houdini, maya)<br />
-run code to query database, import the output from XSI, run some procedural tasks, and export some data<br />
-start XSI again<br />
-run some code to query database, import the output from &#8221;other program&#8221;, and handle the data (final rendering)<br />
-start composite program or use FXtree in previous session<br />
-run code to query database to build slap comps from rendered output</p>
<p>another idea that would only work if the pexpect module can work with multiple apps at once&#8230;</p>
<p>-start 2 instances of XSI<br />
-export a list of .emdls, .objs, .xsi, etc.<br />
-as they finish load them in the other instance of XSI<br />
-run code to preform sanity checks, check for corruption and other failures, render thumbnails for use in a database or a catalouge of your assets</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kim Aldis</title>
		<link>http://www.xsi-blog.com/archives/132#comment-10828</link>
		<dc:creator>Kim Aldis</dc:creator>
		<pubDate>Thu, 04 Jan 2007 20:32:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=132#comment-10828</guid>
		<description>not sure I follow you on this one Steven. How would you use this?</description>
		<content:encoded><![CDATA[<p>not sure I follow you on this one Steven. How would you use this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven Caron</title>
		<link>http://www.xsi-blog.com/archives/132#comment-10706</link>
		<dc:creator>Steven Caron</dc:creator>
		<pubDate>Wed, 03 Jan 2007 02:20:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=132#comment-10706</guid>
		<description>http://pexpect.sourceforge.net/

here is a module that maybe able to handle many of these types of tasks...

steven</description>
		<content:encoded><![CDATA[<p><a href="http://pexpect.sourceforge.net/" onclick="javascript:pageTracker._trackPageview('/outbound/comment/pexpect.sourceforge.net');" rel="nofollow">http://pexpect.sourceforge.net/</a></p>
<p>here is a module that maybe able to handle many of these types of tasks&#8230;</p>
<p>steven</p>
]]></content:encoded>
	</item>
</channel>
</rss>
