[Bf-extensions-cvs] [6128e70e] master: Update for object add align property changes

Brecht Van Lommel noreply at git.blender.org
Wed May 15 18:14:00 CEST 2019


Commit: 6128e70eee4bb716bde34c8aa8d05d22a0e4cac3
Author: Brecht Van Lommel
Date:   Wed May 15 17:55:46 2019 +0200
Branches: master
https://developer.blender.org/rBAC6128e70eee4bb716bde34c8aa8d05d22a0e4cac3

Update for object add align property changes

===================================================================

M	add_advanced_objects_menu/object_add_chain.py
M	add_advanced_objects_menu/rope_alpha.py
M	add_advanced_objects_menu/scene_objects_bi.py
M	add_advanced_objects_menu/scene_objects_cycles.py
M	add_advanced_objects_menu/scene_texture_render.py
M	add_mesh_clusters/__init__.py
M	curve_tools/CurveIntersections.py
M	mesh_ktools.py

===================================================================

diff --git a/add_advanced_objects_menu/object_add_chain.py b/add_advanced_objects_menu/object_add_chain.py
index 86da80f8..f02a1253 100644
--- a/add_advanced_objects_menu/object_add_chain.py
+++ b/add_advanced_objects_menu/object_add_chain.py
@@ -37,7 +37,7 @@ def Add_Chain():
     # Adds Empty to scene
     bpy.ops.object.add(
             type='EMPTY',
-            view_align=False,
+            align='WORLD',
             enter_editmode=False,
             location=(0, 0, 0),
             rotation=(0, 0, 0),
@@ -52,7 +52,7 @@ def Add_Chain():
 
     # Adds Curve Path to scene
     bpy.ops.curve.primitive_nurbs_path_add(
-            view_align=False,
+            align='WORLD',
             enter_editmode=False,
             location=(0, 0, 0),
             rotation=(0, 0, 0),
diff --git a/add_advanced_objects_menu/rope_alpha.py b/add_advanced_objects_menu/rope_alpha.py
index 7c9c5129..4c90ee28 100644
--- a/add_advanced_objects_menu/rope_alpha.py
+++ b/add_advanced_objects_menu/rope_alpha.py
@@ -158,7 +158,7 @@ def obtener_coords_vertex_seleccionados():
 
 def crear_locator(pos):
     bpy.ops.object.empty_add(
-            type='PLAIN_AXES', radius=1, view_align=False,
+            type='PLAIN_AXES', radius=1, align='WORLD',
             location=(pos[0], pos[1], pos[2]),
             layers=(True, False, False, False, False, False, False,
                     False, False, False, False, False, False, False,
@@ -262,7 +262,7 @@ class ClothRope(Operator):
 
         # create an empty that will be the parent of everything
         bpy.ops.object.empty_add(
-                type='SPHERE', radius=1, view_align=False, location=(0, 0, 0),
+                type='SPHERE', radius=1, align='WORLD', location=(0, 0, 0),
                 layers=(True, False, False, False, False, False, False, False,
                         False, False, False, False, False, False, False, False,
                         False, False, False, False)
@@ -275,7 +275,7 @@ class ClothRope(Operator):
 
         # create a plane and delete it
         bpy.ops.mesh.primitive_plane_add(
-                radius=1, view_align=False, enter_editmode=False, location=(0, 0, 0),
+                radius=1, align='WORLD', enter_editmode=False, location=(0, 0, 0),
                 layers=(True, False, False, False, False, False, False, False, False,
                         False, False, False, False, False, False, False, False,
                         False, False, False)
@@ -588,7 +588,7 @@ class BallRope(Operator):
                            obj.type == "EMPTY" and "Constraint" in obj.name]
         # floor:
         bpy.ops.mesh.primitive_cube_add(
-                radius=1, view_align=False, enter_editmode=False, location=(0, 0, 0),
+                radius=1, align='WORLD', enter_editmode=False, location=(0, 0, 0),
                 layers=(True, False, False, False, False, False, False, False, False,
                         False, False, False, False, False, False, False, False,
                         False, False, False)
@@ -613,7 +613,7 @@ class BallRope(Operator):
                 i = i + offset_del_suelo
             separacion = longitud * 2 / segmentos  # distance between linked cubes
             bpy.ops.mesh.primitive_cube_add(
-                    radius=1, view_align=False, enter_editmode=False,
+                    radius=1, align='WORLD', enter_editmode=False,
                     location=(0, 0, i * separacion),
                     layers=(True, False, False, False, False, False, False, False,
                             False, False, False, False, False, False, False, False,
@@ -655,7 +655,7 @@ class BallRope(Operator):
 
         # create a Bezier curve:
         bpy.ops.curve.primitive_bezier_curve_add(
-                radius=1, view_align=False, enter_editmode=False, location=(0, 0, 0),
+                radius=1, align='WORLD', enter_editmode=False, location=(0, 0, 0),
                 layers=(True, False, False, False, False, False, False, False, False,
                 False, False, False, False, False, False, False, False, False, False, False)
                 )
@@ -714,7 +714,7 @@ class BallRope(Operator):
         z = cuboslink[0].scale.z + longitud / 2
         bpy.ops.view3d.snap_cursor_to_selected()
         bpy.ops.mesh.primitive_uv_sphere_add(
-                view_align=False, enter_editmode=False,
+                align='WORLD', enter_editmode=False,
                 layers=(True, False, False, False, False, False, False,
                         False, False, False, False, False, False, False,
                         False, False, False, False, False, False)
diff --git a/add_advanced_objects_menu/scene_objects_bi.py b/add_advanced_objects_menu/scene_objects_bi.py
index 199289dd..f9ef53fb 100644
--- a/add_advanced_objects_menu/scene_objects_bi.py
+++ b/add_advanced_objects_menu/scene_objects_bi.py
@@ -157,7 +157,7 @@ class add_BI_scene(Operator):
 
             # Add plane
             bpy.ops.mesh.primitive_plane_add(
-                            radius=50, view_align=False, enter_editmode=False, location=(0, 0, -1)
+                            radius=50, align='WORLD', enter_editmode=False, location=(0, 0, -1)
                             )
             bpy.ops.object.editmode_toggle()
             bpy.ops.transform.rotate(
diff --git a/add_advanced_objects_menu/scene_objects_cycles.py b/add_advanced_objects_menu/scene_objects_cycles.py
index 7158b02f..7e13ce11 100644
--- a/add_advanced_objects_menu/scene_objects_cycles.py
+++ b/add_advanced_objects_menu/scene_objects_cycles.py
@@ -108,7 +108,7 @@ class add_cycles_scene(Operator):
 
             # Add plane
             bpy.ops.mesh.primitive_plane_add(
-                    radius=50, view_align=False,
+                    radius=50, align='WORLD',
                     enter_editmode=False, location=(0, 0, -1)
                     )
             bpy.ops.object.editmode_toggle()
diff --git a/add_advanced_objects_menu/scene_texture_render.py b/add_advanced_objects_menu/scene_texture_render.py
index 0f9ccc2b..d9b81a0b 100644
--- a/add_advanced_objects_menu/scene_texture_render.py
+++ b/add_advanced_objects_menu/scene_texture_render.py
@@ -39,7 +39,7 @@ class add_texture_scene(Operator):
             # add camera
             bpy.ops.view3d.viewnumpad(type='TOP')
             bpy.ops.object.camera_add(
-                    location=(0, 0, 2.1850), rotation=(0, 0, 0), view_align=True
+                    location=(0, 0, 2.1850), rotation=(0, 0, 0), align='VIEW'
                     )
             cam = bpy.context.active_object.data
             cam.lens = 35
diff --git a/add_mesh_clusters/__init__.py b/add_mesh_clusters/__init__.py
index 980a914d..f1700a07 100644
--- a/add_mesh_clusters/__init__.py
+++ b/add_mesh_clusters/__init__.py
@@ -331,7 +331,7 @@ def DEF_atom_draw_atoms(prop_element,
     coll_atom.objects.link(new_atom_mesh)
 
     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))
 
     ball = bpy.context.view_layer.objects.active
diff --git a/curve_tools/CurveIntersections.py b/curve_tools/CurveIntersections.py
index f9ed7aa2..0c8da2a4 100644
--- a/curve_tools/CurveIntersections.py
+++ b/curve_tools/CurveIntersections.py
@@ -647,7 +647,7 @@ class CurvesIntersector:
             for splineIntersection in intersectionsActive:
                 iPoint = splineIntersection.bezierSegmentIntersectionPoint.intersectionPoint
                 bpy.ops.object.empty_add(type='PLAIN_AXES',
-                                         view_align=False,
+                                         align='WORLD',
                                          location=(iPoint.x, iPoint.y, iPoint.z), rotation=(0, 0, 0))
                 nrActive += 1
 
@@ -655,7 +655,7 @@ class CurvesIntersector:
             for splineIntersection in intersectionsOther:
                 iPoint = splineIntersection.bezierSegmentIntersectionPoint.intersectionPoint
                 bpy.ops.object.empty_add(type='PLAIN_AXES',
-                                         view_align=False,
+                                         align='WORLD',
                                          location=(iPoint.x, iPoint.y, iPoint.z), rotation=(0, 0, 0))
                 nrOther += 1
 
diff --git a/mesh_ktools.py b/mesh_ktools.py
index 9829d8d4..6880b626 100644
--- a/mesh_ktools.py
+++ b/mesh_ktools.py
@@ -143,7 +143,7 @@ class lattice_to_selection(bpy.types.Operator):
                     tmp_obj = bpy.context.object.name
 
                     # create the lattice object with the lattice_loc and rot
-                    bpy.ops.object.add(radius=1, type='LATTICE', view_align=False, enter_editmode=False, location=lattice_loc, rotation=lattice_rot)
+                    bpy.ops.object.add(radius=1, type='LATTICE', align='WORLD', enter_editmode=False, location=lattice_loc, rotation=lattice_rot)
 
                     lattice_obj = bpy.context.object
 
@@ -239,7 +239,7 @@ class lattice_to_selection(bpy.types.Operator):
                     tmp_obj = bpy.context.object.name
 
 
-                    bpy.ops.object.add(radius=1, type='LATTICE', view_align=False, enter_editmode=False, location=lattice_loc, rotation=lattice_rot)
+                    bpy.ops.object.add(radius=1, type='LATTICE', align='WORLD', enter_editmode=False, location=lattice_loc, rotation=lattice_rot)
 
                     lattice_obj = bpy.context.object
 
@@ -955,7 +955,7 @@ class shrinkwrapSmooth(bpy.types.Operator):
 
                 # Create intermediate object
                 bpy.ops.object.mode_set(mode = 'OBJECT', toggle = False)
-                bpy.ops.mesh.primitive_plane_add(radius=1, view_align=False, enter_editmode=False)
+                bpy.ops.mesh.primitive_plane_add(radius=1, align='WORLD', enter_editmode=False)
                 bpy.context.object.data = bpy.data.meshes[data]
                 tmp_ob = bpy.context.object.name



More information about the Bf-extensions-cvs mailing list