code cleanup: dont use 'bpy.context' when 'context' is available

This commit is contained in:
Campbell Barton
2013-01-23 07:52:31 +00:00
parent 6b51bb39c8
commit fd35d42bf4
6 changed files with 49 additions and 45 deletions

View File

@@ -516,7 +516,7 @@ def lightmap_uvpack(meshes,
def unwrap(operator, context, **kwargs):
is_editmode = (bpy.context.object.mode == 'EDIT')
is_editmode = (context.object.mode == 'EDIT')
if is_editmode:
bpy.ops.object.mode_set(mode='OBJECT', toggle=False)