Hi,<div><br></div><div>After correcting the problem with my representation for different datatypes I was reminded of this problem - I never did get a solution. I tried again today and by exposing the ambient color property as diffuse color I still get a warning message but I also noticed that it also stops the diffuse color working for objects that should use this property. Can you think of a way to get this work? Or could you give me a few pointers on implementing your second option?:</div>
<div><br>> 2> Create a display decorator panel (we'll need to fire a signal or<br>> something from updateEnableState() that the decorator panel can listen<br>> to and update the GUI based on what your representation needs).</div>
<div><br></div><div>Thanks,<br>Paul<br><br><div class="gmail_quote">On 8 March 2010 16:51, Paul Edwards <span dir="ltr"><<a href="mailto:paul.m.edwards@gmail.com">paul.m.edwards@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Thanks for the reply and I've got (1) working with this added:<br>
<br>
<ExposedProperties><br>
<Property name="AmbientColor" exposed_name="DiffuseColor" /><br>
</ExposedProperties><br>
<br>
The only problem is I get this error message all the time:<br>
<br>
Warning: In ParaView3/Servers/ServerManager/vtkSMProxy.cxx, line 2500<br>
vtkSMPVRepresentationProxy (0x8a2fe00): An exposed property with the<br>
name "DiffuseColor" already exists. It will be replaced.<br>
<br>
Is there a way to stop this?<br>
<br>
Thanks,<br>
<font color="#888888">Paul<br>
</font><div><div></div><div class="h5"><br>
<br>
<br>
On 5 March 2010 16:31, Utkarsh Ayachit <<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>> wrote:<br>
> Ah so you want to set the "AmbientColor" property to be set on your<br>
> representation and the GUI only changes "DiffuseColor" color by<br>
> default (unless repr is type is wireframe, points or outline).<br>
> Acually just checking the subtypes also doesn't help since remember<br>
> these are custom representations so sub-type part could mean totally<br>
> different things based on the actual implementation.<br>
><br>
> A couple of possible workarounds:<br>
> 1> expose AmbientColor property as "DiffuseColor" from your<br>
> representation and then share properties with the<br>
> SurfaceRepresentation. That way when DiffuseColor is set, you'll be<br>
> actually calling SetAmbientColor on your representation.<br>
><br>
> 2> Create a display decorator panel (we'll need to fire a signal or<br>
> something from updateEnableState() that the decorator panel can listen<br>
> to and update the GUI based on what your representation needs).<br>
><br>
> Utkarsh<br>
><br>
> On Fri, Mar 5, 2010 at 9:25 AM, Paul Edwards <<a href="mailto:paul.m.edwards@gmail.com">paul.m.edwards@gmail.com</a>> wrote:<br>
>> I'm still not sure what to do about this. Do you have any ideas?<br>
>> Thanks,<br>
>> Paul<br>
>><br>
>> On 22 February 2010 15:29, Paul Edwards <<a href="mailto:paul.m.edwards@gmail.com">paul.m.edwards@gmail.com</a>> wrote:<br>
>>><br>
>>> I can't see how this is possible through the SharedProperties as the color<br>
>>> combo box that is displayed in the "Display Properties" is chosen from the<br>
>>> result of pqPipelineRepresentation::getRepresentationType() (from the call<br>
>>> in pqDisplayProxyEditor.cxx line 695). This will default to<br>
>>> vtkSMPVRepresentationProxy::SURFACE for all user defined representations<br>
>>> inheriting from SurfaceRepresentation type - really this should be checking<br>
>>> the subtype ID that is specified in the XML file, although I'm not quite<br>
>>> sure how this can be done....<br>
>>> Can you get it to work with the example plugin?<br>
>>><br>
>>> Thanks,<br>
>>> Paul<br>
>>><br>
>>> On 22 February 2010 15:05, Utkarsh Ayachit <<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>><br>
>>> wrote:<br>
>>>><br>
>>>> One solution is to share common properties with the<br>
>>>> SurfaceRepresentation sub-proxy using the <ShareProperties> tag. You<br>
>>>> can add exceptions (you will have to add exceptions for Input,<br>
>>>> Representation properties at the least).<br>
>>>><br>
>>>> Utkarsh<br>
>>>><br>
>>>> On Mon, Feb 22, 2010 at 7:48 AM, Paul Edwards <<a href="mailto:paul.m.edwards@gmail.com">paul.m.edwards@gmail.com</a>><br>
>>>> wrote:<br>
>>>> > Hi,<br>
>>>> > I have compiled the representation plugin in the CVS and I have the<br>
>>>> > problem<br>
>>>> > that I cannot change the colour for the "Special Mapper" in the Object<br>
>>>> > Inspector's "Display" panel. This seems to be due to the display<br>
>>>> > properties<br>
>>>> > being for the surface representation rather than the wireframe (it<br>
>>>> > shows<br>
>>>> > "Set Solid Color..." rather than "Set Ambient Color..."). Does anyone<br>
>>>> > know<br>
>>>> > who to fix this?<br>
>>>> > Thanks in advance,<br>
>>>> > Paul<br>
>>>> > _______________________________________________<br>
>>>> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>>> ><br>
>>>> > Visit other Kitware open-source projects at<br>
>>>> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>>>> ><br>
>>>> > Please keep messages on-topic and check the ParaView Wiki at:<br>
>>>> > <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
>>>> ><br>
>>>> > Follow this link to subscribe/unsubscribe:<br>
>>>> > <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
>>>> ><br>
>>>> ><br>
>>><br>
>><br>
>><br>
><br>
</div></div></blockquote></div><br></div>