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:
authorBastien Montagne <bastien@blender.org>2021-08-04 16:13:20 +0300
committerBastien Montagne <bastien@blender.org>2021-08-04 17:57:08 +0300
commita8185d2d74d42389d881890897958c1223eb5cf1 (patch)
treee9eab20ce57ab466979bed877253e450b03cc2e4 /tests
parent2af789d1f3b8a36d0578997bea5f907e31a613ed (diff)
LibOverride: Add RNA API to reset/delete overrides.
Ref. T86656.
Diffstat (limited to 'tests')
-rw-r--r--tests/python/bl_blendfile_library_overrides.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/python/bl_blendfile_library_overrides.py b/tests/python/bl_blendfile_library_overrides.py
index 19f06dc698e..358f77d49ea 100644
--- a/tests/python/bl_blendfile_library_overrides.py
+++ b/tests/python/bl_blendfile_library_overrides.py
@@ -71,6 +71,16 @@ class TestLibraryOverrides(TestHelper, unittest.TestCase):
# Setting location.y overridded all elements in the location array. -1 is a wildcard.
assert(override_operation.subitem_local_index == -1)
+ local_id.override_library.reset()
+
+ assert(len(local_id.override_library.properties) == 0)
+ assert(local_id.location == local_id.override_library.reference.location)
+
+ local_id_name = local_id.name
+ assert(bpy.data.objects.get((local_id_name, None), None) == local_id)
+ local_id.override_library.destroy()
+ assert(bpy.data.objects.get((local_id_name, None), None) == None)
+
def test_link_permissive(self):
"""
Linked assets with a permissive template.