Re: Parsing and extracting an xsiaddon with Python

56 views
Skip to first unread message

Martin Saechsinger

unread,
May 31, 2012, 9:07:47 AM5/31/12
to soft...@listproc.autodesk.com
Great Alan,

thank you very much!

Martin

On May 31, 2012, at 4:00 AM, Alan Fregtman wrote:

Hey,

Just wrote a snippet of sample code I thought someone might find educational:
http://darkvertex.com/wp/2012/05/30/parse-xsiaddons-in-python/

I'd reply to the thread about extracting files in xsiaddons but Gmail is still being a jerk. I'm not receiving anything. However, the non-Google archive at http://tinyurl.com/softimagelist seems to indicate that outgoing mail still gets sent, so here's hoping this goes through.

Cheers,

   -- Alan


Alan Fregtman

unread,
May 30, 2012, 10:00:17 PM5/30/12
to XSI Mailing List

Alok Gandhi

unread,
May 31, 2012, 12:22:58 PM5/31/12
to soft...@listproc.autodesk.com
Nice one Alan !
--

Martin

unread,
Jun 1, 2012, 8:53:34 AM6/1/12
to soft...@listproc.autodesk.com
Thanks Alan !

I took the liberty to add a GUI and some minor changes.
If anyone is interested :


The code is 99.99% from Alan's blog.

M.Yara

Martin Saechsinger

unread,
Jun 4, 2012, 6:01:23 AM6/4/12
to soft...@listproc.autodesk.com
Hey Martin,

that is really great! Thanks for making the GUI and adding the folder hierarchy!!
One little thing I discovered is that the actual script files in the addon (e.g. *.py or *.js) have
an additional blank line after each line of code (compared to the installation through
Softimage.)

Cheers,
Martin

Alan Fregtman

unread,
Jun 4, 2012, 10:34:22 AM6/4/12
to soft...@listproc.autodesk.com
Do the .dll and other binary files load alright at least?

It's interesting that it would do that with plaintext files.

Martin Saechsinger

unread,
Jun 5, 2012, 11:17:16 AM6/5/12
to soft...@listproc.autodesk.com
Hey Alan, 

no - I am afraid it scrambles .dlls and other binaries because of the black line thingy...

Martin

Alan Fregtman

unread,
Jun 5, 2012, 11:23:31 AM6/5/12
to soft...@listproc.autodesk.com
Hmmm, I'll investigate later.

Luc-Eric Rousseau

unread,
Jun 5, 2012, 11:25:54 AM6/5/12
to soft...@listproc.autodesk.com
Try changing the calls to open(.., "w") to open(...,"wb")
to turn off \n translation

Alan Fregtman

unread,
Jun 5, 2012, 11:26:55 AM6/5/12
to soft...@listproc.autodesk.com
Ohhhhhhh, silly me.
Reply all
Reply to author
Forward
0 new messages