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> 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] *On Behalf Of *Ponthieux, Joseph
> G. (LARC-E1A)[LITES]
> *Sent:* Wednesday, September 02, 2015 5:07 PM
> *To:* 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