Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-11-08 00:51:03 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-08 00:54:55 +0300
commitf12d2adc870e4bc032f49b9edae85c3b0366b406 (patch)
tree26b1b336bcbdbe37559df3a94febfe3aaa1e4a8e /tests
parentc121bc62193ab22b37cf3d8cf7bd1d21205f1f3c (diff)
RNA: Object.select_set use boolean, only select
- Was setting active state, making it necessary to backup/restore active object in cases where this isn't needed. Existing scripts are explicitly setting the active object when needed. - Use a boolean select arg (toggle selection wasn't used anywhere). - Add an optional view layer argument since scripts should be able to operate outside the user context.
Diffstat (limited to 'tests')
-rw-r--r--tests/python/view_layer/test_evaluation_selectability_a.py2
-rw-r--r--tests/python/view_layer/test_evaluation_selectability_b.py2
-rw-r--r--tests/python/view_layer/test_evaluation_selectability_c.py2
-rw-r--r--tests/python/view_layer/test_evaluation_selectability_d.py2
-rw-r--r--tests/python/view_layer/test_evaluation_selectability_e.py2
-rw-r--r--tests/python/view_layer/test_group_e.py4
-rw-r--r--tests/python/view_layer/test_make_single_user.py2
-rw-r--r--tests/python/view_layer/test_scene_copy_e.py2
8 files changed, 9 insertions, 9 deletions
diff --git a/tests/python/view_layer/test_evaluation_selectability_a.py b/tests/python/view_layer/test_evaluation_selectability_a.py
index f862ca55c86..eaed40869c3 100644
--- a/tests/python/view_layer/test_evaluation_selectability_a.py
+++ b/tests/python/view_layer/test_evaluation_selectability_a.py
@@ -38,7 +38,7 @@ class UnitTesting(ViewLayerTesting):
layer_collection_mom.enabled = False
bpy.context.scene.update() # update depsgraph
- cube.select_set('SELECT')
+ cube.select_set(True)
self.assertTrue(cube.visible_get(), "Cube should be visible")
self.assertTrue(cube.select_get(), "Cube should be selected")
diff --git a/tests/python/view_layer/test_evaluation_selectability_b.py b/tests/python/view_layer/test_evaluation_selectability_b.py
index 91f5dc3de2b..584011c672c 100644
--- a/tests/python/view_layer/test_evaluation_selectability_b.py
+++ b/tests/python/view_layer/test_evaluation_selectability_b.py
@@ -36,7 +36,7 @@ class UnitTesting(ViewLayerTesting):
layer_collection_mom = layer.collections.link(scene_collection_mom)
layer_collection_kid = layer.collections.link(scene_collection_kid)
bpy.context.scene.update() # update depsgraph
- cube.select_set('SELECT')
+ cube.select_set(True)
layer_collection_mom.collections[layer_collection_kid.name].enabled = False
layer_collection_kid.enabled = False
diff --git a/tests/python/view_layer/test_evaluation_selectability_c.py b/tests/python/view_layer/test_evaluation_selectability_c.py
index c1ce5dba815..3eecaa06aeb 100644
--- a/tests/python/view_layer/test_evaluation_selectability_c.py
+++ b/tests/python/view_layer/test_evaluation_selectability_c.py
@@ -38,7 +38,7 @@ class UnitTesting(ViewLayerTesting):
layer_collection_mom.enabled = True
bpy.context.scene.update() # update depsgraph
- cube.select_set('SELECT')
+ cube.select_set(True)
self.assertTrue(cube.visible_get(), "Cube should be visible")
self.assertTrue(cube.select_get(), "Cube should be selected")
diff --git a/tests/python/view_layer/test_evaluation_selectability_d.py b/tests/python/view_layer/test_evaluation_selectability_d.py
index 1af8a0dbd59..c645551c5ed 100644
--- a/tests/python/view_layer/test_evaluation_selectability_d.py
+++ b/tests/python/view_layer/test_evaluation_selectability_d.py
@@ -39,7 +39,7 @@ class UnitTesting(ViewLayerTesting):
layer_collection_mom.enabled = True
bpy.context.scene.update() # update depsgraph
- cube.select_set('SELECT')
+ cube.select_set(True)
layer_collection_mom.collections[layer_collection_kid.name].selectable = False
bpy.context.scene.update() # update depsgraph
diff --git a/tests/python/view_layer/test_evaluation_selectability_e.py b/tests/python/view_layer/test_evaluation_selectability_e.py
index 54df1e9b59b..e2f0e911bbe 100644
--- a/tests/python/view_layer/test_evaluation_selectability_e.py
+++ b/tests/python/view_layer/test_evaluation_selectability_e.py
@@ -37,7 +37,7 @@ class UnitTesting(ViewLayerTesting):
layer_collection_kid = layer.collections.link(scene_collection_kid)
layer_collection_mom.enabled = True
- cube.select_set('SELECT')
+ cube.select_set(True)
layer_collection_mom.collections[layer_collection_kid.name].selectable = False
layer_collection_kid.enabled = False
diff --git a/tests/python/view_layer/test_group_e.py b/tests/python/view_layer/test_group_e.py
index 566c043572e..14385411eca 100644
--- a/tests/python/view_layer/test_group_e.py
+++ b/tests/python/view_layer/test_group_e.py
@@ -51,9 +51,9 @@ class UnitTesting(ViewLayerTesting):
# we could just pass an overridden context
# but let's do it the old fashion way
view_layer.objects.active = ob
- ob.select_set('SELECT')
+ ob.select_set(True)
self.assertTrue(ob.select_get())
- empty.select_set('DESELECT')
+ empty.select_set(False)
self.assertFalse(empty.select_get())
# update depsgraph
diff --git a/tests/python/view_layer/test_make_single_user.py b/tests/python/view_layer/test_make_single_user.py
index 292c2d50605..973c191f22d 100644
--- a/tests/python/view_layer/test_make_single_user.py
+++ b/tests/python/view_layer/test_make_single_user.py
@@ -36,7 +36,7 @@ class UnitTesting(ViewLayerTesting):
master_collection.collections[0])
view_layer.collections.link(master_collection)
- ob.select_set('SELECT')
+ ob.select_set(True)
# update depsgraph
scene.update()
diff --git a/tests/python/view_layer/test_scene_copy_e.py b/tests/python/view_layer/test_scene_copy_e.py
index 23d01b6a84b..a2d314a037a 100644
--- a/tests/python/view_layer/test_scene_copy_e.py
+++ b/tests/python/view_layer/test_scene_copy_e.py
@@ -26,7 +26,7 @@ class UnitTesting(ViewLayerTesting):
layer = bpy.context.view_layer
original_cube = layer.objects.get('Cube')
- original_cube.select_set('SELECT')
+ original_cube.select_set(True)
self.assertTrue(original_cube.select_get())
bpy.ops.scene.new(type='FULL_COPY')