RE: xsibatch -script (*python)

Date : Tue, 6 Nov 2007 16:52:10 -0500
To : <XSI(at)Softimage.COM>
From : Marc-André Belzile <mbelzile(at)Softimage.COM>
Subject : RE: xsibatch -script (*python)
Python is fully supported in batch scripting. The limitation on the wiki is outdated and will be removed.

E.g.
xsi -script foo.py -main foo -args -arg "bar"

Foo.py...
def foo( arg ):
	Application.LogMessage( "from foo " + str( arg ) )

-mab 

-----Original Message-----
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf Of Francois Lord
Sent: November 6, 2007 4:50 PM
To: XSI(at)Softimage.COM
Subject: Re: xsibatch -script (*python)

The script must have a main() function with arguments. Like def main(start , end , step , scene , passes ):

And you call it with
xsibatch -script test.py -main main -args -start 1 -end 100 -step 1 -scene C:/test.scn -passes foreground,background

takita wrote:
> Hey List -
>
> With regard to using python as a scripting language for xsibatch 
> -script, what's the best way to get your command arguments through to 
> the script?
>
> From the wiki...
> "For JScript and VBScript you can pass arguments a method that you 
> wish to execute. This is not currently supported by Python. The 
> workaround is to use a simple wrapper script in jscript or vbscript 
> that will get the arguments and pass them directly to the real Python script."
>
> So what would this entail?  Would I first have to register the 
> functions in the python script as commands and call them from 
> something written in jscript?  This would be somewhat inconvenient as 
> part of what I'd like to do involves scanning the workgroup on a 
> render machine to see if it needs any modification to the workgroup 
> path (probably unregistering said command in the process).
>
> Any ideas?
>
> -T
>
>
>
>
>
> ---
> 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.