I am looking at the HelixSource xml example. With something like this:
     <StringVectorProperty
       name="NumberOfRounds"
       command="SetParameter"
       number_of_elements="2"
       default_values_delimiter=";"
       default_values="rounds;3">
     </StringVectorProperty>

It is displaying a label with a description of the property, a textbox with
the name of the property, and another textbox with the value of the
property. Is there anyway to skip the textbox with the name of the property
(because it doesn't really make sense for the user to change this - so why
allow it?)

Also, the script itself seems to be set like this:
     <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;">
     </StringVectorProperty>

That is a pretty cryptic way to have to write code - is there a way to take
a normal looking script:
import math
pdo = self.GetPolyDataOutput()
newPts = vtk.vtkPoints()
etc.

and point the xml to it - so you can edit the script in a .py file and the
xml just points to that file? This also kind of stems from the first
question - but I also would like to NOT display the script in the GUI - only
the tunable parameters - is that possible?

Thanks,

David
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to