Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2022-08-05 08:08:19 +0300
committerCampbell Barton <ideasman42@gmail.com>2022-08-05 08:08:19 +0300
commitbc99864f5122ed8e81a2db9492cef6a1192a7f2f (patch)
tree739682094021badf554ed19d0386958b78d70aba /magic_uv/op/copy_paste_uv_object.py
parentd0fa5bc86185a32acbf9ea79ea209d9d8a1f2935 (diff)
parent4b25801f640ee49f49c63d4de6871504236ce6b7 (diff)
Merge branch 'blender-v3.3-release'
Diffstat (limited to 'magic_uv/op/copy_paste_uv_object.py')
-rw-r--r--magic_uv/op/copy_paste_uv_object.py9
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