So no command Port like Maya?

So when Maya “sends” scene data to Softimage and creates a connection to 
Softimage, how is it doing that?

--
Joey Ponthieux
LaRC Information Technology Enhanced Services (LITES)
MYMIC Technical Services
NASA Langley Research Center
__________________________________________________
Opinions stated here-in are strictly those of the author and do not
represent the opinions of NASA or any other party.

From: softimage-boun...@listproc.autodesk.com 
[mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Luc-Eric Rousseau
Sent: Wednesday, September 02, 2015 7:35 PM
To: softimage@listproc.autodesk.com
Subject: RE: command port to XSI


The c# sample in the sdk is what creates the server that listens to a socket.  
There is no command port feature xsi otherwise
Le 2015-09-02 18:31, "Ponthieux, Joseph G. (LARC-E1A)[LITES]" 
<j.ponthi...@nasa.gov<mailto:j.ponthi...@nasa.gov>> a écrit :
Eric,

Thanks. I found the files but can’t really tell if I am supposed to run the 
server in order to make the client work.  And I don’t have Python installed 
anyway.

Had no luck converting the Perl script to something that XSI can understand. My 
guess is that XSI is not receiving input. In Maya you have to turn the TCP port 
on via a preference or env variable before you can use it. But I can’t find 
anything of that equivalent in XSI.

Barring these attempts, I need to save a scene that has locked up at render. 
Any advice how I can get it to quit and save on exit?


--
Joey Ponthieux
LaRC Information Technology Enhanced Services (LITES)
MYMIC Technical Services
NASA Langley Research Center
__________________________________________________
Opinions stated here-in are strictly those of the author and do not
represent the opinions of NASA or any other party.

From: 
softimage-boun...@listproc.autodesk.com<mailto:softimage-boun...@listproc.autodesk.com>
 
[mailto:softimage-boun...@listproc.autodesk.com<mailto:softimage-boun...@listproc.autodesk.com>]
 On Behalf Of Eric Thivierge
Sent: Wednesday, September 02, 2015 5:34 PM
To: softimage@listproc.autodesk.com<mailto:softimage@listproc.autodesk.com>
Subject: Re: command port to XSI

There is a sample Python one in the SDK example workgroup. It's not a straight 
forward process and the one time I was working on a team to do this it was 
quite convoluted to get it working as desired.

Eric T.

--------------------------------------------
Eric Thivierge
http://www.ethivierge.com

On Wed, Sep 2, 2015 at 5:20 PM, Ponthieux, Joseph G. (LARC-E1A)[LITES] 
<j.ponthi...@nasa.gov<mailto:j.ponthi...@nasa.gov>> wrote:

Maybe this will help. I am looking to do something like this. This was a Perl 
script run in DOS.




use Socket;

$hostName = "localhost";
$portNumber = 8000;

#CREATE SOCKET CONNECTION TO MAYA
$proto = getprotobyname('tcp');
socket(Socket_Handle, PF_INET, SOCK_STREAM, $proto);
$port = getservbyname('smtp', 'tcp');
$sin = sockaddr_in($portNumber,inet_aton($hostName));
connect(Socket_Handle,$sin);

$savedir = "E:/MAYA_Emergency_Save/";
print "Attempting to save MAYA file to directory ${savedir}\n";

$command = "string \$mySceneName = basename(\`file -q -sn\`, \"\"); string 
\$mySavNam = \"$savedir\" + \$mySceneName; file -rename \$mySavNam; file -save 
-type \"mayaAscii\";\n";
send(Socket_Handle, $command, $sin);                               #send the 
command to Maya
sleep 1;                                                                        
                        #wait a second for things to catch up
exit 1;                                                                         
                           #insure exit




Can this be done with XSI? Has anyone tried?


--
Joey Ponthieux
LaRC Information Technology Enhanced Services (LITES)
MYMIC Technical Services
NASA Langley Research Center
__________________________________________________
Opinions stated here-in are strictly those of the author and do not
represent the opinions of NASA or any other party.

From: 
softimage-boun...@listproc.autodesk.com<mailto:softimage-boun...@listproc.autodesk.com>
 
[mailto:softimage-boun...@listproc.autodesk.com<mailto:softimage-boun...@listproc.autodesk.com>]
 On Behalf Of Ponthieux, Joseph G. (LARC-E1A)[LITES]
Sent: Wednesday, September 02, 2015 5:07 PM
To: softimage@listproc.autodesk.com<mailto:softimage@listproc.autodesk.com>
Subject: command port to XSI

A long time ago I managed to write a command line port tool for Maya using the 
backend port that it provides. The tool was written in Perl and in general once 
a connection was made I could send MEL commands to the software via a “command 
line” prompt via a windows terminal. I used this often with Maya to take 
control of the software in case of a lock up etc and to send move data to it.

I thought I had created the same for XSI, again a really long time ago, but 
can’t seem to find it. XSI should be able to do this since it appears to 
communicate with Maya via a port connection. Does anyone know if this is still 
possible? If so do you have any examples how it would be done for XSI?

Thanks



--
Joey Ponthieux
LaRC Information Technology Enhanced Services (LITES)
MYMIC Technical Services
NASA Langley Research Center
__________________________________________________
Opinions stated here-in are strictly those of the author and do not
represent the opinions of NASA or any other party.


Reply via email to