Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClemens Barth <barth@root-1.de>2012-10-14 11:56:01 +0400
committerClemens Barth <barth@root-1.de>2012-10-14 11:56:01 +0400
commit08c946b80c30766fc658c1da3116c435e6cab978 (patch)
tree0d47ac2f9d02f51be11c35bd62abed950e05bd57 /io_mesh_pdb
parent0956876fabb41e229f6abac7744935dba16ef825 (diff)
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.
Diffstat (limited to 'io_mesh_pdb')
-rw-r--r--io_mesh_pdb/__init__.py2
-rw-r--r--io_mesh_pdb/export_pdb.py6
2 files changed, 5 insertions, 3 deletions
diff --git a/io_mesh_pdb/__init__.py b/io_mesh_pdb/__init__.py
index 206dd218..580fffa0 100644
--- a/io_mesh_pdb/__init__.py
+++ b/io_mesh_pdb/__init__.py
@@ -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
diff --git a/io_mesh_pdb/export_pdb.py b/io_mesh_pdb/export_pdb.py
index a7a67bf6..e211f19a 100644
--- a/io_mesh_pdb/export_pdb.py
+++ b/io_mesh_pdb/export_pdb.py
@@ -74,14 +74,16 @@ def DEF_atom_pdb_export(obj_type):
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)