acoolrocket

Blender - Rename collections hidden in render to DEL_

Oct 16th, 2025
8
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. import bpy
  2.  
  3. prefix = "DEL__"
  4. changed = []
  5.  
  6. for coll in bpy.data.collections:
  7. if coll.hide_render:
  8. if not coll.name.startswith(prefix):
  9. coll.name = prefix + coll.name
  10. changed.append(coll.name)
  11. else:
  12. changed.append(coll.name) # already prefixed
  13.  
  14. if changed:
  15. print(f"Marked {len(changed)} collections (prefix='{prefix}'):")
  16. for n in changed:
  17. print(" ", n)
  18. else:
  19. print("No collections with render disabled were found.")
Advertisement
Add Comment
Please, Sign In to add comment