[Blender] 打印特定集合的子级
还在摸索着查blender的api手册,存一下备忘。
#打印特定集合的子级
import bpy
for collection in bpy.data.collections["Collection"].children:
print("collection: ", collection.name)
for obj in collection.all_objects:
print("object: ", obj.name)
资料来自几年前的帖子,以及api手册:
https://blender.stackexchange.com/questions/144928/how-to-list-all-collections-and-their-objects
https://docs.blender.org/api/current/bpy.types.Collection.html#collection-id
