Timeline for How do I create a script to delete all objects sharing the same texture/material in all collections?
Current License: CC BY-SA 4.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 4, 2022 at 0:30 | history | edited | Marty Fouts |
edited tags
|
|
Apr 19, 2022 at 21:16 | answer | added | Marty Fouts | timeline score: 2 | |
Apr 18, 2022 at 13:47 | comment | added | Marty Fouts |
iterate over bpy.data.materials searching the node trees for image textures. Each time you find an image texture check the image. If it's one you want to delete, add the material to a list. Then iterate over bpy.data.objects searching the material slots of each object. If any of the material slots have any of the materials you found in the first search, delete the object.
|
|
S Apr 18, 2022 at 12:39 | review | First questions | |||
Apr 18, 2022 at 13:41 | |||||
S Apr 18, 2022 at 12:39 | history | asked | Kieren Philip | CC BY-SA 4.0 |