Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-15 18:55:28 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-15 19:05:28 +0300
commit8c37a7fe4a81e89c2400d4264b7fea8e89b56638 (patch)
tree6a21e76f5821b1f1f734f294c6a875211c48a159 /io_mesh_atomic
parent467303ba70d6f406a1942321f1962d2ce2491928 (diff)
Update for object add align property changes
Diffstat (limited to 'io_mesh_atomic')
-rw-r--r--io_mesh_atomic/pdb_import.py12
-rw-r--r--io_mesh_atomic/utility_panel.py36
-rw-r--r--io_mesh_atomic/xyz_import.py8
3 files changed, 28 insertions, 28 deletions
diff --git a/io_mesh_atomic/pdb_import.py b/io_mesh_atomic/pdb_import.py
index 7d719cd8..815c9bc2 100644
--- a/io_mesh_atomic/pdb_import.py
+++ b/io_mesh_atomic/pdb_import.py
@@ -694,24 +694,24 @@ def draw_atoms_one_type(draw_all_atoms_type,
# Now, build a representative sphere (atom).
if atom[0] == "Vacancy":
bpy.ops.mesh.primitive_cube_add(
- view_align=False, enter_editmode=False,
+ align='WORLD', enter_editmode=False,
location=(0.0, 0.0, 0.0),
rotation=(0.0, 0.0, 0.0))
else:
# NURBS balls
if Ball_type == "0":
bpy.ops.surface.primitive_nurbs_surface_sphere_add(
- view_align=False, enter_editmode=False,
+ align='WORLD', enter_editmode=False,
location=(0,0,0), rotation=(0.0, 0.0, 0.0))
# UV balls
elif Ball_type == "1":
bpy.ops.mesh.primitive_uv_sphere_add(
segments=Ball_azimuth, ring_count=Ball_zenith,
- view_align=False, enter_editmode=False,
+ align='WORLD', enter_editmode=False,
location=(0,0,0), rotation=(0, 0, 0))
# Meta balls
elif Ball_type == "2":
- bpy.ops.object.metaball_add(type='BALL', view_align=False,
+ bpy.ops.object.metaball_add(type='BALL', align='WORLD',
enter_editmode=False, location=(0, 0, 0),
rotation=(0, 0, 0))
@@ -1141,7 +1141,7 @@ def draw_sticks_normal(all_atoms,
radius=Stick_diameter,
depth=v.length,
end_fill_type='NGON',
- view_align=False,
+ align='WORLD',
enter_editmode=False,
location=location,
rotation=(0, 0, 0))
@@ -1211,7 +1211,7 @@ def draw_sticks_normal(all_atoms,
else:
# Here we use an empty ...
bpy.ops.object.empty_add(type='ARROWS',
- view_align=False,
+ align='WORLD',
location=(0, 0, 0),
rotation=(0, 0, 0))
sticks_empty = bpy.context.view_layer.objects.active
diff --git a/io_mesh_atomic/utility_panel.py b/io_mesh_atomic/utility_panel.py
index 98dbdba5..776786c8 100644
--- a/io_mesh_atomic/utility_panel.py
+++ b/io_mesh_atomic/utility_panel.py
@@ -534,25 +534,25 @@ def draw_obj(atom_shape, atom, new_material):
segments=32,
ring_count=32,
radius=1,
- view_align=False,
+ align='WORLD',
enter_editmode=False,
location=atom.location,
rotation=(0, 0, 0))
if atom_shape == '1b': #Sphere NURBS
bpy.ops.surface.primitive_nurbs_surface_sphere_add(
- view_align=False,
+ align='WORLD',
enter_editmode=False,
location=atom.location,
rotation=(0.0, 0.0, 0.0))
if atom_shape == '2': #Cube
bpy.ops.mesh.primitive_cube_add(
- view_align=False,
+ align='WORLD',
enter_editmode=False,
location=atom.location,
rotation=(0.0, 0.0, 0.0))
if atom_shape == '3': #Plane
bpy.ops.mesh.primitive_plane_add(
- view_align=False,
+ align='WORLD',
enter_editmode=False,
location=atom.location,
rotation=(0.0, 0.0, 0.0))
@@ -561,13 +561,13 @@ def draw_obj(atom_shape, atom, new_material):
vertices=32,
radius=1,
fill_type='NOTHING',
- view_align=False,
+ align='WORLD',
enter_editmode=False,
location=atom.location,
rotation=(0, 0, 0))
if atom_shape == '4b': #Circle NURBS
bpy.ops.surface.primitive_nurbs_surface_circle_add(
- view_align=False,
+ align='WORLD',
enter_editmode=False,
location=atom.location,
rotation=(0, 0, 0))
@@ -576,7 +576,7 @@ def draw_obj(atom_shape, atom, new_material):
bpy.ops.mesh.primitive_ico_sphere_add(
subdivisions=int(index[atom_shape]),
radius=1,
- view_align=False,
+ align='WORLD',
enter_editmode=False,
location=atom.location,
rotation=(0, 0, 0))
@@ -586,13 +586,13 @@ def draw_obj(atom_shape, atom, new_material):
radius=1,
depth=2,
end_fill_type='NGON',
- view_align=False,
+ align='WORLD',
enter_editmode=False,
location=atom.location,
rotation=(0, 0, 0))
if atom_shape == '6b': #Cylinder NURBS
bpy.ops.surface.primitive_nurbs_surface_cylinder_add(
- view_align=False,
+ align='WORLD',
enter_editmode=False,
location=atom.location,
rotation=(0, 0, 0))
@@ -603,7 +603,7 @@ def draw_obj(atom_shape, atom, new_material):
radius2=0,
depth=2,
end_fill_type='NGON',
- view_align=False,
+ align='WORLD',
enter_editmode=False,
location=atom.location,
rotation=(0, 0, 0))
@@ -611,7 +611,7 @@ def draw_obj(atom_shape, atom, new_material):
bpy.ops.mesh.primitive_torus_add(
rotation=(0, 0, 0),
location=atom.location,
- view_align=False,
+ align='WORLD',
major_radius=1,
minor_radius=0.25,
major_segments=48,
@@ -620,7 +620,7 @@ def draw_obj(atom_shape, atom, new_material):
abso_minor_rad=0.5)
if atom_shape == '8b': #Torus NURBS
bpy.ops.surface.primitive_nurbs_surface_torus_add(
- view_align=False,
+ align='WORLD',
enter_editmode=False,
location=atom.location,
rotation=(0, 0, 0))
@@ -699,7 +699,7 @@ def draw_obj_special(atom_shape, atom):
# F2+ center
if atom_shape == '1':
# Create first a cube
- bpy.ops.mesh.primitive_cube_add(view_align=False,
+ bpy.ops.mesh.primitive_cube_add(align='WORLD',
enter_editmode=False,
location=atom.location,
rotation=(0.0, 0.0, 0.0))
@@ -763,7 +763,7 @@ def draw_obj_special(atom_shape, atom):
# F+ center
if atom_shape == '2':
# Create first a cube
- bpy.ops.mesh.primitive_cube_add(view_align=False,
+ bpy.ops.mesh.primitive_cube_add(align='WORLD',
enter_editmode=False,
location=atom.location,
rotation=(0.0, 0.0, 0.0))
@@ -790,7 +790,7 @@ def draw_obj_special(atom_shape, atom):
# Create now an electron
scale = atom.scale / 10.0
bpy.ops.surface.primitive_nurbs_surface_sphere_add(
- view_align=False,
+ align='WORLD',
enter_editmode=False,
location=(0.0, 0.0, 0.0),
rotation=(0.0, 0.0, 0.0))
@@ -850,7 +850,7 @@ def draw_obj_special(atom_shape, atom):
# F0 center
if atom_shape == '3':
# Create first a cube
- bpy.ops.mesh.primitive_cube_add(view_align=False,
+ bpy.ops.mesh.primitive_cube_add(align='WORLD',
enter_editmode=False,
location=atom.location,
rotation=(0.0, 0.0, 0.0))
@@ -877,7 +877,7 @@ def draw_obj_special(atom_shape, atom):
# Create now two electrons
scale = atom.scale / 10.0
bpy.ops.surface.primitive_nurbs_surface_sphere_add(
- view_align=False,
+ align='WORLD',
enter_editmode=False,
location=(scale[0]*1.5,0.0,0.0),
rotation=(0.0, 0.0, 0.0))
@@ -886,7 +886,7 @@ def draw_obj_special(atom_shape, atom):
electron1.name = atom.name + "_F0_electron1"
electron1.parent = cube
bpy.ops.surface.primitive_nurbs_surface_sphere_add(
- view_align=False,
+ align='WORLD',
enter_editmode=False,
location=(-scale[0]*1.5,0.0,0.0),
rotation=(0.0, 0.0, 0.0))
diff --git a/io_mesh_atomic/xyz_import.py b/io_mesh_atomic/xyz_import.py
index 8f6b4c5b..0daa07e7 100644
--- a/io_mesh_atomic/xyz_import.py
+++ b/io_mesh_atomic/xyz_import.py
@@ -666,24 +666,24 @@ def import_xyz(Ball_type,
# Now, build a representative sphere (atom)
if atom.name == "Vacancy":
bpy.ops.mesh.primitive_cube_add(
- view_align=False, enter_editmode=False,
+ align='WORLD', enter_editmode=False,
location=(0.0, 0.0, 0.0),
rotation=(0.0, 0.0, 0.0))
else:
# NURBS balls
if Ball_type == "0":
bpy.ops.surface.primitive_nurbs_surface_sphere_add(
- view_align=False, enter_editmode=False,
+ align='WORLD', enter_editmode=False,
location=(0,0,0), rotation=(0.0, 0.0, 0.0))
# UV balls
elif Ball_type == "1":
bpy.ops.mesh.primitive_uv_sphere_add(
segments=Ball_azimuth, ring_count=Ball_zenith,
- view_align=False, enter_editmode=False,
+ align='WORLD', enter_editmode=False,
location=(0,0,0), rotation=(0, 0, 0))
# Meta balls
elif Ball_type == "2":
- bpy.ops.object.metaball_add(type='BALL', view_align=False,
+ bpy.ops.object.metaball_add(type='BALL', align='WORLD',
enter_editmode=False, location=(0, 0, 0),
rotation=(0, 0, 0))