This code works for me. Make sure you have a CAV map on the object. I used a default polymesh sphere. It's a generic code to set the colors for Polynodes 0-99 to red (-16777216).
# Python xsi = Application log = xsi.LogMessage collSel = xsi.Selection xsi.PaintVertexColors(collSel(0), [x for x in range(100)], [-16777216 for x in range(100)], 1) In general Python lists are interpreted as arrays where needed. -------------------------------------------- Eric Thivierge http://www.ethivierge.com On Wed, Sep 26, 2012 at 6:44 PM, Szabolcs Matefy <szabol...@crytek.com>wrote: > Hey guys,**** > > ** ** > > ** ** > > Can I add python list as array? I mean that PaintVertexColors command > waits for arrays, but can I feed list?**** > > ** ** > > Anyway, it throws me an error:**** > > ** ** > > # ERROR : Traceback (most recent call last):**** > > # File "<Script Block >", line 41, in <module>**** > > # Application.PaintVertexColors(OBJ.fullname, a_nodes, a_VC)**** > > # File "<COMObject Application>", line 2, in PaintVertexColors**** > > # COM Error: Out of present range. (0x-7ffdfff6) - [line 41]**** > > ** ** > > I made a script that reads ZBrush polypainted obj, and I wnt to make a > python version to test which version is faster**** > > ** ** > > ** ** > > Cheers**** > > ** ** > > ** ** > > Szabolcs**** > ___ > This message contains confidential information and is intended only for > the individual named. If you are not the named addressee you should not > disseminate, distribute or copy this e-mail. Please notify the sender > immediately by e-mail if you have received this e-mail by mistake and > delete this e-mail from your system. E-mail transmission cannot be > guaranteed to be secure or error-free as information could be intercepted, > corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. > The sender therefore does not accept liability for any errors or omissions > in the contents of this message, which arise as a result of e-mail > transmission. If verification is required please request a hard-copy > version. Crytek GmbH - http://www.crytek.com - Grüneburgweg 16-18, 60322 > Frankfurt - HRB77322 Amtsgericht Frankfurt a. Main- UST IdentNr.: > DE20432461 - Geschaeftsfuehrer: Avni Yerli, Cevat Yerli, Faruk Yerli >