Revision: 25364 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=25364 Author: blendix Date: 2009-12-14 15:08:04 +0100 (Mon, 14 Dec 2009)
Log Message: ----------- Fix #20356: ctrl+1/2/.. could set multires levels outside limits. Modified Paths: -------------- trunk/blender/release/scripts/op/object.py Modified: trunk/blender/release/scripts/op/object.py =================================================================== --- trunk/blender/release/scripts/op/object.py 2009-12-14 13:45:45 UTC (rev 25363) +++ trunk/blender/release/scripts/op/object.py 2009-12-14 14:08:04 UTC (rev 25364) @@ -94,11 +94,14 @@ level = self.properties.level ob = context.active_object for mod in ob.modifiers: - if mod.type == 'MULTIRES' and ob.mode == 'SCULPT': - if mod.sculpt_levels != level: - mod.sculpt_levels = level + if mod.type == 'MULTIRES': + if level < mod.total_levels: + if ob.mode == 'SCULPT' and mod.sculpt_levels != level: + mod.sculpt_levels = level + elif ob.mode == 'OBJECT' and mod.levels != level: + mod.levels = level return ('FINISHED',) - elif mod.type == 'SUBSURF' or mod.type == 'MULTIRES': + elif mod.type == 'SUBSURF': if mod.levels != level: mod.levels = level return ('FINISHED',) _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs