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:
authorNBurn <7nburn@gmail.com>2019-01-29 17:08:23 +0300
committerNBurn <7nburn@gmail.com>2019-01-29 17:08:23 +0300
commit5c994fde52196dfe8a7e0db03b6935bac001d353 (patch)
treea7836a0741695b78df699e59a30f2a527202a815 /io_export_unreal_psk_psa.py
parent8b93448f56ecdf9c91ad1b6297580eedf1f6e18f (diff)
addons: more view_layer syntax updates
Diffstat (limited to 'io_export_unreal_psk_psa.py')
-rw-r--r--io_export_unreal_psk_psa.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/io_export_unreal_psk_psa.py b/io_export_unreal_psk_psa.py
index 7b7272be..8695ee5e 100644
--- a/io_export_unreal_psk_psa.py
+++ b/io_export_unreal_psk_psa.py
@@ -978,6 +978,7 @@ def triangulate_mesh(object):
verbose(header("triangulateNMesh"))
# print(type(object))
scene = bpy.context.scene
+ view_layer = bpy.context.view_layer
me_ob = object.copy()
me_ob.data = object.to_mesh(bpy.context.scene, True, 'PREVIEW') # write data object
@@ -989,7 +990,7 @@ def triangulate_mesh(object):
i.select_set(False) # deselect all objects
me_ob.select_set(True)
- scene.objects.active = me_ob
+ view_layer.objects.active = me_ob
print("Copy and Convert mesh just incase any way...")
@@ -1083,11 +1084,12 @@ def parse_mesh(mesh, psk):
print(header("MESH", 'RIGHT'))
print("Mesh object:", mesh.name)
scene = bpy.context.scene
+ view_layer = bpy.context.view_layer
for i in scene.objects:
i.select_set(False) # deselect all objects
- scene.objects.active = mesh
+ view_layer.objects.active = mesh
setmesh = mesh
mesh = triangulate_mesh(mesh)