<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>Thank you Amy for your help.</DIV>
<DIV>I tried this code line but that doesn't work: the polydata is not 'blue' but it stills with its original color (no modification was applied)<BR><BR>--- En date de : <B>Mer 19.11.08, Amy Squillacote <I><ahs@cfdrc.com></I></B> a écrit :<BR></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">De: Amy Squillacote <ahs@cfdrc.com><BR>Objet: Re: [vtkusers] Can't modify the color of the actor even with 'SetColor' fucntion<BR>À: nourmestiri@yahoo.fr<BR>Cc: "vtk" <vtkusers@vtk.org><BR>Date: Mercredi 19 Novembre 2008, 19h22<BR><BR><PRE>Try calling mapper->ScalarVisibilityOff();
- Amy
Nour Mestiri wrote:
> Hi all vtk users,
> Can someone tell me how to modify the color of a polydata?
> In fact, i have a polydata (a VRML object) which i should display on a
window. When i read this file, the object is grey but i want to change its color
on white.
> I use this the code below but i have a 'blue' object for each
value of 'SetColor()':
> vtkPolyDataMapper *mapper = vtkPolyDataMapper::New();
> mapper->SetInput(myPolydata);
> vtkActor *actor = vtkActor::New();
> actor->SetMapper(mapper);
> actor->GetProperty()->SetColor(1,1,1);
> Is there something to modify in this code or the code source of the VRML
file?
> Thank you for your help.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-- Amy Squillacote Phone: (256) 726-4839
Computer Scientist Fax: (256) 726-4806
CFD Research Corporation Web: http://www.cfdrc.com
215 Wynn Drive, Suite 501
Huntsville, AL 35805
</PRE></BLOCKQUOTE></td></tr></table><br>