[vtkusers] vtkpython: GetCellData().SetScalars(array) bug?

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Thu Nov 20 22:01:38 EST 2003


>>>>> "GP" == Garegin Papoian <gap5 at cornell.edu> writes:

[snip]
    GP> iren.Initialize() renWin.Render() # Line A
    GP> pd.GetCellData().SetScalars(scal_arr) # Line B, this line
    GP> seems to have no effect if it is moved upwards in the code
    GP> iren.Start()

The Render updates the pipeline, only then is the pipeline flushed.
To get pd.GetCellData().SetScalars(scal_arr) to work add a
pd.Update() before you set the cell scalars.

scal_arr.SetLookupTable(lut)

pd.Update()  # add this.
pd.GetCellData().SetScalars(scal_arr)

prabhu



More information about the vtkusers mailing list