2025-12-01

This commit is contained in:
2026-03-17 14:58:51 -06:00
parent 183e865f8b
commit 4b82b57113
6846 changed files with 954887 additions and 162606 deletions
@@ -1,6 +1,6 @@
schema_version = "1.0.0"
id = "datablock_utils"
version = "1.2.0"
version = "1.2.3"
name = "Data-Block Utilities"
tagline = "Show users, merge duplicates, find similar, and more"
maintainer = "Leonardo Pike-Excell <leonardopike.excell@gmail.com>"
@@ -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:
@@ -402,7 +402,9 @@ def find_similar_and_duplicate_ntrees(id_type: str) -> None:
def find_duplicate_images() -> None:
duplicates = []
for _, raw_group in groupby(sorted(bpy.data.images, key=get_image_props), get_image_props):
images = [i for i in bpy.data.images if not i.library]
images.sort(key=get_image_props)
for _, raw_group in groupby(images, get_image_props):
group = [i.name for i in raw_group]
if len(group) > 1:
duplicates.append(group)