[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;
pdo =
self.GetPolyDataOutput()

newPts = vtk.vtkPoints()
for i
in range(0, numPts):
 x = i*float(length)/float(numPts)
 y
= math.sin(i*rounds*2*math.pi/numPts)
 z =
math.cos(i*rounds*2*math.pi/numPts)
 newPts.InsertPoint(i,
x,y,z)

pdo.SetPoints(newPts)
aPolyLine =
vtk.vtkPolyLine()

aPolyLine.GetPointIds().SetNumberOfIds(numPts)
for
i in range(0,numPts):
 aPolyLine.GetPointIds().SetId(i,
i)

pdo.Allocate(1,
1)
pdo.InsertNextCell(aPolyLine.GetCellType(),
aPolyLine.GetPointIds())
">
<Hints>
<Widget type="multi_line"/>
</Hints>
</StringVectorProperty>
from the helix source plugin!!!
thanks in advance
More information about the ParaView
mailing list