No subject


Tue Nov 5 09:07:12 EST 2013


def CreateWidgetRepresentation(view,name):
  proxy = servermanager.CreateProxy("representations", name, None)
  pythonWrap = servermanager.rendering.__dict__[proxy.GetXMLName()]()
  pythonWrap.UpdateVTKObjects()
  view.Representations.append(pythonWrap)
  pythonWrap.Visibility = 1
  pythonWrap.Enabled = 1
  return pytho

and 

def CreateBindedWidget(proxy, view):
    widgetProxy = None
    # Find the corresponding widget representation
    if proxy.__class__.__name__ == 'Plane':
        widgetProxy = CreateWidgetRepresentation(view,
'ImplicitPlaneWidgetRepresentation')
        setattr(proxy.__class__, 'UpdateWidget', _plane_update_widget)
        setattr(proxy.__class__, 'WidgetUpdate', _plane_widget_update)
        widgetProxy.GetProperty('DrawPlane').SetElement(0, 0)
        widgetProxy.GetProperty('PlaceFactor').SetElement(0, 1.0)
        proxy.UpdateWidget(widgetProxy)
        widgetProxy.AddObserver("StartInteractionEvent", _draw_plane)
        proxy.Observed = widgetProxy
        proxy.ObserverTag = widgetProxy.AddObserver("EndInteractionEvent",
proxy.WidgetUpdate)
    elif ...


In order to enable the widget I have:

 Slice2 = simple.FindSource('Slice2')
 dataSet = simple.FindSource(dname)
 view = simple.GetActiveView()
 sliceWidget = pwsimple.CreateBindedWidget(Slice2, view)
 dataInfo = dataSet.GetDataInformation(0)
sliceWidget.PlaceWidget = dataInfo.GetBounds()

The last line stops the code !! I was wondering if the functions in 
ParaViewAdapter_pwsimple are still valid ? I simple want to display the long
arrow and the bounding boxes of the widget.

Thanks for any help.

kyr.





--
View this message in context: http://the-unofficial-paraview-developers-forum.34153.x6.nabble.com/Slicing-Selection-Widget-in-Paraview-Web-tp2637p2658.html
Sent from the The Unofficial ParaView Developers Forum mailing list archive at Nabble.com.


More information about the Paraview-developers mailing list