diff options
Diffstat (limited to 'release/scripts/startup/bl_operators/uvcalc_lightmap.py')
-rw-r--r-- | release/scripts/startup/bl_operators/uvcalc_lightmap.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/release/scripts/startup/bl_operators/uvcalc_lightmap.py b/release/scripts/startup/bl_operators/uvcalc_lightmap.py index 198b3660ff8..b24a71365b4 100644 --- a/release/scripts/startup/bl_operators/uvcalc_lightmap.py +++ b/release/scripts/startup/bl_operators/uvcalc_lightmap.py @@ -189,14 +189,14 @@ class prettyface(object): def lightmap_uvpack(meshes, - PREF_SEL_ONLY=True, - PREF_NEW_UVLAYER=False, - PREF_PACK_IN_ONE=False, - PREF_APPLY_IMAGE=False, - PREF_IMG_PX_SIZE=512, - PREF_BOX_DIV=8, - PREF_MARGIN_DIV=512 - ): + PREF_SEL_ONLY=True, + PREF_NEW_UVLAYER=False, + PREF_PACK_IN_ONE=False, + PREF_APPLY_IMAGE=False, + PREF_IMG_PX_SIZE=512, + PREF_BOX_DIV=8, + PREF_MARGIN_DIV=512 + ): """ BOX_DIV if the maximum division of the UV map that a box may be consolidated into. @@ -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) |