forked from bartvdbraak/blender
fix [#27742] Smart UV project no longer works in 2.58
failed with active, unselected objects.
This commit is contained in:
parent
3cf2e6b7dc
commit
fd60b73b7b
@ -812,21 +812,25 @@ def main(context, island_margin, projection_limit):
|
|||||||
global RotMatStepRotation
|
global RotMatStepRotation
|
||||||
main_consts()
|
main_consts()
|
||||||
|
|
||||||
#XXX objects= bpy.data.scenes.active.objects
|
# TODO, all selected meshes
|
||||||
objects = context.selected_editable_objects
|
'''
|
||||||
|
# objects = context.selected_editable_objects
|
||||||
|
objects = []
|
||||||
|
|
||||||
# we can will tag them later.
|
# we can will tag them later.
|
||||||
obList = [ob for ob in objects if ob.type == 'MESH']
|
obList = [ob for ob in objects if ob.type == 'MESH']
|
||||||
|
|
||||||
# Face select object may not be selected.
|
# Face select object may not be selected.
|
||||||
#XXX ob = objects.active
|
ob = context.active_object
|
||||||
ob= objects[0]
|
|
||||||
|
|
||||||
if ob and (not ob.select) and ob.type == 'MESH':
|
if ob and (not ob.select) and ob.type == 'MESH':
|
||||||
# Add to the list
|
# Add to the list
|
||||||
obList =[ob]
|
obList =[ob]
|
||||||
del objects
|
del objects
|
||||||
|
'''
|
||||||
|
|
||||||
|
# quick workaround
|
||||||
|
obList = [ob for ob in [context.active_object] if ob and ob.type == 'MESH']
|
||||||
|
|
||||||
if not obList:
|
if not obList:
|
||||||
raise('error, no selected mesh objects')
|
raise('error, no selected mesh objects')
|
||||||
|
Loading…
Reference in New Issue
Block a user