Re: External (j)script

Date : Wed, 03 May 2006 11:38:46 +0200
To : XSI(at)Softimage.COM
From : Guy Rabiller <guy(at)alamaison.fr>
Subject : Re: External (j)script

> ../.. wich can queue incoming external commands > ( but dont trigger XSI Commands as it is not thread safe ) ../..

using a separate thread that is.

--
guy rabiller | 3d technical director (at) LaMaison


Guy Rabiller a Ãcrit :

If you dont want XSI to freeze, you can make use of a TimerEvent, wich can queue incoming external commands ( but dont trigger XSI Commands as it is not thread safe ), then execute the queued commands on timer event.


This would involve compiled event though.

--
guy rabiller | 3d technical director (at) LaMaison


Aloys Baillet a Ãcrit :
Or...Just play with XMLRPC in Python.Here's a simple setup (you recognize it Mikee?):

Run this code from inside XSI
class MyFuncs: def log(self, s): Application.LogMessage(s) return 'Done!'
from SimpleXMLRPCServer import SimpleXMLRPCServerserver = SimpleXMLRPCServer(("localhost", 8000))server.register_introspection_functions()server.register_instance(MyFuncs())server.serve_forever()



then from a separate python console:

import xmlrpclibserver = xmlrpclib.ServerProxy("http://localhost:8000";)server.log ("This is a test!")

That works! The main problem with this setup: XSI will be completely frozen...And you might have to play around some COM weirdness.But the concept is quite nice!
Cheers,
Aloys


On 5/3/06, Guy Rabiller <guy(at)alamaison.fr > wrote:>> No. You'll have to wait for XSI.NET ;-)>> --> guy rabiller | 3d technical director (at) LaMaison>>> Chris Trimble a Ãcrit :> >> > So... bottom line... there is no way to COM-script XSI from outside of> > the app, a la the way Photoshop CS or Excel can?> >> > C> >> >> >> > On 5/2/06, *Stephen Blair* <Stephen_Blair(at)softimage.com> > <mailto: Stephen_Blair(at)softimage.com>> wrote:> >> > You've got to do it from within XSI.> >> > -----Original Message-----> > *From:* owner-xsi(at)Softimage.COM> > <mailto:owner-xsi(at)Softimage.COM>> > [mailto:owner-xsi(at)Softimage.COM> > <mailto: owner-xsi(at)Softimage.COM>]*On Behalf Of *John Bell> > *Sent:* Tuesday, May 02, 2006 2:30 PM> > *To:* XSI(at)Softimage.COM <mailto:XSI(at)Softimage.COM>> > *Subject:* Re: External (j)script> >> > Alright, but, is it possible to just hook into XSI just by running> > a standalone .js script or do!
they always have to be run from> > within the running instance of XSI.> >> > I saw an example that demonstrated how a connection could be made> > to Outlook and an email could be sent - this was done from within> > XSI.> >> > I am wondering if a similar thing can be done where a standalone> > script can connect to XSI. I haven't fully considered the> > practicality of it, but for the purpose of learning more about> > programing and ActiveX objects and how different programs can work> > together, I find it an interesting concept.> >> >> >> >> >> >> > Stephen Blair wrote:> >> That code works in an HTML page...when the page is viewed in NetView.> >>> >> ------------------------------------------------------------------------> >> *From:* owner-xsi(at)Softimage.COM <mailto: owneer-xsi(at)Softimage.COM>> >> [ mailto:owner-xsi(at)Softimage.COM] *On Behalf Of *John Bell> >> *Sent:* May 2, 2006 1:50 PM> >> *To:* XSI(at)Softimage.C!
OM <mailto:XSI(at)Softimage.COM>> >> *Subject:* External (j)s!
cript> >
>>> >> I am trying to have an external jscript hook into a running> >> instance of XSI. The SDK documenation provides the following> >> example:> >>> >> var xsi_app = new ActiveXObject( XSI.Application );> >> var app = xsi_app.Application;> >> app.LogMessage( "Initiating NetView session" );> >>> >> Do I have to set anything up or install anything before this code> >> works, or should it work as typed in an external jscript?> >> Ultimately I would like to be able to access XSI and all of its> >> commands, objects, methods, and properties from an external> >> jscript. Does anyone know of or have any examples of how this is> >> accomplished?> >>> >> Thanks> >> --- Unsubscribe? Mail Majordomo(at)Softimage.COM> >> <mailto: Majordomo(at)Softimage.COM> with the following text in body:> >> unsubscribe xsi> > --- Unsubscribe? Mail Majordomo(at)Softimage.COM> > <mailto: Majordomo(at)Softimage.COM> with the follow!
ing text in body:> > unsubscribe xsi> >> >>>>> ---> Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:> unsubscribe xsi>


--Aloys Baillet - XSI Technical DirectorCharacter Dpt - Animal Logic--
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi








---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi








--- Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body: unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.