Paint Tool by script

35 views
Skip to first unread message

Alberto Santos

unread,
Jan 19, 2010, 3:25:15 AM1/19/10
to soft...@listproc.autodesk.com
Hi to the list,

I'm trying to invoke the Paint Tool by scripting in XSI (W key) but the only approach
I've found is the command:

"Application.Commands("Paint Tool").Execute()"

That gives me the following error:

"# ERROR : 2003 - Traceback (most recent call last):
# File "<Script Block >", line 1, in <module>
# Application.Commands("Paint Tool").Execute()
# File "<COMObject <unknown>>", line 2, in Execute
# File "C:\Python26\lib\site-packages\win32com\client\dynamic.py", line 272, in _ApplyTypes_
# result = self._oleobj_.InvokeTypes(*(dispid, LCID, wFlags, retType, argTypes) + args)
# COM Error: Interface not supported. - [line 1]"

Someone can help me?


Thanks in advance, Alberto.

--
Alberto Santos (Dpto. Técnico)
Kandor Graphics

Luc-Eric Rousseau

unread,
Jan 19, 2010, 8:57:08 PM1/19/10
to soft...@listproc.autodesk.com
There is something weird here.
Anyway, the command to execture, or the application object method, is
just "PaintTool" without any spaces. Doesn't work with the commands()
thing I think.

Given that the command is undocumented, how did find this out? I
looked at the source of the "Paint Push Tool", it's in tools.vbs in
the Softimage install folder

Alberto Santos

unread,
Jan 20, 2010, 2:49:49 AM1/20/10
to soft...@listproc.autodesk.com
Thanks, you were right, the command is "PaintTool" in VB and I can call him in python with Application.PaintTool() .

>Given that the command is undocumented, how did find this out?

A workmate told me.

Thanks again.
----- Mensaje original -----
De: "Luc-Eric Rousseau" <luce...@gmail.com>
Para: soft...@listproc.autodesk.com
Enviados: Miércoles, 20 de Enero 2010 2:57:08
Asunto: Re: Paint Tool by script

César Sáez

unread,
Jan 20, 2010, 8:45:21 PM1/20/10
to soft...@listproc.autodesk.com
Oooops, my fault.... I found it this way.

xsi = Application
log = xsi.LogMessage

lCmd = [c.Name for c in xsi.Commands if "Paint" in c.Name and "Tool" in c.Name]
for name in lCmd:
log(name)

# INFO : Paint Tool
# INFO : Paint Vertex Color Tool
# INFO : Paint Select Tool
# INFO : Paint Tool
# INFO : Paint Shape Manipulator Tool
# INFO : Paint Tool
# INFO : Paint Push Tool
# INFO : Paint Texture Tool


2010/1/20 Alberto Santos <asa...@kandorgraphics.com>

Xsi

unread,
Jan 21, 2010, 5:14:55 AM1/21/10
to soft...@listproc.autodesk.com
I'm not in front of xsi but what the hell are those:
> Paint Texture Tool
> Paint Shape Manipulator Tool
??

Envoyé de mon iPhone

Reply all
Reply to author
Forward
0 new messages