Hi Ken, 

I am running into an issue with your suggestion. 

I update the "DiffuseColor" property to my desired value using the method that 
you pointed out. I then apply the UpdateVTKObjects() method, yet I don't see 
that the glyph color changes. When I look into the state XML files, I can see 
that the value was changed. What else would I need to call an update on? My 
code is similar to:

...
pqDataRepresentation *rep = 
source->getRepresentation(pqActiveObjects::instance().activeView());
pqPipelineRepresentation *pipelineRepresentation = 
qobject_cast<pqPipelineRepresentation *>(rep);
pipelineRepresentation->getProxy()->UpdatePropertyInformation();

vtkSMDoubleVectorProperty *prop = vtkSMDoubleVectorProperty::SafeDownCast(
                                                       
pipelineRepresentation->getProxy()->GetProperty( "DiffuseColor"));
prop->SetElement(0, 1.0);
prop->SetElement(1, 1.0);
prop->SetElement(2, 0.0);

pipelineRepresentation->getProxy()->UpdateVTKObjects();
pqActiveObjects::instance().activeView()->forceRender();
...

I can see that the color that I have set is set as active color in the 
ColorWindow of the properties panel, but the  image doesn't render the color. 
By the way, I am developing against ParaView 3.98.1.

Many thanks and best regards,

Anton
________________________________________
From: Moreland, Kenneth [[email protected]]
Sent: 12 March 2015 16:32
To: Piccardo-Selg, Anton (-,RAL,ISIS); [email protected]
Subject: Re: [Paraview] Setting glyph color to be independent of color scale 
and color map

The coloring of an object (in this case, the result of the glyph filter)
is controlled by the representation object. The representation object can
be set to be either a solid color or mapping a variable. It sounds like
your glyph representation is already set to a solid color since the
default solid color is white.

There are several parameters on the representation object that control the
solid color. The most relevant is the DiffuseColor parameter. Change that
to be yellow (i.e. [1,1,0]) and that should do what you want.

-Ken



On 3/12/15, 10:10 AM, "[email protected]"
<[email protected]> wrote:

>Hi,
>
>We are building a customization of ParaView 3.98.1. Data sets are loaded
>with a signal range which is then used to set the scalar range for the
>color scale.  Besides the data we plot some simple glyphs to indicate
>special points in our rendered data set.
>
>Currently they are all rendered white, as the glyphs don't have a scalar
>value attached to them ( I guess it is the NAN color). I  was wondering
>if there is a way to set the color of these glyphs to a fixed value,
>independent of the color scale or the selected color map. In our case we
>would always want to render an ellipsoidal glyph with a yellow color. Is
>this possible?
>
>Many thanks and best regards,
>
>Anton
>_______________________________________________
>Powered by www.kitware.com
>
>Visit other Kitware open-source projects at
>http://www.kitware.com/opensource/opensource.html
>
>Please keep messages on-topic and check the ParaView Wiki at:
>http://paraview.org/Wiki/ParaView
>
>Search the list archives at: http://markmail.org/search/?q=ParaView
>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/paraview

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview

Reply via email to