Hi, 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?:
> 2> Create a display decorator panel (we'll need to fire a signal or > something from updateEnableState() that the decorator panel can listen > to and update the GUI based on what your representation needs). Thanks, Paul On 8 March 2010 16:51, Paul Edwards <[email protected]> wrote: > Thanks for the reply and I've got (1) working with this added: > > <ExposedProperties> > <Property name="AmbientColor" exposed_name="DiffuseColor" /> > </ExposedProperties> > > The only problem is I get this error message all the time: > > Warning: In ParaView3/Servers/ServerManager/vtkSMProxy.cxx, line 2500 > vtkSMPVRepresentationProxy (0x8a2fe00): An exposed property with the > name "DiffuseColor" already exists. It will be replaced. > > Is there a way to stop this? > > Thanks, > Paul > > > > On 5 March 2010 16:31, Utkarsh Ayachit <[email protected]> > wrote: > > Ah so you want to set the "AmbientColor" property to be set on your > > representation and the GUI only changes "DiffuseColor" color by > > default (unless repr is type is wireframe, points or outline). > > Acually just checking the subtypes also doesn't help since remember > > these are custom representations so sub-type part could mean totally > > different things based on the actual implementation. > > > > A couple of possible workarounds: > > 1> expose AmbientColor property as "DiffuseColor" from your > > representation and then share properties with the > > SurfaceRepresentation. That way when DiffuseColor is set, you'll be > > actually calling SetAmbientColor on your representation. > > > > 2> Create a display decorator panel (we'll need to fire a signal or > > something from updateEnableState() that the decorator panel can listen > > to and update the GUI based on what your representation needs). > > > > Utkarsh > > > > On Fri, Mar 5, 2010 at 9:25 AM, Paul Edwards <[email protected]> > wrote: > >> I'm still not sure what to do about this. Do you have any ideas? > >> Thanks, > >> Paul > >> > >> On 22 February 2010 15:29, Paul Edwards <[email protected]> > wrote: > >>> > >>> I can't see how this is possible through the SharedProperties as the > color > >>> combo box that is displayed in the "Display Properties" is chosen from > the > >>> result of pqPipelineRepresentation::getRepresentationType() (from the > call > >>> in pqDisplayProxyEditor.cxx line 695). This will default to > >>> vtkSMPVRepresentationProxy::SURFACE for all user defined > representations > >>> inheriting from SurfaceRepresentation type - really this should be > checking > >>> the subtype ID that is specified in the XML file, although I'm not > quite > >>> sure how this can be done.... > >>> Can you get it to work with the example plugin? > >>> > >>> Thanks, > >>> Paul > >>> > >>> On 22 February 2010 15:05, Utkarsh Ayachit < > [email protected]> > >>> wrote: > >>>> > >>>> One solution is to share common properties with the > >>>> SurfaceRepresentation sub-proxy using the <ShareProperties> tag. You > >>>> can add exceptions (you will have to add exceptions for Input, > >>>> Representation properties at the least). > >>>> > >>>> Utkarsh > >>>> > >>>> On Mon, Feb 22, 2010 at 7:48 AM, Paul Edwards < > [email protected]> > >>>> wrote: > >>>> > Hi, > >>>> > I have compiled the representation plugin in the CVS and I have the > >>>> > problem > >>>> > that I cannot change the colour for the "Special Mapper" in the > Object > >>>> > Inspector's "Display" panel. This seems to be due to the display > >>>> > properties > >>>> > being for the surface representation rather than the wireframe (it > >>>> > shows > >>>> > "Set Solid Color..." rather than "Set Ambient Color..."). Does > anyone > >>>> > know > >>>> > who to fix this? > >>>> > Thanks in advance, > >>>> > Paul > >>>> > _______________________________________________ > >>>> > 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 > >>>> > > >>>> > Follow this link to subscribe/unsubscribe: > >>>> > http://www.paraview.org/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 Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview
