A little question about scripting in blender 2.5
I would like to add a ‘SUBSURF’ modifier on each objects of the scene wich doesn’t have yet.
But my operator works only for the selected object (as expected).
Could you help me to find the right loop please?
def lowres(): add_modifier = bpy.ops.object.modifier_add(type='SUBSURF') for objs in bpy.data.objects: for mod in objs.modifiers: if mod.type == 'MULTIRES': mod.show_only_control_edges = True mod.levels = 0 mod.render_levels = 2 elif mod.type == 'SUBSURF': mod.levels = 0 mod.render_levels = 2 #HERE I WOULD APPLY MY MODIFIER (if object hasn't yet) #BUT WITH THIS CODE IT WORKS ONLY FOR THE CURRENT OBJECT. else: add_modifier()