diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-06-24 08:12:01 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-06-24 08:12:01 +0400 |
commit | fd60b73b7bf7387cc54a5a1ac8c4b30488fb7903 (patch) | |
tree | 472f4d99d586809e7c2c5da020fc006a9209acee /release/scripts/startup/bl_operators | |
parent | 3cf2e6b7dce2bfd0e8811ab035212149401b16b7 (diff) |
fix [#27742] Smart UV project no longer works in 2.58
failed with active, unselected objects.
Diffstat (limited to 'release/scripts/startup/bl_operators')
-rw-r--r-- | release/scripts/startup/bl_operators/uvcalc_smart_project.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/release/scripts/startup/bl_operators/uvcalc_smart_project.py b/release/scripts/startup/bl_operators/uvcalc_smart_project.py index c70b9071985..3e1ce621ec2 100644 --- a/release/scripts/startup/bl_operators/uvcalc_smart_project.py +++ b/release/scripts/startup/bl_operators/uvcalc_smart_project.py @@ -812,21 +812,25 @@ def main(context, island_margin, projection_limit): global RotMatStepRotation main_consts() -#XXX objects= bpy.data.scenes.active.objects - objects = context.selected_editable_objects - + # TODO, all selected meshes + ''' + # objects = context.selected_editable_objects + objects = [] # we can will tag them later. obList = [ob for ob in objects if ob.type == 'MESH'] # Face select object may not be selected. -#XXX ob = objects.active - ob= objects[0] + ob = context.active_object if ob and (not ob.select) and ob.type == 'MESH': # Add to the list obList =[ob] del objects + ''' + + # quick workaround + obList = [ob for ob in [context.active_object] if ob and ob.type == 'MESH'] if not obList: raise('error, no selected mesh objects') |