From 09bad0d6889568cf4c4bf658446968dbcd0bfbca Mon Sep 17 00:00:00 2001 From: Legonzaur <34353603+Legonzaur@users.noreply.github.com> Date: Mon, 17 Jul 2023 15:45:10 +0200 Subject: [PATCH] Create Decimate LOD.py --- Decimate LOD.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Decimate LOD.py diff --git a/Decimate LOD.py b/Decimate LOD.py new file mode 100644 index 0000000..95f33ee --- /dev/null +++ b/Decimate LOD.py @@ -0,0 +1,9 @@ +import bpy +assets = bpy.data.collections['Assets'].children +for asset in assets: + materials = [] + for object in reversed(asset.objects): + if(object.active_material in materials): + bpy.data.objects.remove(object, do_unlink=True) + else: + materials.append(object.active_material)