mirror of
https://github.com/blender/blender-addons.git
synced 2025-08-25 05:05:55 +00:00
script was not working if nothing was selected
This commit is contained in:
@ -57,8 +57,9 @@ def relax_mesh(self, context):
|
||||
me_name = me_old.name
|
||||
|
||||
# deselect everything that's not related
|
||||
for o in bpy.context.selected_objects:
|
||||
o.selected = False
|
||||
if bpy.context.selected_objects:
|
||||
for o in bpy.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!
|
||||
|
Reference in New Issue
Block a user