2025-12-01
This commit is contained in:
@@ -32,7 +32,7 @@ def _assign(
|
||||
if remove:
|
||||
collections.remove(coll_prop)
|
||||
|
||||
enum = next(i for i in enums if i[0] == key)
|
||||
enum = next(e for e in enums if e[0] == key)
|
||||
collections.insert(enums.index(enum), coll_prop)
|
||||
|
||||
|
||||
@@ -47,9 +47,15 @@ def _generate_id_types() -> dict[str, IDType]:
|
||||
collections.sort(key=lambda c: c.identifier)
|
||||
|
||||
if bpy.app.version >= (4, 3, 0):
|
||||
if bpy.app.version >= (5, 0, 0):
|
||||
collections.remove(next(c for c in collections if c.identifier == 'annotations'))
|
||||
_assign('CURVES', 'hair_curves', enums, collections)
|
||||
_assign('GREASEPENCIL', 'grease_pencils', enums, collections)
|
||||
_assign('GREASEPENCIL_V3', 'grease_pencils_v3', enums, collections)
|
||||
if bpy.app.version >= (5, 0, 0):
|
||||
_assign('GREASEPENCIL', 'grease_pencils', enums, collections, remove=False)
|
||||
_assign('GREASEPENCIL_V3', 'grease_pencils', enums, collections)
|
||||
else:
|
||||
_assign('GREASEPENCIL', 'grease_pencils', enums, collections)
|
||||
_assign('GREASEPENCIL_V3', 'grease_pencils_v3', enums, collections)
|
||||
_assign('KEY', 'shape_keys', enums, collections)
|
||||
_assign('LIGHT_PROBE', 'lightprobes', enums, collections)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user