<div dir="ltr">The widget proxy is not properly python wrapped.<div><br></div><div>To solve the issue you need to do:</div><div><br></div><div><span style="font-family:arial,sans-serif;font-size:13px">dataInfo = dataSet.GetDataInformation(0)</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px">sliceWidgetW = simple.servermanager.</span> _getPyProxy(<span style="font-family:arial,sans-serif;font-size:13px">sliceWidget)</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">sliceWidgetW.PlaceWidget = dataInfo.GetBounds()</span><br></div><div><br></div><div>Seb</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Nov 22, 2013 at 7:03 AM, kyr <span dir="ltr"><<a href="mailto:akyrieleis@gmail.com" target="_blank">akyrieleis@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From the file ParaViewAdapter_pwsimple you pointed me, Sebastien, to I am<br>
using :<br>
<br>
def CreateWidgetRepresentation(view,name):<br>
proxy = servermanager.CreateProxy("representations", name, None)<br>
pythonWrap = servermanager.rendering.__dict__[proxy.GetXMLName()]()<br>
pythonWrap.UpdateVTKObjects()<br>
view.Representations.append(pythonWrap)<br>
pythonWrap.Visibility = 1<br>
pythonWrap.Enabled = 1<br>
return pytho<br>
<br>
and<br>
<br>
def CreateBindedWidget(proxy, view):<br>
widgetProxy = None<br>
# Find the corresponding widget representation<br>
if proxy.__class__.__name__ == 'Plane':<br>
widgetProxy = CreateWidgetRepresentation(view,<br>
'ImplicitPlaneWidgetRepresentation')<br>
setattr(proxy.__class__, 'UpdateWidget', _plane_update_widget)<br>
setattr(proxy.__class__, 'WidgetUpdate', _plane_widget_update)<br>
widgetProxy.GetProperty('DrawPlane').SetElement(0, 0)<br>
widgetProxy.GetProperty('PlaceFactor').SetElement(0, 1.0)<br>
proxy.UpdateWidget(widgetProxy)<br>
widgetProxy.AddObserver("StartInteractionEvent", _draw_plane)<br>
proxy.Observed = widgetProxy<br>
proxy.ObserverTag = widgetProxy.AddObserver("EndInteractionEvent",<br>
proxy.WidgetUpdate)<br>
elif ...<br>
<br>
<br>
In order to enable the widget I have:<br>
<br>
Slice2 = simple.FindSource('Slice2')<br>
dataSet = simple.FindSource(dname)<br>
view = simple.GetActiveView()<br>
sliceWidget = pwsimple.CreateBindedWidget(Slice2, view)<br>
dataInfo = dataSet.GetDataInformation(0)<br>
sliceWidget.PlaceWidget = dataInfo.GetBounds()<br>
<br>
The last line stops the code !! I was wondering if the functions in<br>
ParaViewAdapter_pwsimple are still valid ? I simple want to display the long<br>
arrow and the bounding boxes of the widget.<br>
<br>
Thanks for any help.<br>
<br>
kyr.<br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://the-unofficial-paraview-developers-forum.34153.x6.nabble.com/Slicing-Selection-Widget-in-Paraview-Web-tp2637p2658.html" target="_blank">http://the-unofficial-paraview-developers-forum.34153.x6.nabble.com/Slicing-Selection-Widget-in-Paraview-Web-tp2637p2658.html</a><br>
<div class="HOEnZb"><div class="h5">Sent from the The Unofficial ParaView Developers Forum mailing list archive at Nabble.com.<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>
</div></div></blockquote></div><br></div>