<div class="gmail_extra">Thanks a lot Sebastien !</div><div class="gmail_extra"><br></div><div class="gmail_extra">Regards,</div><div class="gmail_extra"><br></div><div class="gmail_extra">Jean-Noël<br><br><div class="gmail_quote">
2012/4/25 Sebastien Jourdain <span dir="ltr"><<a href="mailto:sebastien.jourdain@kitware.com" target="_blank">sebastien.jourdain@kitware.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Jean-Noel,<br>
<br>
The documentation is basically in the header file of<br>
vtkSMSessionProxyManager and vtkSMProxy that I've just pasted below as<br>
the formatting of it get messed up in the online doxygene<br>
documentation.<br>
Otherwise, you may get some other informations on the wiki here:<br>
- <a href="http://paraview.org/Wiki/ServerManager_XML_Hints" target="_blank">http://paraview.org/Wiki/ServerManager_XML_Hints</a><br>
<br>
Seb<br>
<br>
=== vtkSMSessionProxyManager ===<br>
<br>
<br>
// Basic XML Proxy definition documentation:<br>
//<br>
// ------------- Proxy definition -------------<br>
// <SourceProxy => Will create vtkSM + SourceProxy class<br>
// name="SphereSource" => Key used to create the proxy<br>
// class="vtkSphereSource" => Concreate vtkClass that do the real job<br>
// label="Sphere"> => Nice name used in menu and python shell<br>
//<br>
// ----------- Property definition -----------<br>
// <DoubleVectorProperty => Will create vtkSM + DoubleVectorProperty<br>
// and vtkSI + DoubleVectorProperty class by<br>
// default.<br>
// name="Center" => Name of the property:<br>
// vtkPropertyHelper(proxy,<br>
"Center").Set(0,1,2)<br>
// command="SetCenter" => Real method name that will be called on<br>
// vtkObject when the property will<br>
be updated.<br>
// number_of_elements="3" => Size of the vector<br>
// animateable="1" => Tell the animation view that property<br>
// can be used as an evolving property<br>
// default_values="0 0 0"> => The value that will be set at the<br>
// </DoubleVectorProperty> construction to the VTK object<br>
// </SourceProxy><br>
//<br>
// For custom behaviour the user can add some extra attributes:<br>
//<br>
// - We can specify a custom SIProperty class to handle in a custom way the<br>
// data on the server.<br>
// <StringVectorProperty => vtkSMStringVectorProperty class<br>
// name="ElementBlocksInfo" => Property name<br>
// information_only="1" => Can only be used to fecth data<br>
// si_class="vtkSISILProperty" => Class name to instanciate on<br>
the other side<br>
// subtree="Blocks"/> => Extra attribute used by<br>
vtkSISILProperty<br>
//<br>
// - We can trigger after any update a command to be executed<br>
// <Proxy name="LookupTable"<br>
// class="vtkLookupTable"<br>
// post_push="Build" => The method Build() will be called each<br>
// time a new property value is pushed to<br>
// the VTK object.<br>
// processes="dataserver|renderserver|client" ><br>
//<br>
// - We can force any property to push its value as soon has it get changed<br>
// <Property name="ResetFieldCriteria"<br>
// command="ResetFieldCriteria"<br>
// immediate_update="1"> => Modifying the property will result<br>
// of a push of it and the execution<br>
// of the command on the vtkObject.<br>
//<br>
// - To show a source proxy or a filter inside the menu of ParaView<br>
we use a hint<br>
// <SourceProxy ...><br>
// <Hints><br>
// <ShowInMenu => The category attribute allow to<br>
// category="PersoFilter"/> specify in which sub-menu this<br>
// proxy should be in. (optional)<br>
// </Hints><br>
// </SourceProxy><br>
<br>
<br>
==== vtkSMProxy ===<br>
<br>
// vtkSMProxy manages VTK object(s) that are created on a server<br>
// using the proxy pattern. The managed object is manipulated through<br>
// properties.<br>
// The type of object created and managed by vtkSMProxy is determined<br>
// by the VTKClassName variable. The object is managed by getting the desired<br>
// property from the proxy, changing it's value and updating the server<br>
// with UpdateVTKObjects().<br>
// A proxy can be composite. Sub-proxies can be added by the proxy<br>
// manager. This is transparent to the user who sees all properties<br>
// as if they belong to the root proxy.<br>
//<br>
//<br>
// When defining a proxy in the XML configuration file,<br>
// to derrive the property interface from another proxy definition,<br>
// we can use attributes "base_proxygroup" and "base_proxyname" which<br>
// identify the proxy group and proxy name of another proxy. Base interfaces<br>
// can be defined recursively, however care must be taken to avoid cycles.<br>
//<br>
// There are several special XML features available for subproxies.<br>
// \li 1) It is possible to share properties among subproxies.<br>
// eg.<br>
// \code<br>
// <Proxy name="Display" class="Alpha"><br>
// <SubProxy><br>
// <Proxy name="Mapper" class="vtkPolyDataMapper"><br>
// <InputProperty name="Input" ...><br>
// ...<br>
// </InputProperty><br>
// <IntVectorProperty name="ScalarVisibility" ...><br>
// ...<br>
// </IntVectorProperty><br>
// ...<br>
// </Proxy><br>
// </SubProxy><br>
// <SubProxy><br>
// <Proxy name="Mapper2" class="vtkPolyDataMapper"><br>
// <InputProperty name="Input" ...><br>
// ...<br>
// </InputProperty><br>
// <IntVectorProperty name="ScalarVisibility" ...><br>
// ...<br>
// </IntVectorProperty><br>
// ...<br>
// </Proxy><br>
// <ShareProperties subproxy="Mapper"><br>
// <Exception name="Input" /><br>
// </ShareProperties><br>
// </SubProxy><br>
// </Proxy><br>
// \endcode<br>
// Thus, subproxies Mapper and Mapper2 share the properties that are<br>
// common to both; except those listed as exceptions using the "Exception"<br>
// tag.<br>
//<br>
// \li 2) It is possible for a subproxy to use proxy definition<br>
defined elsewhere<br>
// by identifying the interface with attribues "proxygroup" and "proxyname".<br>
// eg.<br>
// \code<br>
// <SubProxy><br>
// <Proxy name="Mapper" proxygroup="mappers" proxyname="PolyDataMapper" /><br>
// </SubProxy><br>
// \endcode<br>
//<br>
// \li 3) It is possible to scope the properties exposed by a subproxy<br>
and expose<br>
// only a fixed set of properties to be accessible from outside. Also,<br>
// while exposing the property, it can be exposed with a different name.<br>
// eg.<br>
// \code<br>
// <Proxy name="Alpha" ....><br>
// ....<br>
// <SubProxy><br>
// <Proxy name="Mapper" proxygroup="mappers"<br>
proxyname="PolyDataMapper" /><br>
// <ExposedProperties><br>
// <Property name="LookupTable" exposed_name="MapperLookupTable" /><br>
// </ExposedProperties><br>
// </SubProxy><br>
// </Proxy><br>
// \endcode<br>
// Here, for the proxy Alpha, the property with the name<br>
LookupTable from its<br>
// subproxy "Mapper" can be obtained by calling<br>
GetProperty("MapperLookupTable")<br>
// on an instance of the proxy Alpha. "exposed_name" attribute is<br>
optional, if<br>
// not specified, then the "name" is used as the exposed property name.<br>
// Properties that are not exposed are treated as<br>
// non-saveable and non-animateable (see vtkSMProperty for details).<br>
// Exposed property restrictions only work when<br>
// using the GetProperty on the container proxy (in this case Alpha) or<br>
// using the PropertyIterator obtained from the container proxy. If one<br>
// is to some how obtain a pointer to the subproxy and call GetProperty on<br>
// it (or get a PropertyIterator for the subproxy), the properties exposed<br>
// by the container class are no longer applicable.<br>
// If two exposed properties are exposed with the same name, then<br>
a Warning is<br>
// flagged -- only one of the two exposed properties will get exposed.<br>
//<br>
// .SECTION See Also<br>
// vtkSMProxyManager vtkSMProperty vtkSMSourceProxy vtkSMPropertyIterator<br>
<br>
<br>
On Wed, Apr 25, 2012 at 3:09 AM, Jean-Noël Chiganne<br>
<div class="HOEnZb"><div class="h5"><<a href="mailto:jean-noel.chiganne@limsi.fr">jean-noel.chiganne@limsi.fr</a>> wrote:<br>
> Hi Nikhil,<br>
><br>
> Thanks for your answer !<br>
><br>
> So I'll continue my investigations in the VR plugin and do what you suggest<br>
> about extending it.<br>
><br>
> When you say "Extend the internal event structure to include OSC data.", do<br>
> you mean the internal event structure of ParaView or of the VR plugin ?<br>
><br>
> If someone has a link, I'm still looking for a doc about the XML<br>
> ServerManager syntax. =)<br>
><br>
> Have a good day,<br>
><br>
> Jean-Noël<br>
><br>
> 2012/4/24 Nikhil Shetty <<a href="mailto:nikhil.shetty@kitware.com">nikhil.shetty@kitware.com</a>><br>
>><br>
>> Hi Jean,<br>
>><br>
>> The VRPlugin simply provides a framework to pass alternative event<br>
>> streams. It currently takes VRPN and/or VRUI streams and converts it into an<br>
>> internal event structure. There is a dispatcher which takes these event<br>
>> streams and dispatches to various VRInteractor styles.<br>
>><br>
>> However the even stream does not replace the window interactor but instead<br>
>> we define new interactor styles which work alongside the current style.<br>
>><br>
>> You could start writing the plugin from scratch by copying the VRPlugin<br>
>> over and deleting unnecessary classes. Alternatively you could extend the<br>
>> plugin cause it has most of the framework to forward (non native) events to<br>
>> the system.<br>
>><br>
>> If you decide to do the latter then you will have to do the following<br>
>><br>
>> 1. Add a connection client for OSC (VRPN and VRUI are just connection<br>
>> clients).<br>
>> 2. Extend the internal event structure to include OSC data.<br>
>> 3. Write an Interactor style to handle OSC events.<br>
>><br>
>> All the best<br>
>><br>
>> Regards<br>
>> Nikhil<br>
>><br>
>> On Tue, Apr 24, 2012 at 9:13 AM, Jean-Noël Chiganne<br>
>> <<a href="mailto:jean-noel.chiganne@limsi.fr">jean-noel.chiganne@limsi.fr</a>> wrote:<br>
>>><br>
>>> Hi all,<br>
>>><br>
>>> I'm trying to develop a plugin in Paraview and I have some questions.<br>
>>> I found a wiki page "PlugIn How To" speaking a little about plugin<br>
>>> implementation but it's still confuse to me.<br>
>>><br>
>>> Is there a page explaining all the XML syntax of the ServerManager and<br>
>>> ClientManager files ? For instance I tried to compile and use the plugin<br>
>>> "MyView" as shown on the wiki page, but I've got an error message when<br>
>>> loading it in Paraview "Failed to create a proxy for the requested view<br>
>>> type...". As I don't know the XML syntax it's hard to find where the mistake<br>
>>> could be.<br>
>>><br>
>>> I have an other question. My goal is to develop a plugin which would make<br>
>>> paraview reactive to OSC messages (or VRPN messages, I've seen there is a VR<br>
>>> plugin but it's another problem ^^) but I don't know if it's possible ?<br>
>>> Actually I don't understand where is the entry point for paraview in the C++<br>
>>> source code of a plugin, and how I can get back Paraview objects instances<br>
>>> (as the render windows to get the camera and control it with OSC messages<br>
>>> etc). To sum up, I think the final goal is to replace WindowInteractor by an<br>
>>> Interactor reacting to OSC events instead of keyboard/mouse events.<br>
>>><br>
>>> I hope my message is understandable ^^<br>
>>><br>
>>> Thank you for reading :)<br>
>>><br>
>>> Jean-Noël Chiganne<br>
>>><br>
>>> _______________________________________________<br>
>>> Paraview-developers mailing list<br>
>>> <a href="mailto:Paraview-developers@paraview.org">Paraview-developers@paraview.org</a><br>
>>> <a href="http://public.kitware.com/mailman/listinfo/paraview-developers" target="_blank">http://public.kitware.com/mailman/listinfo/paraview-developers</a><br>
>>><br>
>><br>
><br>
><br>
> _______________________________________________<br>
> Paraview-developers mailing list<br>
> <a href="mailto:Paraview-developers@paraview.org">Paraview-developers@paraview.org</a><br>
> <a href="http://public.kitware.com/mailman/listinfo/paraview-developers" target="_blank">http://public.kitware.com/mailman/listinfo/paraview-developers</a><br>
><br>
</div></div></blockquote></div><br></div>