Milan,<br><br>You cannot change the input to a representation. However, you should be able to create a new representation and copy properties from the previous one with Copy() method of Proxy.<br><br>-berk<br><br><br><div>
<span class="gmail_quote">On 9/12/07, <b class="gmail_sendername">Milan Frank</b> <<a href="mailto:milan.frank@gmail.com">milan.frank@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi everybody,<br><br>I am experimenting with the new Python interface (via pvpython). I am trying to change the input of a representation. It seems it does not work. Following code should first show:<br><ul><li>A "shrinked" sphere - OK,
</li><li>A solid cone - Wrong, "shrinked" cone instead.</li></ul>I can not redirect the input of the representation but the input of the shrink filter can be changed. Is this an expected behavior?<br><br>The example:
<br><br><span style="font-family: courier new,monospace;"> sphere = pvsm.sources.SphereSource()</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> cone = pvsm.sources.ConeSource
()</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> shrink = pvsm.filters.ShrinkFilter()</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> shrink.Input = sphere</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
view = pvsm.CreateRenderView()</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> rep = pvsm.CreateRepresentation(shrink, view)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> view.ResetCamera()</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
for i in range(100):</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> view.StillRender()</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> shrink.Input = cone</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> rep.Input = cone</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> for i in range(100):</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
view.StillRender()</span><br><br>Any suggestions will be most appreciated. It is crucial for my work to be able to do the redirection ...<br><br>Thanks,<br><span class="sg">Milan.<br>
</span><br>_______________________________________________<br>ParaView mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:ParaView@paraview.org">ParaView@paraview.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">
http://www.paraview.org/mailman/listinfo/paraview</a><br><br></blockquote></div><br>