|
Notes |
|
|
(0010761)
|
|
Clinton Stimpson
|
|
2008-03-10 12:53
|
|
Did you actually mean to add a call to SetScalars? With your original script, I get a new entry "foo" in the color by combobox, but it isn't selected. If in the script I set it as the active scalars, then the combo box is updated.
================
from paraview import vtk
output = self.GetOutputDataObject(0)
numpts = output.GetNumberOfPoints()
fa = vtk.vtkFloatArray()
fa.SetName("foo")
output.GetPointData().AddArray(fa)
output.GetPointData().SetScalars(fa)
for i in range(0, numpts):
fa.InsertNextValue(i) |
|
|
|
(0010765)
|
|
Berk Geveci
|
|
2008-03-10 21:31
|
|
|
Weird. I can't reproduce it. When I ran into this problem, foo did not show up in the menu at all. I am closing this bug until I can reproduce it. |
|
|
|
(0010775)
|
|
Berk Geveci
|
|
2008-03-12 16:40
|
|
|
Aha! I figured out how to reproduce the problem. Follow the instructions in the description BUT introduce an error in the script before the first accept. For example, change GetOutputDataObject(0) to GetOutputDataObject(0,0). THEN, fix the error and accept again. This time the new array does not show up in the menu. Weird huh? |
|
|
|
(0010845)
|
|
Clinton Stimpson
|
|
2008-03-18 17:12
|
|
Why did the filter give an non-empty output if there was an error in the script?
Maybe that's part of the reason. |
|
|
|
(0010868)
|
|
Berk Geveci
|
|
2008-03-20 11:03
|
|
|
The output is created before the python script is run to make it easy to write filters that create arrays. I don't understand what that should cause the toolbar update to fail. Maybe the data information is not updating properly? |
|
|
|
(0010908)
|
|
Clinton Stimpson
|
|
2008-03-25 17:19
|
|
I looked at this some more... and its the same problem explained in bug 0004005
The representation proxies don't tell the GUI when arrays are added/removed. |
|
|
|
(0010919)
|
|
Clinton Stimpson
|
|
2008-03-26 12:27
|
|
|
vtkSMOutputPort has a new event. Using it fixes this problem. |
|
|
|
(0011023)
|
|
Alan Scott
|
|
2008-04-01 16:55
|
|
|