Hi Dean,

I have tried what you said me but it doesn´t work. I have some questions,

If you want to render a mesh that have different colors you need to
assign different shaders to the mesh?

Now I do this:
1) Create the mesh
2) Assign color per vertex as you told me
3) Assign the mesh created to the initial shading group (
cmds.sets(Mymesh, add='initialShadingGroup') )

But when I render the image I only achieve render the mesh without
color. I don´t know what I am doing wrong, I have tried also to create
a new shader and assign it to the mesh, but I obtain the same result.

The only way I have found to do what I want to do is to create
diferent shaders (each one with the colors I want to use) and assign
these shaders to the parts of the mesh that have differents colors.
But this solution is too slow, and it requires a lot of time.

Is there another way to do what I am looking for?

Thank you so much!!!!!

Omar.


2009/7/6 Omar Agudo <omar.ag...@gmail.com>:
> Thank you dean! I will try this, I am very grateful because there are
> few examples of the python-maya API. Thank you so much!
>
> 2009/7/5 Dean Edmonds <dean.edmo...@gmail.com>:
>>
>> Whoops. There was an error in the commands that I gave you. This:
>>
>>    # Set the color of vertex 2 to be red.
>>    mc.select('myMeshShape.vtx[2]', r=1, g=0, b=0)
>>
>> should be this:
>>
>>   # Set the color of vertex 2 to be red.
>>   mc.polyColorPerVertex('myMeshShape.vtx[2]', r=1, g=0, b=0)
>>
>> --
>> -deane
>>
>> >>
>>
>

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

Reply via email to