minor changes made before commit broke this script

This commit is contained in:
2009-11-26 16:05:32 +00:00
parent 64f552356a
commit c3937c93d5

View File

@@ -34,12 +34,13 @@ class SubsurfSet(bpy.types.Operator):
return (ob and ob.type == 'MESH')
def execute(self, context):
level = self.properties.level
ob = context.active_object
for mod in ob.modifiers:
if mod.type == 'SUBSURF':
if mod.levels != level:
mod.levels = level
return
return ('FINISHED',)
# adda new modifier
bpy.ops.object.modifier_add(type='SUBSURF') # TODO, support adding directly