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:
authorCampbell Barton <ideasman42@gmail.com>2018-11-08 01:06:57 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-08 01:06:57 +0300
commit70df942d31aaaa3d25b7c5543f28529cc51170cc (patch)
tree74b2052407199ef2eba2632a0b9483ba20b59a13 /io_anim_bvh
parent5725f500a11c23707426d3b79376e74d8d802920 (diff)
Update for changes in Blender's API
Diffstat (limited to 'io_anim_bvh')
-rw-r--r--io_anim_bvh/import_bvh.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/io_anim_bvh/import_bvh.py b/io_anim_bvh/import_bvh.py
index 0a9e4b30..f609ca6c 100644
--- a/io_anim_bvh/import_bvh.py
+++ b/io_anim_bvh/import_bvh.py
@@ -348,7 +348,7 @@ def bvh_node_dict2objects(context, bvh_name, bvh_nodes, rotate_mode='NATIVE', fr
scene = context.scene
for obj in scene.objects:
- obj.select_set("DESELECT")
+ obj.select_set(False)
objects = []
@@ -356,7 +356,7 @@ def bvh_node_dict2objects(context, bvh_name, bvh_nodes, rotate_mode='NATIVE', fr
obj = bpy.data.objects.new(name, None)
context.collection.objects.link(obj)
objects.append(obj)
- obj.select_set("SELECT")
+ obj.select_set(True)
# nicer drawing.
obj.empty_display_type = 'CUBE'
@@ -422,14 +422,14 @@ def bvh_node_dict2armature(
# Add the new armature,
scene = context.scene
for obj in scene.objects:
- obj.select_set("DESELECT")
+ obj.select_set(False)
arm_data = bpy.data.armatures.new(bvh_name)
arm_ob = bpy.data.objects.new(bvh_name, arm_data)
context.collection.objects.link(arm_ob)
- arm_ob.select_set("SELECT")
+ arm_ob.select_set(True)
context.view_layer.objects.active = arm_ob
bpy.ops.object.mode_set(mode='OBJECT', toggle=False)