Hi all, I would like to change the colour of a given set of points in my mayavi scene. Doing:
s = [0,1,2,3,4] self.pts.module_manager.scalar_lut_manager.lut.table[s,:] = [255,0,0] gives me the error: File "tvtk_classes\data_array.py", line 615, in __setitem__ File "tvtk_classes\data_array.py", line 595, in _check_key TypeError: Only integers are valid keys. The only way I found to solve this is to do: self.pts.module_manager.scalar_lut_manager.lut.table.to_array()[s,:] = [255,0,0] is this the only way to do ? thanks for your help Eric -- Eric Pellegrini Calcul Scientifique Institut Laue-Langevin Grenoble, France ------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev _______________________________________________ MayaVi-users mailing list MayaVi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mayavi-users