feat: various images format support

feat: world environment image support
This commit is contained in:
Swann
2020-09-18 15:25:52 +02:00
parent fe6ffd19b4
commit ca5aebfeff
6 changed files with 78 additions and 41 deletions
+5 -2
View File
@@ -78,10 +78,13 @@ def resolve_from_id(id, optionnal_type=None):
return root[id]
return None
def get_datablock_from_uuid(uuid, default):
def get_datablock_from_uuid(uuid, default, ignore=[]):
if not uuid:
return default
for category in dir(bpy.data):
root = getattr(bpy.data, category)
if isinstance(root, Iterable):
if isinstance(root, Iterable) and category not in ignore:
for item in root:
if getattr(item, 'uuid', None) == uuid:
return item