[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3853] trunk/py/scripts/addons/ io_mesh_pdb:
Clemens Barth
barth at root-1.de
Sun Oct 14 09:56:03 CEST 2012
Revision: 3853
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3853
Author: blendphys
Date: 2012-10-14 07:56:01 +0000 (Sun, 14 Oct 2012)
Log Message:
-----------
When exporting structures from Blender into a PDB file it happened
sometimes that the xyz positions of the atoms weren't correctly
stored. Bug fixed.
Modified Paths:
--------------
trunk/py/scripts/addons/io_mesh_pdb/__init__.py
trunk/py/scripts/addons/io_mesh_pdb/export_pdb.py
Modified: trunk/py/scripts/addons/io_mesh_pdb/__init__.py
===================================================================
--- trunk/py/scripts/addons/io_mesh_pdb/__init__.py 2012-10-13 20:45:24 UTC (rev 3852)
+++ trunk/py/scripts/addons/io_mesh_pdb/__init__.py 2012-10-14 07:56:01 UTC (rev 3853)
@@ -25,7 +25,7 @@
#
# Start of project : 2011-08-31 by Clemens Barth
# First publication in Blender : 2011-11-11
-# Last modified : 2012-10-13
+# Last modified : 2012-10-14
#
# Acknowledgements: Thanks to ideasman, meta_androcto, truman, kilon,
# dairin0d, PKHG, Valter, etc
Modified: trunk/py/scripts/addons/io_mesh_pdb/export_pdb.py
===================================================================
--- trunk/py/scripts/addons/io_mesh_pdb/export_pdb.py 2012-10-13 20:45:24 UTC (rev 3852)
+++ trunk/py/scripts/addons/io_mesh_pdb/export_pdb.py 2012-10-14 07:56:01 UTC (rev 3853)
@@ -74,14 +74,16 @@
if len(obj.children) != 0:
for vertex in obj.data.vertices:
+ location = obj.matrix_world*vertex.co
list_atoms.append(CLASS_atom_pdb_atoms_export(
name,
- obj.location+vertex.co))
+ location))
else:
if not obj.parent:
+ location = obj.location
list_atoms.append(CLASS_atom_pdb_atoms_export(
name,
- obj.location))
+ location))
pdb_file_p = open(ATOM_PDB_FILEPATH, "w")
pdb_file_p.write(ATOM_PDB_PDBTEXT)
More information about the Bf-extensions-cvs
mailing list