<div>Thanks a lotUtkarsh, we can now load our model. We are trying now to create a transform filter for moving the model around. We are creating it the same way we create a source (with pqObjectBuilder) but we have not found a way to specify the transformation attributes (rotation, translation, scaling) without using the GUI. We have read the filters.xml and there are such propeties specifying those attributes. However, it is not clear how we can manipulate those attributes via pqObjectBuilder or via pqPipelineSource.</div>
<div></div><div>Thanks.<br></div> <br><div class="gmail_quote">2009/7/15 Utkarsh Ayachit <span dir="ltr"><<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
For some reason the proxy is named "vrmlreader" (all lowercase). Try<br>
using that name when calling createSource().<br>
<br>
If you run into such issues, you can always look at<br>
ParaView3Source/Servers/ServerManager/Resources/readers.xml to<br>
determine the name of the proxy for the reader you want to create.<br>
<div><div class="h5"><br>
Utkarsh<br>
<br>
2009/7/15 Andrés Felipe Padilla <<a href="mailto:anfeken@gmail.com">anfeken@gmail.com</a>>:<br>
> We tried the following using the vtkVRMLSource<br>
><br>
> std::string file = "/models/flag.wrl";<br>
> leVRML = vtkVRMLSource::New();<br>
> leVRML->SetFileName(file.c_str());<br>
><br>
> However, we do not know how to visualize the VRMLObject in the Active View.<br>
><br>
> We tried the following using pqObjectBuilder:<br>
><br>
> pqPendingDisplayManager *pdm =<br>
> qobject_cast<pqPendingDisplayManager*>(pqApplicationCore::instance()->manager("PENDING_DI<br>
> SPLAY_MANAGER"));<br>
> pdm->setAddSourceIgnored(true);<br>
> leSource = builder->createSource("sources", "VRMLSource", s);<br>
> leSource->getProxy()->UpdateVTKObjects();<br>
> pdm->setAddSourceIgnored(false);<br>
> leSource->setModifiedState(pqProxy::UNMODIFIED);<br>
> pqOutputPort* oPort = leSource->getOutputPort(0);<br>
> builder->createDataRepresentation(oPort,<br>
> pqActiveView::instance().current());<br>
> (pqActiveView::instance().current())->render();<br>
><br>
> but VRMLSource does not exist, so this approach fails. We were trying to<br>
> look if creating a proxy with the vtkVRMLSource would work but we haven't<br>
> figure that out yet. Can this source be added via an XML or something<br>
> (*throwing some ideas) so it can be used with the objectBuilder?<br>
><br>
> Thanks.<br>
><br>
> Andrés<br>
><br>
> 2009/7/15 Utkarsh Ayachit <<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>><br>
>><br>
>> What you described should work. Can you post relevant sections of the<br>
>> code?<br>
>><br>
>> Utkarsh<br>
>><br>
>> 2009/7/15 Andrés Felipe Padilla <<a href="mailto:anfeken@gmail.com">anfeken@gmail.com</a>>:<br>
>> > Thanks for your quick answer Utkarsh. However, we are trying to load a<br>
>> > VRML<br>
>> > file without having to use the menus. We are using vtkVRMLSource, but we<br>
>> > don't know to visualize it. We are trying to use the pqObjectBuilder<br>
>> > methods, createSource and createDataRepresentation, but it does not work<br>
>> > with VRML files. Is there a way for loading and displaying the file<br>
>> > without<br>
>> > using the menus? Thanks a lot for your help.<br>
>> ><br>
>> > 2009/7/13 Utkarsh Ayachit <<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>><br>
>> >><br>
>> >> You can simply open a vrml file as if you are loading a data file<br>
>> >> using "File |Open". ParaView will create the vtkVRMLSource for you.<br>
>> >><br>
>> >> vtkVRMLSource has methods like SetFileName that you use to set the<br>
>> >> filename programmatically and they are indeed public.<br>
>> >><br>
>> >> Utkarsh<br>
>> >><br>
>> >> 2009/7/13 Andrés Felipe Padilla <<a href="mailto:anfeken@gmail.com">anfeken@gmail.com</a>>:<br>
>> >> > Hi,<br>
>> >> > I've been trying to load a VRML on ParaView unsucessfully from code.<br>
>> >> > From<br>
>> >> > the API and the code i see that the vtkVRMLSource could allow one to<br>
>> >> > load a<br>
>> >> > VRML but i have some issues with it. I create a vtkVRMLSource with<br>
>> >> > the<br>
>> >> > New()<br>
>> >> > method but from there i cant see where to go. I cannot specify this<br>
>> >> > object<br>
>> >> > the file i want to load as all its members are protected. So my<br>
>> >> > question<br>
>> >> > is<br>
>> >> > how do i tell the vtkVRMLSource to load my VRML?<br>
>> >> > Thanks<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>