[Paraview] MantaView in pvpython

Sebastien Jourdain sebastien.jourdain at kitware.com
Mon Mar 4 08:43:12 EST 2013


Replace : MantaView1 = CreateRenderView()
By : MantaView1 = servermanager._create_view("MantaView")




On Mon, Mar 4, 2013 at 5:37 AM, Roman Vetter <vetterro at ethz.ch> wrote:

> Hello everyone,
>
> I'm trying to render a VTK mesh with Manta in pvpython. It runs fine in
> the GUI version of Paraview, but I can't get it to work in pvpython.
>
> Essentially, as soon as I try to set a Manta-specific attribute of a
> DataRepresentation, python complains:
>
>
> from paraview.simple import *
> LoadPlugin("/path/to/my/**libMantaView.so", False, globals())
>
> paraview.simple._**DisableFirstRenderCameraReset(**)
> RenderView1 = GetRenderView()
> Delete(RenderView1)
> MantaView1 = CreateRenderView()
>
> mesh00 = XMLUnstructuredGridReader( '/path/to/my/mesh.vtu' )
> DataRepresentation1 = Show()
> DataRepresentation1.**MaterialType = 'phong'
>
>
> >> AttributeError: Attribute MaterialType does not exist. This class doesn
> not allow addition of new attributes to avoid mistakes due to typoes.
>
>
> I'm assuming the view type is not set to Manta correctly, so the Manta
> attributes are not available. How to fix this? How to create a render view
> of a specific type, i.e.: Manta?
>
> I've looked at the code produced in the python trace when doing it all
> manually in the GUI. The result is essentially the above; nothing that
> actually tells Paraview to use a Manta view type.
>
>
> Thanks for your help!
>
> Roman
> ______________________________**_________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/**
> opensource/opensource.html<http://www.kitware.com/opensource/opensource.html>
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/**ParaView <http://paraview.org/Wiki/ParaView>
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/**mailman/listinfo/paraview<http://www.paraview.org/mailman/listinfo/paraview>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20130304/85c1159c/attachment.htm>


More information about the ParaView mailing list