Hi Michel, Some operations should be compatible with the "color" command, in particular all BEGIN/END operations, as long as there is no COLOR operation. Only those which have the color as part of the operation arguments (like CYLINDER and TRIANGLE) won't be recolorable.
Example: from pymol import cgo, cmd obj = [ cgo.BEGIN, cgo.TRIANGLES, cgo.VERTEX, 0.0, 0.0, 0.0, cgo.VERTEX, 1.0, 0.0, 0.0, cgo.VERTEX, 0.0, 1.0, 0.0, cgo.END ] cmd.load_cgo(obj, 'foo') cmd.color('blue', 'foo') Cheers, Thomas > On Dec 17, 2018, at 3:06 PM, Michel Rickhaus <michel.rickh...@gmail.com> > wrote: > > Hi all > > I was wondering whether it is possible to change the appearance of a CGO > Object after creation. I typically set the attributes of each CGO (plane for > instance) using > > dict = {'ALPHA':1.0, 'COLOR':[0.99, 0.87, 0.67], 'INVERT':False} > > before the creating of the CGO and calling dict. Sometimes I'd like to change > these after creation. The typical PyMol commands (color..) do not seem to > work. If I dont set transparency using dict, i can use set cgo_transparency > later. The same does not work for color (there is no set cgo_color or > related...) > It seems to have been asked in part before > (https://www.mail-archive.com/pymol-users@lists.sourceforge.net/msg08330.html) > > > Any help is appreciated > > Michel -- Thomas Holder PyMOL Principal Developer Schrödinger, Inc. _______________________________________________ PyMOL-users mailing list Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net Unsubscribe: https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe