[Paraview] GUIToolbar in python? or XML to python

Jorge Mario Mazo jmm.mecanica at gmail.com
Wed Jan 14 16:54:11 EST 2009


Hi there is there a way to create a GUIToolbar icon in python

or is there to write a XML "view", that trows the data parameters to a
python script, instead of c++ classes,
pretty much like the helix.xml plugin example.

btw how can I "hide" the

      <!-- the script -->
     <StringVectorProperty
        name="Script"
        command="SetScript"
        number_of_elements="1"
        default_values="import math;&#xa;pdo =
self.GetPolyDataOutput()&#xa;&#xa;newPts = vtk.vtkPoints()&#xa;for i
in range(0, numPts):&#xa;   x = i*float(length)/float(numPts)&#xa;   y
= math.sin(i*rounds*2*math.pi/numPts)&#xa;   z =
math.cos(i*rounds*2*math.pi/numPts)&#xa;   newPts.InsertPoint(i,
x,y,z)&#xa;&#xa;pdo.SetPoints(newPts)&#xa;aPolyLine =
vtk.vtkPolyLine()&#xa;&#xa;aPolyLine.GetPointIds().SetNumberOfIds(numPts)&#xa;for
i in range(0,numPts):&#xa;   aPolyLine.GetPointIds().SetId(i,
i)&#xa;&#xa;pdo.Allocate(1,
1)&#xa;pdo.InsertNextCell(aPolyLine.GetCellType(),
aPolyLine.GetPointIds())&#xa;">
       <Hints>
         <Widget type="multi_line"/>
       </Hints>
     </StringVectorProperty>


from the helix source plugin!!!


thanks in advance


More information about the ParaView mailing list