[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3048] trunk/py/scripts/addons/ io_mesh_pdb:
Clemens Barth
barth at root-1.de
Thu Mar 1 19:47:56 CET 2012
Revision: 3048
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3048
Author: blendphys
Date: 2012-03-01 18:47:55 +0000 (Thu, 01 Mar 2012)
Log Message:
-----------
Importer
========
The length of the 'unit stick' of the dupliface structure that is used for
representing the sticks can now be explicitly chosen before loading a PDB
structure.
It was always on 0.05 Angstrom, which is a quite small value. Loading
structures with lots of sticks was therefore very slow. The value can now be
changed [from 0 to infinity]. I have set the default value onto 0.2 Angstrom,
which should be sufficient.
Note: The smaller the value, the better is the length precision. However, the
more single units need to be drawn (more vertices).
By time, I will change the wiki ... in some days.
Blendphys
Modified Paths:
--------------
trunk/py/scripts/addons/io_mesh_pdb/__init__.py
trunk/py/scripts/addons/io_mesh_pdb/import_pdb.py
Modified: trunk/py/scripts/addons/io_mesh_pdb/__init__.py
===================================================================
--- trunk/py/scripts/addons/io_mesh_pdb/__init__.py 2012-02-29 15:40:29 UTC (rev 3047)
+++ trunk/py/scripts/addons/io_mesh_pdb/__init__.py 2012-03-01 18:47:55 UTC (rev 3048)
@@ -113,6 +113,7 @@
col = row.column(align=True)
col.prop(scn, "atom_pdb_sticks_sectors")
col.prop(scn, "atom_pdb_sticks_radius")
+ col.prop(scn, "atom_pdb_sticks_unit_length")
col = row.column(align=True)
col.prop(scn, "use_atom_pdb_sticks_color")
col.prop(scn, "use_atom_pdb_sticks_smooth")
@@ -229,6 +230,9 @@
scn.atom_pdb_sticks_radius = FloatProperty(
name = "Radius", default=0.1, min=0.0,
description ="Radius of a stick")
+ scn.atom_pdb_sticks_unit_length = FloatProperty(
+ name = "Unit", default=0.2, min=0,
+ description = "Length of the unit of a stick in Angstrom")
scn.use_atom_pdb_sticks_color = BoolProperty(
name="Color", default=True,
description="The sticks appear in the color of the atoms")
@@ -499,6 +503,7 @@
sradius = scn.atom_pdb_sticks_radius
stick_bond = scn.use_atom_pdb_sticks_bonds
stick_dist = scn.atom_pdb_sticks_dist
+ stick_unit = scn.atom_pdb_sticks_unit_length
cam = scn.use_atom_pdb_cam
lamp = scn.use_atom_pdb_lamp
@@ -508,7 +513,7 @@
# Execute main routine an other time ... from the panel
atom_number = import_pdb.DEF_atom_pdb_main(
mesh, azimuth, zenith, bradius, radiustype, bdistance,
- sticks, sticks_col, sticks_sm, stick_bond,
+ sticks, sticks_col, sticks_sm, stick_bond, stick_unit,
stick_dist, ssector, sradius, center, cam, lamp, datafile)
scn.atom_pdb_number_atoms = str(atom_number) + " atoms"
@@ -549,9 +554,10 @@
col.prop(scn, "use_atom_pdb_sticks")
row = layout.row()
row.active = scn.use_atom_pdb_sticks
- col = row.column(align=True)
+ col = row.column()
col.prop(scn, "atom_pdb_sticks_sectors")
col.prop(scn, "atom_pdb_sticks_radius")
+ col.prop(scn, "atom_pdb_sticks_unit_length")
col = row.column(align=True)
col.prop(scn, "use_atom_pdb_sticks_color")
col.prop(scn, "use_atom_pdb_sticks_smooth")
@@ -590,6 +596,7 @@
sradius = scn.atom_pdb_sticks_radius
stick_bond = scn.use_atom_pdb_sticks_bonds
stick_dist = scn.atom_pdb_sticks_dist
+ stick_unit = scn.atom_pdb_sticks_unit_length
cam = scn.use_atom_pdb_cam
lamp = scn.use_atom_pdb_lamp
@@ -599,7 +606,7 @@
# Execute main routine
atom_number = import_pdb.DEF_atom_pdb_main(
mesh, azimuth, zenith, bradius, radiustype, bdistance,
- sticks, sticks_col, sticks_sm, stick_bond,
+ sticks, sticks_col, sticks_sm, stick_bond, stick_unit,
stick_dist, ssector, sradius, center, cam, lamp, datafile)
scn.atom_pdb_number_atoms = str(atom_number) + " atoms"
Modified: trunk/py/scripts/addons/io_mesh_pdb/import_pdb.py
===================================================================
--- trunk/py/scripts/addons/io_mesh_pdb/import_pdb.py 2012-02-29 15:40:29 UTC (rev 3047)
+++ trunk/py/scripts/addons/io_mesh_pdb/import_pdb.py 2012-03-01 18:47:55 UTC (rev 3048)
@@ -567,7 +567,7 @@
def DEF_atom_pdb_main(use_mesh,Ball_azimuth,Ball_zenith,
Ball_radius_factor,radiustype,Ball_distance_factor,
use_sticks,use_sticks_color,use_sticks_smooth,
- use_sticks_bonds,Stick_dist,
+ use_sticks_bonds, Stick_unit, Stick_dist,
Stick_sectors,Stick_diameter,put_to_center,
use_camera,use_lamp,path_datafile):
@@ -1186,7 +1186,7 @@
if use_sticks == True and all_sticks != []:
- dl = 0.05
+ dl = Stick_unit
if use_sticks_color == False:
bpy.ops.object.material_slot_add()
More information about the Bf-extensions-cvs
mailing list