<div dir="ltr"><div style><span style="font-family:arial,sans-serif;font-size:13px">Replace : </span><span style="font-family:arial,sans-serif;font-size:13px">MantaView1 = CreateRenderView()</span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">By : </span><span style="font-family:arial,sans-serif;font-size:13px">MantaView1 = </span><span style="font-family:arial,sans-serif;font-size:13px">servermanager._create_view("MantaView")</span></div>
<div style><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div style><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Mon, Mar 4, 2013 at 5:37 AM, Roman Vetter <span dir="ltr"><<a href="mailto:vetterro@ethz.ch" target="_blank">vetterro@ethz.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello everyone,<br>
<br>
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.<br>
<br>
Essentially, as soon as I try to set a Manta-specific attribute of a DataRepresentation, python complains:<br>
<br>
<br>
from paraview.simple import *<br>
LoadPlugin("/path/to/my/<u></u>libMantaView.so", False, globals())<br>
<br>
paraview.simple._<u></u>DisableFirstRenderCameraReset(<u></u>)<br>
RenderView1 = GetRenderView()<br>
Delete(RenderView1)<br>
MantaView1 = CreateRenderView()<br>
<br>
mesh00 = XMLUnstructuredGridReader( '/path/to/my/mesh.vtu' )<br>
DataRepresentation1 = Show()<br>
DataRepresentation1.<u></u>MaterialType = 'phong'<br>
<br>
<br>
>> AttributeError: Attribute MaterialType does not exist. This class doesn not allow addition of new attributes to avoid mistakes due to typoes.<br>
<br>
<br>
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?<br>
<br>
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.<br>
<br>
<br>
Thanks for your help!<br>
<br>
Roman<br>
______________________________<u></u>_________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<u></u>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/<u></u>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/<u></u>mailman/listinfo/paraview</a><br>
</blockquote></div><br></div>