2017-01-30 63 views

回答

0

的对象保持它的一个列表的孩子obj.children

import bpy 

for obj in bpy.data.objects['comp_1_1_2_a'].children: 
    if len(obj.material_slots) == 0: 
     bpy.context.scene.objects.active = obj 
     bpy.ops.object.material_slot_add() 
    obj.material_slots[0].material = bpy.data.materials['Material'] 
+0

感谢很多:) –