diff options
Diffstat (limited to 'magic_uv/op/align_uv.py')
-rw-r--r-- | magic_uv/op/align_uv.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/magic_uv/op/align_uv.py b/magic_uv/op/align_uv.py index 9f606db9..cf5a49de 100644 --- a/magic_uv/op/align_uv.py +++ b/magic_uv/op/align_uv.py @@ -4,8 +4,8 @@ __author__ = "imdjs, Nutti <nutti.metro@gmail.com>" __status__ = "production" -__version__ = "6.5" -__date__ = "6 Mar 2021" +__version__ = "6.6" +__date__ = "22 Apr 2022" import math from math import atan2, tan, sin, cos @@ -28,6 +28,12 @@ from .. import common def _is_valid_context(context): + # 'IMAGE_EDITOR' and 'VIEW_3D' space is allowed to execute. + # If 'View_3D' space is not allowed, you can't find option in Tool-Shelf + # after the execution + if not common.is_valid_space(context, ['IMAGE_EDITOR', 'VIEW_3D']): + return False + objs = common.get_uv_editable_objects(context) if not objs: return False @@ -36,12 +42,6 @@ def _is_valid_context(context): if context.object.mode != 'EDIT': return False - # 'IMAGE_EDITOR' and 'VIEW_3D' space is allowed to execute. - # If 'View_3D' space is not allowed, you can't find option in Tool-Shelf - # after the execution - if not common.is_valid_space(context, ['IMAGE_EDITOR', 'VIEW_3D']): - return False - return True |