Hey dude, whats going on.. long time.

you can set the pt colours using the particle command.  check the docs.

ie

particle -e -or 2 -at rgbPP -vv 1 0 0 particleShape1 ;

add your attrs first of course.

hth,  -d

Are you still in Vancouver btw ?


On Tue, Jun 30, 2009 at 9:20 PM, Justin Rosen <[email protected]> wrote:

> Hey everyone,
>
> I'm having a bit of trouble trying to create and modify the rgbPP of a
> particle system.  I've tried every way possible, but can't seem to get the
> result I'm looking for.
>
> I have a list of positions and colors that I'd like to create a particle
> object with.  I'm having no trouble with the positions, it's the rgbPP that
> seems to be a pain.  Is it possible to do this via the emit command?
>
> points = [(0,0,0), (1,1,1), (2,2,2)]
> colors = [(0,1,0), (0,0,1), (1,1,1)]
> pShape = particle()
> mel.eval('addAttr -ln "rgbPP" -dt vectorArray %s' % pShape[1].name())
> mel.eval('addAttr -ln "rgbPP0" -dt vectorArray %s' % pShape[1].name())
> emit(object=pShape[0].name(), pos=points, attribute=('rgbPP'),
> vectorValue=colors)
>
> Also, I finally fell back onto mel for adding the rgbPP, I couldn't seem to
> get the maya stuff working.
>
> I know that I could iterate over all of the particle and set their rgbPP,
> but I'm trying to do it in 1 shot.  Do I need to use the API to accomplish
> this?
>
> Thanks,
> Justin
>
> >
>


-- 
When things get too complicated, it sometimes makes sense to stop and
wonder: Have I asked the right question?
-Enrico Bombieri

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/python_inside_maya
-~----------~----~----~----~------~----~------~--~---

Reply via email to