From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Tue Mar 10 2009 - 10:25:07 CDT

On Tue, 2009-03-10 at 16:02 +0100, Raluca Mihaela ANDREI wrote:
> Sorry, I'll try to explain better: I have a protein displayed
> as surface and I render it using Wavefront. I obtain an .obj
> file that cannot be imported into Blender for example. I saw
> that if I remove the spaces from the begining of each line I
> obtain an .obj file that can be imported into Blender. I would
> like to know how to create an .obj file without these 2
> spaces, rather than modifing it afterwards. I found

what is so bad about running your file through,
e.g. perl -e 'while (<>) {$_ =~ s/^\s\s//; print $_;}' ?

also, do you have any confirmation, that the spaces at
the beginning of the line are actually violating the format,
i.e. that it is VMD that is wrong and not blender?

> WavefrontDisplayDevice.C script in the source of VMD. Now, if
> I modify this script I have to compile VMD, right? I'm working

if you change the c++ source code (that file is _not_ a script),
then you have to compile VMD (all of it).

> on Windows and I have some problems compiling it.

i am not surprised. i don't use windows, so i cannot
help you with this.

cheers,
   axel.

> Thank you,
> Raluca
>
> On Tue, 10 Mar 2009 10:24:01 -0400
> Axel Kohlmeyer <akohlmey_at_cmm.chem.upenn.edu> wrote:
> > On Tue, 2009-03-10 at 09:27 +0100, Raluca Mihaela ANDREI
> >wrote:
> >> Hello!
> >
> > hello raluca,
> >
> >> VMD exports obj in a format that the other programs can't
> >> read. There are 2 spaces at the begining of each file. Does
> >
> > sorry, can you please explain in more detail about what
> >"export"
> > and what "obj" you are referring to. for example by
> >describing
> > exactly what steps you do. i doubt that otherwise somebody
> >can
> > help you. please keep in mind that answers can only be as
> >good
> > and clear as the questions are.
> >
> > thanks,
> > axel.
> >
> >> anyone know which is the script that exports obj? I would
> >>like
> >> to delete these 2 spaces from the obj format.
> >
> >
> >
> >> Thank you,
> >> Raluca
> >
> > --
> > =======================================================================
> > Axel Kohlmeyer akohlmey_at_cmm.chem.upenn.edu
> > http://www.cmm.upenn.edu
> > Center for Molecular Modeling -- University of
> >Pennsylvania
> > Department of Chemistry, 231 S.34th Street, Philadelphia, PA
> >19104-6323
> > tel: 1-215-898-1582, fax: 1-215-573-6233, office-tel:
> >1-215-898-5425
> > =======================================================================
> > If you make something idiot-proof, the universe creates a
> >better idiot.
> >

-- 
=======================================================================
Axel Kohlmeyer   akohlmey_at_cmm.chem.upenn.edu   http://www.cmm.upenn.edu
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.