PyMOL will already dump POVRAY format files; you should be able to feed
these to Blender somehow.  This looks like it might be useful:

http://jmsoler.free.fr/util/blenderfile/povanim.htm

No idea if it will work well. . . but probably worth a try before writing
something yourself.

On Wed, 10 Mar 2004, Scott Classen wrote:

> Begin forwarded message:
>
> > From: Scott Classen <clas...@berkeley.edu>
> > Date: March 10, 2004 4:20:53 PM PST
> > To: Warren DeLano <war...@delanoscientific.com>
> > Cc: pymol-users@lists.sourceforge.net
> > Subject: Is exporting CGOs vertices possible?
> >
> > Hello Fellow PyMOLers,
> > I am interested in using another program (Blender) to do some more
> > complicated animations/rendering of molecules. Unfortunately Blender
> > does not import very many types of files. I have been able to use
> > Gerard Kleywegts MOLEMAN2 to convert my PDB to a VRML1 file and import
> > that into Blender, but this is very limited in its abilities.
> >
> >  I would love to be able to get the beautiful cartoons, ribbons,
> > sticks, and other shapes from PyMOL and then import them into Blender.
> > Is there a way to get a file from PyMOL that contains all the vertices
> > that construct objects. i.e the vertices that describe a ribbon
> > representation of my protein.
> >
> > I understand that PyMOL generates CGOs that it feeds to the internal
> > ray-tracer. Can PyMOL write out these vertices to a file instead? I
> > would then have to write a python script or something that would parse
> > the PyMOL vertices into a file that is importable into Blender (that's
> > a whole other can of worms).
> >
> > Thanks,
> >
> > Scott
>
> Hello PyMOLers,
> I also think it is important to know which vertices are connected to
> each other in order to form the proper faces. I'm looking into the
> Blender API a bit more and it looks like it needs the vertex x,y,z
> coordinates and the "face data" in order to connect the vertices in a
> meaningful way. These are the two entries I think are important.
>
> Vert(x=0,  y=0,  z=0)
>   Get a new vertex object.
>   Parameters:
> x -  The x coordinate of the vertex.
>   ??????????  (type=float)
> y -  The y coordinate of the vertex.
>   ??????????  (type=float)
> z -  The z coordinate of the vertex.
>   ??????????  (type=float)
> Returns:
>   A new NMVert object.
>   ??????????  (type=NMVert)
>
>
>
>
> Face(vertexList=None)
>   Get a new face object.
>   Parameters:
> vertexList -  A list of up to 4 NMVerts (mesh vertex objects).
>   ??????????  (type=list)
> Returns:
>   A new NMFace object.
>   ??????????  (type=NMFace)
>
>
>
> I think it would be sufficient to have a txt file that looks like this
> with the vertex coord followed by a list of the vertices that make up
> relevent faces.
>
> xyz
> xyz
> xyz
> xyz
> xyz
> abcd
> abcd
> abcd
> abcd
> abcd
>
>
>
>
>
> >
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    Scott Classen, Ph.D.
>    ACS Postdoctoral Fellow
>    Department of Molecular & Cell Biology
>    University of California, Berkeley
>    237 Hildebrand Hall #3206
>    Berkeley, CA 94720-3206
>    LAB 510.643.9491
>    FAX 510.643.9290
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>

Reply via email to