diff options
author | Clemens Barth <barth@root-1.de> | 2012-11-10 20:36:31 +0400 |
---|---|---|
committer | Clemens Barth <barth@root-1.de> | 2012-11-10 20:36:31 +0400 |
commit | 0b4e923d8baeb7a6bab326e3dfe8fcb7a45ae7b0 (patch) | |
tree | 01225c0a88da7f34eb30e9bdf6c842889cfcf288 /io_mesh_pdb/__init__.py | |
parent | cdab4a56cb35f2bf5bd41942e82edcc3dc9bb744 (diff) |
1. New: NURBS, mesh and meta balls can now be chosen as atoms.
I also updated the Wiki page.
2. There was a small mistake introduced by the last commits. This has been
fixed.
3. Code cleaning
Blendphys
Diffstat (limited to 'io_mesh_pdb/__init__.py')
-rw-r--r-- | io_mesh_pdb/__init__.py | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/io_mesh_pdb/__init__.py b/io_mesh_pdb/__init__.py index 62c7ca67..15d66426 100644 --- a/io_mesh_pdb/__init__.py +++ b/io_mesh_pdb/__init__.py @@ -50,7 +50,7 @@ bl_info = { } import bpy -from bpy.types import Operator, Panel +from bpy.types import Operator from bpy_extras.io_utils import ImportHelper, ExportHelper from bpy.props import (StringProperty, BoolProperty, @@ -79,9 +79,13 @@ class ImportPDB(Operator, ImportHelper): use_lamp = BoolProperty( name="Lamp", default=False, description = "Do you need a lamp?") - use_mesh = BoolProperty( - name = "Mesh balls", default=False, - description = "Use mesh balls instead of NURBS") + ball = EnumProperty( + name="Type of ball", + description="Choose ball", + items=(('0', "NURBS", "NURBS balls"), + ('1', "Mesh" , "Mesh balls"), + ('2', "Meta" , "Metaballs")), + default='0',) mesh_azimuth = IntProperty( name = "Azimuth", default=32, min=1, description = "Number of sectors (azimuth)") @@ -139,9 +143,10 @@ class ImportPDB(Operator, ImportHelper): row.prop(self, "use_lamp") row = layout.row() col = row.column() - col.prop(self, "use_mesh") - col = row.column(align=True) - col.active = self.use_mesh + col.prop(self, "ball") + row = layout.row() + row.active = (self.ball == "1") + col = row.column(align=True) col.prop(self, "mesh_azimuth") col.prop(self, "mesh_zenith") row = layout.row() @@ -179,8 +184,8 @@ class ImportPDB(Operator, ImportHelper): filepath_pdb = bpy.path.abspath(self.filepath) # Execute main routine - atom_number = import_pdb.import_pdb( - self.use_mesh, + import_pdb.import_pdb( + self.ball, self.mesh_azimuth, self.mesh_zenith, self.scale_ballradius, |