From cec3e304fa4f60737bf4c5c4e621dea0b9f4c3e3 Mon Sep 17 00:00:00 2001 From: Eric Gentry Date: Tue, 28 May 2019 18:55:20 -0400 Subject: [PATCH] More Blender 2.80 python API updates. --- mesh_mesh_align_plus/__init__.py | 2 +- mesh_mesh_align_plus/align_lines.py | 4 ++-- mesh_mesh_align_plus/align_planes.py | 6 +++--- mesh_mesh_align_plus/axis_rotate.py | 2 +- mesh_mesh_align_plus/scale_match_edge.py | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/mesh_mesh_align_plus/__init__.py b/mesh_mesh_align_plus/__init__.py index 78b4812..f614990 100644 --- a/mesh_mesh_align_plus/__init__.py +++ b/mesh_mesh_align_plus/__init__.py @@ -33,7 +33,7 @@ "based on geometry and measurements from your scene." ), "author": "Eric Gentry", - "version": (0, 5, 2), + "version": (0, 5, 3), "blender": (2, 80, 0), "location": ( "3D View > N Panel > Mesh Align Plus tab, and" diff --git a/mesh_mesh_align_plus/align_lines.py b/mesh_mesh_align_plus/align_lines.py index 1528615..3ccb0bd 100644 --- a/mesh_mesh_align_plus/align_lines.py +++ b/mesh_mesh_align_plus/align_lines.py @@ -149,7 +149,7 @@ def execute(self, context): item.rotation_euler.rotate( rotational_diff ) - bpy.context.scene.update() + bpy.context.view_layer.update() # put the original line starting point (before the object # was rotated) into the local object space @@ -169,7 +169,7 @@ def execute(self, context): item.location = ( item.location + pivot_to_dest ) - bpy.context.scene.update() + bpy.context.view_layer.update() else: for item in multi_edit_targets: diff --git a/mesh_mesh_align_plus/align_planes.py b/mesh_mesh_align_plus/align_planes.py index b0048a3..1ab9d0e 100644 --- a/mesh_mesh_align_plus/align_planes.py +++ b/mesh_mesh_align_plus/align_planes.py @@ -204,13 +204,13 @@ def execute(self, context): item.rotation_euler.rotate( rotational_diff ) - bpy.context.scene.update() + bpy.context.view_layer.update() # Parallelize the leading edges item.rotation_euler.rotate( parallelize_edges ) - bpy.context.scene.update() + bpy.context.view_layer.update() # get local coords using active object as basis, in # other words, determine coords of the source pivot @@ -239,7 +239,7 @@ def execute(self, context): item.location + pivot_to_dest ) - bpy.context.scene.update() + bpy.context.view_layer.update() else: for item in multi_edit_targets: diff --git a/mesh_mesh_align_plus/axis_rotate.py b/mesh_mesh_align_plus/axis_rotate.py index 67bad55..2e4b2e8 100644 --- a/mesh_mesh_align_plus/axis_rotate.py +++ b/mesh_mesh_align_plus/axis_rotate.py @@ -139,7 +139,7 @@ def execute(self, context): # Perform the rotation (axis will be realigned later) item.rotation_euler.rotate(axis_rot) - bpy.context.scene.update() + bpy.context.view_layer.update() # put the original line starting point (before the object # was rotated) into the local object space diff --git a/mesh_mesh_align_plus/scale_match_edge.py b/mesh_mesh_align_plus/scale_match_edge.py index 80fda97..44b0581 100644 --- a/mesh_mesh_align_plus/scale_match_edge.py +++ b/mesh_mesh_align_plus/scale_match_edge.py @@ -206,7 +206,7 @@ def execute(self, context): scale_factor * num for num in item.scale ] - bpy.context.scene.update() + bpy.context.view_layer.update() # put the original line starting point (before the object # was transformed) into the local object space @@ -227,7 +227,7 @@ def execute(self, context): item.location = ( item.location + new_to_old_pivot ) - bpy.context.scene.update() + bpy.context.view_layer.update() else: for item in multi_edit_targets: