fix: get_datablock_users attribute error

This commit is contained in:
Swann 2020-09-21 17:37:06 +02:00
parent c533d4b86a
commit fb622fa098
No known key found for this signature in database
GPG Key ID: E1D3641A7C43AACB

View File

@ -49,7 +49,7 @@ def get_datablock_users(datablock):
if hasattr(datablock, 'users_group') and datablock.users_scene:
users.extend(list(datablock.users_scene))
for datatype in supported_types:
if datatype.bl_name != 'users':
if datatype.bl_name != 'users' and hasattr(bpy.data, datatype.bl_name):
root = getattr(bpy.data, datatype.bl_name)
for item in root:
if hasattr(item, 'data') and datablock == item.data or \