Unittests: Workaround for basact->object.id.name written as DATA

This was introduced on e7fb013a60. Although I would love to investigate the
issue I'm mostly concerned with gettings the tests working again.
This commit is contained in:
Dalai Felinto 2017-07-17 15:03:35 +02:00
parent a258c5d325
commit aa578fba53
Notes: blender-bot 2023-02-14 11:20:29 +01:00
Referenced by commit 0e49d5376c, Revert "Unittests: Workaround for basact->object.id.name written as DATA"
1 changed files with 9 additions and 1 deletions

View File

@ -55,9 +55,17 @@ def get_layer(layer):
name = layer.get(b'name')
data['name'] = name
data['active_object'] = layer.get((b'basact', b'object', b'id', b'name'))[2:]
data['engine'] = layer.get(b'engine')
# There is a bug in blender where basact->object is saved as DATA*
# introduced on rBe7fb013a60dd
active_object = layer.get((b'basact', b'object', b'id', b'name'))
if active_object.startswith('DATA'):
data['active_object'] = ""
else:
data['active_object'] = active_object[2:]
objects = []
for link in linkdata_iter(layer, b'object_bases'):
ob = link.get_pointer(b'object')