diff options
author | Peter Kim <pk15950@gmail.com> | 2022-09-08 07:00:43 +0300 |
---|---|---|
committer | Peter Kim <pk15950@gmail.com> | 2022-09-08 07:00:43 +0300 |
commit | e83f88c951e26b01893acee4f24b40a46062a41c (patch) | |
tree | 09f60bf7d4fc2ae1ef50668823e416fc675b252e /magic_uv/op/copy_paste_uv_object.py | |
parent | ec84e3294593e2e26475f18c81e847bf00dc201e (diff) | |
parent | 0cd92169d40ae1c7e103ff269e850eaf1b901646 (diff) |
Merge branch 'master' into xr-devxr-dev
Diffstat (limited to 'magic_uv/op/copy_paste_uv_object.py')
-rw-r--r-- | magic_uv/op/copy_paste_uv_object.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/magic_uv/op/copy_paste_uv_object.py b/magic_uv/op/copy_paste_uv_object.py index 39795b52..897891e4 100644 --- a/magic_uv/op/copy_paste_uv_object.py +++ b/magic_uv/op/copy_paste_uv_object.py @@ -30,15 +30,16 @@ def _is_valid_context(context): if not common.is_valid_space(context, ['VIEW_3D']): return False + # Only object mode is allowed to execute. + ob = context.object + if ob is not None and ob.mode != 'OBJECT': + return False + # Multiple objects editing mode is not supported in this feature. objs = common.get_uv_editable_objects(context) if len(objs) != 1: return False - # only object mode is allowed to execute - if context.object.mode != 'OBJECT': - return False - return True |