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 04:04:35 +0300
committerNBurn <7nburn@gmail.com>2019-01-29 04:04:35 +0300
commitedd2de62eb13284f7e02256701fec1483973018d (patch)
tree02a6ab0c10b9131e346d2e55b36bfd14873fafa3 /io_export_unreal_psk_psa.py
parentbdc109a5309b26c718a3ae0ca6f2393c731fde0d (diff)
addons: view_layer.objects.active syntax update
Diffstat (limited to 'io_export_unreal_psk_psa.py')
-rw-r--r--io_export_unreal_psk_psa.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/io_export_unreal_psk_psa.py b/io_export_unreal_psk_psa.py
index 651b9e1e..7b7272be 100644
--- a/io_export_unreal_psk_psa.py
+++ b/io_export_unreal_psk_psa.py
@@ -1036,7 +1036,7 @@ def meshmerge(selectedobjects):
# begin merging the mesh together as one
for count in range(len(cloneobjects)):
if count == 0:
- bpy.context.scene.objects.active = cloneobjects[count]
+ bpy.context.view_layer.objects.active = cloneobjects[count]
print("Set Active Object:", cloneobjects[count].name)
cloneobjects[count].select_set(True)
bpy.ops.object.join() # join object together
@@ -2030,7 +2030,7 @@ class OBJECT_OT_UTSelectedFaceSmooth(Operator):
i.select_set(False) # deselect all objects
obj.select_set(True) # set current object select
- bpy.context.scene.objects.active = obj # set active object
+ bpy.context.view_layer.objects.active = obj # set active object
mesh = bmesh.new()
mesh.from_mesh(obj.data)
@@ -2089,7 +2089,7 @@ def rebuildmesh(obj):
for i in bpy.context.scene.objects:
i.select_set(False) # deselect all objects
obj.select_set(True)
- bpy.context.scene.objects.active = obj
+ bpy.context.view_layer.objects.active = obj
me_ob = bpy.data.meshes.new(("Re_" + obj.name))
mesh = obj.data
@@ -2223,7 +2223,7 @@ def rebuildarmature(obj):
i.select_set(False) # deselect all objects
ob_new.select_set(True)
- bpy.context.scene.objects.active = obj
+ bpy.context.view_layer.objects.active = obj
bpy.ops.object.mode_set(mode='EDIT')
for bone in obj.data.edit_bones:
@@ -2236,7 +2236,7 @@ def rebuildarmature(obj):
for i in bpy.context.scene.objects:
i.select_set(False) # deselect all objects
- bpy.context.scene.objects.active = ob_new
+ bpy.context.view_layer.objects.active = ob_new
bpy.ops.object.mode_set(mode='EDIT')
for bone in obj.data.bones:
@@ -2567,7 +2567,7 @@ def udkcheckmeshline():
i.select_set(False) # deselect all objects
objmesh.select_set(True)
- bpy.context.scene.objects.active = objmesh # set active mesh
+ bpy.context.view_layer.objects.active = objmesh # set active mesh
wedges = ObjMap()
points = ObjMap()
bpy.ops.object.mode_set(mode='EDIT') # set in edit mode