Michael,

thanks for your reply, this works fine for me. However, I thought there is a
nicer solution on setting the transparency for cgo's after creation.

Regards,

Yusuf

--
Yusuf Tanrikulu
Bioinformatics Diploma Student
Department of Biosciences
Johann-Wolfgang-Goethe Univerity Frankfurt
Siesmayerstrasse 70
60323 Frankfurt am Main
- Germany -
tanrik...@bioinformatik.uni-frankfurt.de

Quoting Michael George Lerner <mler...@umich.edu>:

Quoting tanri...@stud.uni-frankfurt.de:

# Hi everybody,
#
# i've just created many CGOs, which show up solid surfaces like spheres and
# ellipsoids. Is it possible to set the transparency of some CGO's to
i.e. 0.5
# and leave the others solid?
# I've checked out the reference and the manual, and found something like:
#
# set transparency=0.5, object
#
# But this actually does not work for CGO's.
# Any ideas....
#
# Yusuf

The last time I looked at this, it seemed like the easiest (only?) way to do this was to tweak the transparency at creation time. So, I typically have functions that look like this:

def makeSphere(name,x,y,z,r,transparency=0,...):
   ...
   obj = []
   ...
   obj.extend([cgo.ALPHA,1-transparency])
   obj.extend([cgo.SPHERE,x,y,z,r])
   ...
   cmd.load_cgo(obj,name,1)

I don't know how to change it later, though.

Hope that helps,

-michael

#
#
# --
# Yusuf Tanrikulu
# Bioinformatics Diploma Student
# Department of Biosciences
# Johann-Wolfgang-Goethe Univerity Frankfurt
# Siesmayerstrasse 70
# 60326 Frankfurt am Main
# - Germany -
# tanrik...@bioinformatik.uni-frankfurt.de
#
#


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users




Reply via email to