[af25a75a] master: Merging with âAtomic Blender PDB/XYZâ importer. T62804
Clemens Barth
noreply at git.blender.org
Thu Mar 28 10:10:24 CET 2019
Commit: af25a75afe841149c7a2ef910ccb55fa39c48518
Author: Clemens Barth
Date: Thu Mar 28 10:09:45 2019 +0100
Branches: master
https://developer.blender.org/rBACaf25a75afe841149c7a2ef910ccb55fa39c48518
Merging with ‘Atomic Blender PDB/XYZ’ importer. T62804
Comments
========
The two (old) XYZ addons were deleted because of the fusion of the 3 atomic blender addons from Blender 2.79:
1. PDB (I/O addon for .pdb files, was in trunk before)
2. XYZ (I/O addon for .xyz files, was in contrib before)
3. Utilities (panel for modifying atomic structures, was in contrib before),
into one single addon called ‘Atomic Blender PDB/XYZ’.
===================================================================
D io_atomblend_utilities/__init__.py
D io_atomblend_utilities/io_atomblend_utilities.py
D io_mesh_xyz/__init__.py
D io_mesh_xyz/atom_info.dat
D io_mesh_xyz/export_xyz.py
D io_mesh_xyz/import_xyz.py
===================================================================
diff --git a/io_atomblend_utilities/__init__.py b/io_atomblend_utilities/__init__.py
deleted file mode 100644
index 6ef8d34d..00000000
--- a/io_atomblend_utilities/__init__.py
+++ /dev/null
@@ -1,478 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-#
-#
-# Authors : Clemens Barth (Blendphys at root-1.de), ...
-#
-# Homepage(Wiki) : http://development.root-1.de/Atomic_Blender.php
-#
-# Start of project : 2011-12-01 by Clemens Barth
-# First publication in Blender : 2012-11-03
-# Last modified : 2019-03-16
-#
-# Acknowledgements
-# ================
-#
-# Blender developers
-# ------------------
-# Campbell Barton (ideasman)
-# Brendon Murphy (meta_androcto)
-# Truman Melton (?) (truman)
-# Kilon Alios (kilon)
-# ?? (CoDEmanX)
-# Dima Glib (dairin0d)
-# Peter K.H. Gragert (PKHG)
-# Valter Battioli (?) (valter)
-#
-# Other
-# -----
-# Frank Palmino
-#
-#
-
-bl_info = {
- "name": "Atomic Blender - Utilities",
- "description": "Utilities for manipulating atom structures",
- "author": "Clemens Barth",
- "version": (0, 95),
- "blender": (2, 80, 0),
- "location": "Panel: View 3D - Tools",
- "warning": "",
- "wiki_url": "... will be updated asap ...",
- "category": "Import-Export"}
-
-
-import bpy
-from bpy.types import Operator, Panel
-from bpy.props import (StringProperty,
- EnumProperty,
- FloatProperty,
- BoolProperty)
-
-from . import io_atomblend_utilities
-
-# -----------------------------------------------------------------------------
-# GUI
-
-# The panel.
-class PANEL_PT_prepare(Panel):
- bl_label = "Atomic Blender Utilities"
- bl_space_type = "VIEW_3D"
- bl_region_type = "UI"
-
- def draw(self, context):
- layout = self.layout
- scn = context.scene.atom_blend
-
- box = layout.box()
- col = box.column(align=True)
- col.label(text="Custom data file")
- col.prop(scn, "datafile")
- col.operator("atom_blend.datafile_apply")
-
- box = layout.box()
- col = box.column(align=True)
- col.label(text="Measure distances")
- col.operator("atom_blend.button_distance")
- col.prop(scn, "distance")
-
- # This is from Blender 2.79 and does not work in 2.80. However, it
- # might be useful later on if changed.
- #
- #box = layout.box()
- #col = box.column(align=True)
- #col.label(text="All changes concern:")
- #col.prop(scn, "action_type")
-
- box = layout.box()
- col = box.column(align=True)
- col.label(text="Change atom size")
- col.label(text="1. Type of radii")
- col.prop(scn, "radius_type")
- col2 = col.column()
- col2.active = (scn.radius_type == '3')
- col2.prop(scn, "radius_type_ionic")
- col = box.column(align=True)
- col.label(text="2. Radii in pm")
- col.prop(scn, "radius_pm_name")
- col.prop(scn, "radius_pm")
- col = box.column(align=True)
- col.label(text="3. Radii by scale")
- col.prop(scn, "radius_all")
- row = col.row()
- row.operator("atom_blend.radius_all_smaller")
- row.operator("atom_blend.radius_all_bigger")
-
- box = layout.box()
- col = box.column(align=True)
- col.label(text="Change stick size")
- col.prop(scn, "sticks_all")
- row = col.row()
- row.operator("atom_blend.sticks_all_smaller")
- row.operator("atom_blend.sticks_all_bigger")
-
- box = layout.box()
- col = box.column(align=True)
- col.label(text="Change atom shape")
- col2 = col.column()
- col2.active = (scn.replace_objs_special == '0')
- col2.prop(scn, "replace_objs")
- col2.prop(scn, "replace_objs_material")
- col.prop(scn, "replace_objs_special")
- col.operator("atom_blend.replace_atom")
- col.label(text="Default values")
- col.operator("atom_blend.default_atoms")
-
- box = layout.box()
- col = box.column(align=True)
- col.label(text="Separate atoms")
- col3 = col.column()
- col3.active = (bpy.context.mode == 'EDIT_MESH')
- col3.operator("atom_blend.separate_atom")
-
-
-# The properties of buttons etc. in the panel.
-class PanelProperties(bpy.types.PropertyGroup):
-
- def Callback_radius_type(self, context):
- scn = bpy.context.scene.atom_blend
- io_atomblend_utilities.choose_objects("ATOM_RADIUS_TYPE",
- scn.action_type,
- None,
- None,
- scn.radius_type,
- scn.radius_type_ionic,
- None)
- def Callback_radius_pm(self, context):
- scn = bpy.context.scene.atom_blend
- io_atomblend_utilities.choose_objects("ATOM_RADIUS_PM",
- scn.action_type,
- None,
- [scn.radius_pm_name,
- scn.radius_pm],
- None,
- None,
- None)
-
- datafile: StringProperty(
- name = "", description="Path to your custom data file",
- maxlen = 256, default = "", subtype='FILE_PATH')
- XYZ_file: StringProperty(
- name = "Path to file", default="",
- description = "Path of the XYZ file")
- number_atoms: StringProperty(name="",
- default="Number", description = "This output shows "
- "the number of atoms which have been loaded")
- distance: StringProperty(
- name="", default="Distance (A)",
- description="Distance of 2 objects in Angstrom")
- replace_objs: EnumProperty(
- name="Shape",
- description="Choose a different atom shape.",
- items=(('0',"Unchanged", "Do not change the shape"),
- ('1a',"Sphere (Mesh)", "Replace with a sphere (Mesh)"),
- ('1b',"Sphere (NURBS)", "Replace with a sphere (NURBS)"),
- ('2',"Cube", "Replace with a cube"),
- ('3',"Plane", "Replace with a plane"),
- ('4a',"Circle (Mesh)", "Replace with a circle (Mesh)"),
- ('4b',"Circle (NURBS)", "Replace with a circle (NURBS)"),
- ('5a',"Icosphere 1", "Replace with a icosphere, subd=1"),
- ('5b',"Icosphere 2", "Replace with a icosphere, subd=2"),
- ('5c',"Icosphere 3", "Replace with a icosphere, subd=3"),
- ('5d',"Icosphere 4", "Replace with a icosphere, subd=4"),
- ('5e',"Icosphere 5", "Replace with a icosphere, subd=5"),
- ('6a',"Cylinder (Mesh)", "Replace with a cylinder (Mesh)"),
- ('6b',"Cylinder (NURBS)", "Replace with a cylinder (NURBS)"),
- ('7',"Cone", "Replace with a cone"),
- ('8a',"Torus (Mesh)", "Replace with a torus (Mesh)"),
- ('8b',"Torus (NURBS)", "Replace with a torus (NURBS)")),
- default='0',)
- replace_objs_material: EnumProperty(
- name="Material",
- description="Choose a different material.",
- items=(('0',"Unchanged", "Leave the material unchanged"),
- ('1',"Normal", "Use normal material (no transparency and reflection)"),
- ('2',"Transparent", "Use transparent material"),
- ('3',"Reflecting", "Use reflecting material"),
- ('4',"Transparent + reflecting", "Use transparent and reflecting material")),
- default='0',)
- replace_objs_special: EnumProperty(
- name="Special",
- description="Choose a special atom shape.",
- items=(('0',"None", "Use no special shape."),
- ('1',"F2+ center", "Replace with a F2+ center"),
- ('2',"F+ center", "Replace with a F+ center"),
- ('3',"F0 center", "Replace with a F0 center")),
- default='0',)
- action_type: EnumProperty(
- name="",
- description="Which objects shall be modified?",
- items=(('ALL_ACTIVE',"all active objects", "in the current layer"),
- ('ALL_IN_LAYER',"all in all selected layers",
- "in selected layer(s)")),
- default='ALL_ACTIVE',)
- radius_type: EnumProperty(
- name="Type",
- description="Which type of atom radii?",
- items=(('0',"predefined", "Use pre-defined radii"),
- ('1',"atomic", "Use atomic radii"),
- ('2',"van der Waals","Use van der Waals radii"),
- ('3',"ionic radii", "Use ionic radii")),
- default='0',update=Callback_radius_type)
- radius_type_ionic: EnumProperty(
- name="Charge",
- description="Charge state of the ions if existing.",
- items=(('0',"-4", "Charge state -4"),
- ('1',"-3", "Charge state -3"),
- ('2',"-2", "Charge state -2"),
- ('3',"-1", "Charge state -1"),
-
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list