MantisBT - ParaView
View Issue Details
0006571ParaView(No Category)public2008-03-07 22:092009-05-13 13:59
Berk Geveci 
Clinton Stimpson 
normalminorhave not tried
closedfixed 
 
3.43.4 
0006571: Color By menu on toolbar does not update
If a filter adds a new array, Color By filter does not update to reflect it. Try this:

* Create sphere
* Create a programmable filter - apply
* Set the script to below - apply
The color by menu does not change.

from paraview import vtk

output = self.GetOutputDataObject(0)

numpts = output.GetNumberOfPoints()
fa = vtk.vtkFloatArray()
fa.SetName("foo")
output.GetPointData().AddArray(fa)

for i in range(0, numpts):
    fa.InsertNextValue(i)
No tags attached.
related to 0004005closed Clinton Stimpson Need event from display proxy 
Issue History
2008-03-07 22:09Berk GeveciNew Issue
2008-03-07 22:09Berk GeveciStatusbacklog => tabled
2008-03-07 22:09Berk GeveciAssigned To => Clinton Stimpson
2008-03-10 12:53Clinton StimpsonNote Added: 0010761
2008-03-10 21:31Berk GeveciNote Added: 0010765
2008-03-10 21:32Berk GeveciStatustabled => closed
2008-03-10 21:32Berk GeveciResolutionopen => unable to reproduce
2008-03-12 16:40Berk GeveciNote Added: 0010775
2008-03-12 16:40Berk GeveciStatusclosed => tabled
2008-03-18 17:12Clinton StimpsonNote Added: 0010845
2008-03-20 11:03Berk GeveciNote Added: 0010868
2008-03-25 17:17Clinton StimpsonRelationship addedrelated to 0004005
2008-03-25 17:19Clinton StimpsonNote Added: 0010908
2008-03-26 12:27Clinton StimpsonStatustabled => closed
2008-03-26 12:27Clinton StimpsonNote Added: 0010919
2008-03-26 12:28Clinton StimpsonStatusclosed => @80@
2008-03-26 12:28Clinton StimpsonResolutionunable to reproduce => fixed
2008-04-01 16:55Alan ScottStatus@80@ => closed
2008-04-01 16:55Alan ScottNote Added: 0011023
2009-05-13 13:58Utkarsh AyachitTarget Version => 3.4
2009-05-13 13:59Utkarsh AyachitFixed in Version => 3.4
2011-06-16 13:10Zack GalbreathCategory => (No Category)

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   
Tested client/server