|
|
|
Tell us what you think of the site.
|
Autodesk Media & Entertainment User Community
|
Autodesk® 3ds Max®
|
|
Autodesk® Maya®
|
|
Autodesk® Softimage®
|
|
Autodesk® MotionBuilder®
|
|
Autodesk® Mudbox™
|
|
Autodesk® ImageModeler™
|
|
Autodesk® Sketchbook® Pro
|
|
Autodesk® Smoke on Mac®
|
| Maya commandPort Equivalent In XSI
|
|
|
Hello o/
Is there a way to send remote commands to XSI like with maya and it’s commandPort command ? There is an example by Kim Aldis on XSI-Blog ( http://www.xsi-blog.com/archives/132 ) but the thing is that xsi is stuck untill something come through the socket or the connection timeout. It’s pretty annoying to have the software frozen :[ Anyone has an idea to achieve this ?
Thanks,
Thomax
|
|
|
|
XSI ships with an sdk example called, XSI Server, i have a friend that implemented a cross platform “command port” for XSI and Maya he got them to work as closely as possible.
http://softimage.wiki.avid.com/s...ver/netview_xsiserver.htm
|
|
|
|
never actually used it but there’s a C# example of a TCP/IP XSI server in the SDK examples.
Did you try that one?
|
|
|
|
Don’t wanna look dumb but I didn’t manage to get it works, when I connect the XSISDK workgroup I have a XSIServer addon. If I explore the directory I do notice there is a CSharp file : XSIServer.cs with this ‘in_reg.RegisterCommand("XSIStartServer",null );’ but when I try to execute this command in the script editor I get an error saying the command is not define.
Any clue about what to do ?
|
|
|
|
i am sorry but i have never used it… i just know it was used as a kicking off point to setup a platform independent command port from a SQL database to XSI or Maya
|
|
|
|
Looks like the compiled plugin is missing from the XSI 7 install.
You’ll have to compile XSIServer.csproj first.
|
|
|
|
Argh :| that suck, I don’t have Visual C here. Do You think express version would do the trick?
|
|
|
|
Yes, I use the Visual C# 2005 Express Edition to compile CSharp plugins.
|
|
|
|
Ok Thanx I’ll give a try tonight when I get back from work.
|
|
|
|
Ok I have compiled the XSIServer and it’s working fine with the XSIClient. By the way I’m encountering problems if I try to connect through python :
Sending this from a python interpreter :
import socket
cXSI = socket.socket(socket.AF_INET, socket.SOCK_STREAM) cXSI.connect(("127.0.0.1", 10000)) cXSI.send("Hello") cXSI.close()
Lead to an instant XSI crash.
Doing a Telnet :
telnet localhost 10000
h
Result in :
[I]// ERROR : Unknown request: h[/I] ,
that sounds normal to me
The same Telnet on maya result in a
[I]h;[/I]
[I]// Error: Cannot find procedure “h”. //
[/I]That also sound ok.
But the same python code as the one above used for XSI lead to this in Maya :
[I]Hello;
// Error: Cannot find procedure “Hello”. // [/I]
Normal behavior too.
Does that anyone has an idea of what can be wrong with the connection ?
|
|
|
|
I did some more tests, with some success but still crashing using this :
import socket
cSocket = socket.socket( socket.AF_INET, socket.SOCK_STREAM ) cSocket.connect( ( "localhost", 10000 ) ) cCommand = "script|C:/DOCUME~1/KELSOL~1/LOCALS~1/Temp/sIBL_XSI_Import.js" cSocket.send(cCommand) # cXSI.close() This Line Is Commented
The script is executed correctly but I did noticed that XSI is not crashing if I don’t close the connection :
cXSI.close()
If I uncomment this line I get an instant crash and If I don’t close the connection, crash happen after a while (~5 secs) when I execute the connection stuff a second time
. Anyone have a clue of what’s happening ?
|
|
|
|
|
|