From b99dae247e8443668285a375171a48cf9078cb6c Mon Sep 17 00:00:00 2001
From: Clemens Barth <barth@root-1.de>
Date: Thu, 22 Dec 2011 16:06:28 +0000
Subject: [PATCH] Dear all.

1. Changes of the 'Atomic Blender - PDB importer' panel. I've
grouped specific in/outputs and buttons by using boxes. Now,
there is some order in the panel.
2. Better precision for sticks
3. No other changes otherwise ...

Merry Christams,

Blendphys
---
 io_mesh_pdb/__init__.py   | 57 +++++++++++++++++++--------------------
 io_mesh_pdb/import_pdb.py |  4 +--
 2 files changed, 30 insertions(+), 31 deletions(-)

diff --git a/io_mesh_pdb/__init__.py b/io_mesh_pdb/__init__.py
index c08c642ee..7cd3d3e6b 100644
--- a/io_mesh_pdb/__init__.py
+++ b/io_mesh_pdb/__init__.py
@@ -87,75 +87,72 @@ class CLASS_atom_pdb_panel(Panel):
         scn    = bpy.context.scene
 
         row = layout.row()
+        row.label(text="Outputs and custom data file")
+
+        box = layout.box()
+        row = box.row()
         row.label(text="Custom data file")
-        row = layout.row()
+        row = box.row()
         col = row.column()
         col.prop(scn, "atom_pdb_datafile")
         col.operator("atom_pdb.datafile_apply")
-        row = layout.row()
+        row = box.row()
         col = row.column(align=True)
         col.prop(scn, "atom_pdb_PDB_file")
 
-        layout.separator()
-
         row = layout.row()
+        row.label(text="Reload structure")
+
+        box = layout.box()
+        row = box.row()
         col = row.column(align=True)
         col.prop(scn, "use_atom_pdb_mesh")
         col.prop(scn, "atom_pdb_mesh_azimuth")
         col.prop(scn, "atom_pdb_mesh_zenith")
-
-
         col = row.column(align=True)
         col.label(text="Scaling factors")
         col.prop(scn, "atom_pdb_scale_ballradius")
         col.prop(scn, "atom_pdb_scale_distances")
-        row = layout.row()
+        row = box.row()
         col = row.column()
         col.prop(scn, "use_atom_pdb_sticks")
         col = row.column(align=True)
         col.prop(scn, "atom_pdb_sticks_sectors")
         col.prop(scn, "atom_pdb_sticks_radius")
-
-        row = layout.row()
+        row = box.row()
         row.prop(scn, "use_atom_pdb_center")
-
-        row = layout.row()
+        row = box.row()
         col = row.column()
         col.prop(scn, "use_atom_pdb_cam")
         col.prop(scn, "use_atom_pdb_lamp")
         col = row.column()
         col.operator("atom_pdb.button_reload")
-
         # TODO, use lanel() instead
         col.prop(scn, "atom_pdb_number_atoms")
 
-        layout.separator()
-
         row = layout.row()
+        row.label(text="Modify atom radii")
+        box = layout.box()
+        row = box.row()
         row.operator("atom_pdb.button_distance")
         row.prop(scn, "atom_pdb_distance")
-        layout.separator()
-
-        row = layout.row()
+        row = box.row()
         row.label(text="All changes concern:")
-        row = layout.row()
+        row = box.row()
         row.prop(scn, "atom_pdb_radius_how")
-
-        row = layout.row()
+        row = box.row()
         row.label(text="1. Change type of radii")
-        row = layout.row()
+        row = box.row()
         row.prop(scn, "atom_pdb_radius_type")
-
-        row = layout.row()
+        row = box.row()
         row.label(text="2. Change atom radii in pm")
-        row = layout.row()
+        row = box.row()
         row.prop(scn, "atom_pdb_radius_pm_name")
-        row = layout.row()
+        row = box.row()
         row.prop(scn, "atom_pdb_radius_pm")
-
-        row = layout.row()
+        row = box.row()
         row.label(text="3. Change atom radii by scale")
-        row = layout.row()
+        row = box.row()
         col = row.column()
         col.prop(scn, "atom_pdb_radius_all")
         col = row.column(align=True)
@@ -164,8 +161,10 @@ class CLASS_atom_pdb_panel(Panel):
 
         if bpy.context.mode == 'EDIT_MESH':
 
-            layout.separator()
             row = layout.row()
+            row.label(text="Separate atom")
+            box = layout.box()
+            row = box.row()
             row.operator( "atom_pdb.separate_atom" )
 
 
diff --git a/io_mesh_pdb/import_pdb.py b/io_mesh_pdb/import_pdb.py
index 69008142b..b8da50511 100644
--- a/io_mesh_pdb/import_pdb.py
+++ b/io_mesh_pdb/import_pdb.py
@@ -25,7 +25,7 @@
 #
 #  Start of project              : 2011-08-31 by Clemens Barth
 #  First publication in Blender  : 2011-11-11
-#  Last modified                 : 2011-12-01
+#  Last modified                 : 2011-12-22
 #
 #  Acknowledgements: Thanks to ideasman, meta_androcto, truman, kilon,
 #  dairin0d, PKHG, Valter, etc
@@ -1080,7 +1080,7 @@ def DEF_atom_pdb_main(use_mesh,Ball_azimuth,Ball_zenith,
 
         vertices = []
         faces    = []
-        dl = 0.2
+        dl = 0.1
 
         i = 0
         # For all sticks, do ...
-- 
GitLab