[Bf-extensions-cvs] [29f539c8] master: Fix: (a) matrix @ vector product, (b) exclude sticks condition

Clemens Barth noreply at git.blender.org
Sun Mar 17 20:20:19 CET 2019


Commit: 29f539c8619bdfc45aafa6c47e76febda83cd53a
Author: Clemens Barth
Date:   Sun Mar 17 20:19:22 2019 +0100
Branches: master
https://developer.blender.org/rBA29f539c8619bdfc45aafa6c47e76febda83cd53a

Fix: (a) matrix @ vector product, (b) exclude sticks condition

===================================================================

M	io_mesh_pdb/export_pdb.py

===================================================================

diff --git a/io_mesh_pdb/export_pdb.py b/io_mesh_pdb/export_pdb.py
index ff038868..1f765352 100644
--- a/io_mesh_pdb/export_pdb.py
+++ b/io_mesh_pdb/export_pdb.py
@@ -30,9 +30,10 @@ class AtomPropExport(object):
 def export_pdb(obj_type, filepath_pdb):
 
     list_atoms = []
+    i = 0
     for obj in bpy.context.selected_objects:
 
-        if "Stick" in obj.name:
+        if "STICK" in obj.name.upper():
             continue
 
         if obj.type not in {'MESH', 'SURFACE', 'META'}:
@@ -54,18 +55,19 @@ def export_pdb(obj_type, filepath_pdb):
 
         if len(obj.children) != 0:
             for vertex in obj.data.vertices:
-                location = obj.matrix_world*vertex.co
+                location = obj.matrix_world @ vertex.co
                 list_atoms.append(AtomPropExport(name, location))
         else:
             if not obj.parent:
                 location = obj.location
                 list_atoms.append(AtomPropExport(name, location))
 
+        i = i+1
+
     pdb_file_p = open(filepath_pdb, "w")
     pdb_file_p.write("REMARK This pdb file has been created with Blender "
                      "and the addon Atomic Blender - PDB\n"
-                     "REMARK For more details see wiki.blender.org/index.php/"
-                     "Extensions:2.6/Py/Scripts/Import-Export/PDB\n"
+                     "REMARK For more details see the wiki pages of Blender.\n"
                      "REMARK\n"
                      "REMARK\n")



More information about the Bf-extensions-cvs mailing list