Using Blender with cell fracture I have created a code that should select the objects created by cell fracture and give them the collision attribute and it does but only one out of a 1000. So it doesn't really work but then I am a newbie to Blender and Python so what I want it to do is select one object give it collision and move on to the next object created by cell fracture and give it collision and do this until it is done.
By the way I am using Blender version 2.69
This is the code that I have so far written and I do not know why it is does not increment to the next part.
import bpy from bpy import ops for i in bpy.data.objects: if i.name.startswith("Sphere"): # Select object: bpy.ops.object.select_pattern(pattern=i.name) # Add modifier: bpy.ops.object.modifier_add(type='COLLISION') print("finally! this code saved you from clicking your mouse 1400 times!!!")