View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006571ParaView(No Category)public2008-03-07 22:092009-05-13 13:59
ReporterBerk Geveci 
Assigned ToClinton Stimpson 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version3.4Fixed in Version3.4 
Summary0006571: Color By menu on toolbar does not update
DescriptionIf 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)
TagsNo tags attached.
Project
Topic Name
Type
Attached Files

 Relationships
related to 0004005closedClinton Stimpson Need event from display proxy 

  Notes
(0010761)
Clinton Stimpson (developer)
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 (administrator)
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 (administrator)
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 (developer)
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 (administrator)
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 (developer)
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 (developer)
2008-03-26 12:27

vtkSMOutputPort has a new event. Using it fixes this problem.
(0011023)
Alan Scott (manager)
2008-04-01 16:55

Tested client/server

 Issue History
Date Modified Username Field Change
2008-03-07 22:09 Berk Geveci New Issue
2008-03-07 22:09 Berk Geveci Status backlog => tabled
2008-03-07 22:09 Berk Geveci Assigned To => Clinton Stimpson
2008-03-10 12:53 Clinton Stimpson Note Added: 0010761
2008-03-10 21:31 Berk Geveci Note Added: 0010765
2008-03-10 21:32 Berk Geveci Status tabled => closed
2008-03-10 21:32 Berk Geveci Resolution open => unable to reproduce
2008-03-12 16:40 Berk Geveci Note Added: 0010775
2008-03-12 16:40 Berk Geveci Status closed => tabled
2008-03-18 17:12 Clinton Stimpson Note Added: 0010845
2008-03-20 11:03 Berk Geveci Note Added: 0010868
2008-03-25 17:17 Clinton Stimpson Relationship added related to 0004005
2008-03-25 17:19 Clinton Stimpson Note Added: 0010908
2008-03-26 12:27 Clinton Stimpson Status tabled => closed
2008-03-26 12:27 Clinton Stimpson Note Added: 0010919
2008-03-26 12:28 Clinton Stimpson Status closed => @80@
2008-03-26 12:28 Clinton Stimpson Resolution unable to reproduce => fixed
2008-04-01 16:55 Alan Scott Status @80@ => closed
2008-04-01 16:55 Alan Scott Note Added: 0011023
2009-05-13 13:58 Utkarsh Ayachit Target Version => 3.4
2009-05-13 13:59 Utkarsh Ayachit Fixed in Version => 3.4
2011-06-16 13:10 Zack Galbreath Category => (No Category)


Copyright © 2000 - 2018 MantisBT Team