diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-12-07 22:56:59 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-12-07 22:56:59 +0300 |
commit | a321e2b139289a5ea9f330125a70d4fa388fde62 (patch) | |
tree | 3ee7e092b7e7e45a4f6b164df5539223b6013113 /release | |
parent | 82ddfbf99fc0776a7fe439b81cf71bab87ceaaf9 (diff) |
Sculpt Branch:
Subdivision set with Ctrl+1-5 now works for multires as well.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/op/object.py | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/release/scripts/op/object.py b/release/scripts/op/object.py index 86678176fc9..e29259cacfb 100644 --- a/release/scripts/op/object.py +++ b/release/scripts/op/object.py @@ -75,16 +75,16 @@ class SelectPattern(bpy.types.Operator): row.prop(props, "extend") -class SubsurfSet(bpy.types.Operator): +class SubdivisionSet(bpy.types.Operator): '''Sets a Subdivision Surface Level (1-5)''' - bl_idname = "object.subsurf_set" - bl_label = "Subsurf Set" + bl_idname = "object.subdivision_set" + bl_label = "Subdivision Set" bl_register = True bl_undo = True level = IntProperty(name="Level", - default=1, min=0, max=6) + default=1, min=0, max=100, soft_min=0, soft_max=6) def poll(self, context): ob = context.active_object @@ -94,7 +94,11 @@ class SubsurfSet(bpy.types.Operator): level = self.properties.level ob = context.active_object for mod in ob.modifiers: - if mod.type == 'SUBSURF': + if mod.type == 'MULTIRES' and ob.mode == 'SCULPT': + if mod.sculpt_levels != level: + mod.sculpt_levels = level + return ('FINISHED',) + elif mod.type == 'SUBSURF' or mod.type == 'MULTIRES': if mod.levels != level: mod.levels = level return ('FINISHED',) @@ -120,5 +124,6 @@ class Retopo(bpy.types.Operator): bpy.ops.add(SelectPattern) -bpy.ops.add(SubsurfSet) +bpy.ops.add(SubdivisionSet) bpy.ops.add(Retopo) + |