diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-04-24 23:35:58 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-04-24 23:35:58 +0400 |
commit | 9c0724824822b9fec5562081f6e3d5d1f26c732d (patch) | |
tree | 542280cba7877a12f1d64cd82ef2dbc80d2e652f /mesh_relax.py | |
parent | b1337de16a1220947a17e41d0b5d78da91c67b4a (diff) |
collections like context.selected_objects no longer return None for empty lists. Update scripts for this.
also removed check for obj.data == None for a mesh. This will never happen.
Diffstat (limited to 'mesh_relax.py')
-rw-r--r-- | mesh_relax.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/mesh_relax.py b/mesh_relax.py index 0d7e756a..9211659a 100644 --- a/mesh_relax.py +++ b/mesh_relax.py @@ -50,14 +50,13 @@ import bpy from bpy.props import IntProperty def relax_mesh(context): - + + # deselect everything that's not related + for obj in context.selected_objects: + obj.selected = False + # get active object obj = context.active_object - - # deselect everything that's not related - if context.selected_objects: - for o in context.selected_objects: - o.selected = False # duplicate the object so it can be used for the shrinkwrap modifier obj.selected = True # make sure the object is selected! |