[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3921] contrib/py/scripts/addons/ io_mesh_xyz: Some slight changes for the Atomic Blender xyz import/ export addon.

Clemens Barth barth at root-1.de
Sat Nov 3 20:27:14 CET 2012


Revision: 3921
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3921
Author:   blendphys
Date:     2012-11-03 19:27:11 +0000 (Sat, 03 Nov 2012)
Log Message:
-----------
Some slight changes for the Atomic Blender xyz import/export addon. Note that 
the panel has been removed in the last commit. 

Blendphys

Modified Paths:
--------------
    contrib/py/scripts/addons/io_mesh_xyz/__init__.py
    contrib/py/scripts/addons/io_mesh_xyz/import_xyz.py

Modified: contrib/py/scripts/addons/io_mesh_xyz/__init__.py
===================================================================
--- contrib/py/scripts/addons/io_mesh_xyz/__init__.py	2012-11-03 18:59:46 UTC (rev 3920)
+++ contrib/py/scripts/addons/io_mesh_xyz/__init__.py	2012-11-03 19:27:11 UTC (rev 3921)
@@ -21,23 +21,26 @@
 #  Authors           : Clemens Barth (Blendphys at root-1.de), ...
 #
 #  Homepage(Wiki)    : http://development.root-1.de/Atomic_Blender.php
-#  Tracker           : http://projects.blender.org/tracker/index.php?func=detail&aid=29646&group_id=153&atid=468
 #
 #  Start of project              : 2011-12-01 by Clemens Barth
 #  First publication in Blender  : 2011-12-18
-#  Last modified                 : 2012-10-30
+#  Last modified                 : 2012-11-03
 #
-#  Acknowledgements: Thanks to ideasman, meta_androcto, truman, kilon,
-#  dairin0d, PKHG, Valter, etc
+#  Acknowledgements 
+#  ================
 #
+#  Blender: ideasman, meta_androcto, truman, kilon, CoDEmanX, dairin0d, PKHG, 
+#           Valter, ...
+#  Other: Frank Palmino
+#
 
 bl_info = {
-    "name": "XYZ Atomic Blender",
-    "description": "Loading and manipulating atoms from XYZ files",
+    "name": "Atomic Blender - XYZ",
+    "description": "Import/export of atoms described in .xyz files",
     "author": "Clemens Barth",
-    "version": (0,7),
+    "version": (1,0),
     "blender": (2,6),
-    "location": "File -> Import -> XYZ (.xyz), Panel: View 3D - Tools",
+    "location": "File -> Import -> XYZ (.xyz)",
     "warning": "",
     "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/"
                 "Import-Export/XYZ",
@@ -61,12 +64,10 @@
 from . import import_xyz
 from . import export_xyz
 
-
 # -----------------------------------------------------------------------------
 #                                                                           GUI
 
 
-
 # This is the class for the file dialog.
 class CLASS_ImportXYZ(Operator, ImportHelper):
     bl_idname = "import_mesh.xyz"
@@ -76,13 +77,6 @@
     filename_ext = ".xyz"
     filter_glob  = StringProperty(default="*.xyz", options={'HIDDEN'},)
 
-    bpy.types.Scene.use_panel = EnumProperty(
-        name="Panel",
-        description="Choose whether the panel shall appear or not in the View 3D.",
-        items=(('0', "Once", "The panel appears only in this session"),
-               ('1', "Always", "The panel always appears when Blender is started"),
-               ('2', "Never", "The panel never appears")),
-               default='0') 
     use_camera = BoolProperty(
         name="Camera", default=False,
         description="Do you need a camera?")
@@ -130,7 +124,6 @@
         name="", default=1, min=1,
         description="Choose the number of images between 2 keys.")
 
-
     def draw(self, context):
         layout = self.layout
         row = layout.row()
@@ -170,7 +163,6 @@
         col = row.column()
         col.prop(self, "images_per_key")            
         
-
     def execute(self, context):
 
         import_xyz.ALL_FRAMES[:] = []

Modified: contrib/py/scripts/addons/io_mesh_xyz/import_xyz.py
===================================================================
--- contrib/py/scripts/addons/io_mesh_xyz/import_xyz.py	2012-11-03 18:59:46 UTC (rev 3920)
+++ contrib/py/scripts/addons/io_mesh_xyz/import_xyz.py	2012-11-03 19:27:11 UTC (rev 3921)
@@ -23,11 +23,6 @@
 from math import pi, cos, sin
 from mathutils import Vector, Matrix
 
-# This variable contains the path of the XYZ file.
-# It is used almost everywhere, which explains why it
-# should stay global. First, it is empty and gets 'filled' directly
-# after having chosen the XYZ file (see 'class LoadXYZ' further below).
-
 # -----------------------------------------------------------------------------
 #                                                  Atom and element data
 
@@ -191,8 +186,11 @@
         self.radius = radius
         self.color = color
         self.material = material
-        
 
+
+# -----------------------------------------------------------------------------
+#                                                           Some basic routines        
+
 def DEF_atom_xyz_read_elements():
 
     ATOM_XYZ_ELEMENTS[:] = []
@@ -210,6 +208,10 @@
         ATOM_XYZ_ELEMENTS.append(li)
 
 
+# filepath_pdb: path to pdb file
+# radiustype  : '0' default
+#               '1' atomic radii
+#               '2' van der Waals
 def DEF_atom_xyz_read_xyz_file(filepath_xyz,radiustype):
 
     number_frames = 0



More information about the Bf-extensions-cvs mailing list