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:
authorPeter Kim <pk15950@gmail.com>2022-09-08 07:00:43 +0300
committerPeter Kim <pk15950@gmail.com>2022-09-08 07:00:43 +0300
commite83f88c951e26b01893acee4f24b40a46062a41c (patch)
tree09f60bf7d4fc2ae1ef50668823e416fc675b252e /magic_uv/common.py
parentec84e3294593e2e26475f18c81e847bf00dc201e (diff)
parent0cd92169d40ae1c7e103ff269e850eaf1b901646 (diff)
Merge branch 'master' into xr-devxr-dev
Diffstat (limited to 'magic_uv/common.py')
-rw-r--r--magic_uv/common.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/magic_uv/common.py b/magic_uv/common.py
index fccce1c4..f76fcc67 100644
--- a/magic_uv/common.py
+++ b/magic_uv/common.py
@@ -1242,11 +1242,14 @@ def __is_points_in_polygon(points, subject_points):
def get_uv_editable_objects(context):
if compat.check_version(2, 80, 0) < 0:
- objs = [context.active_object]
+ objs = []
else:
objs = [o for o in bpy.data.objects
if compat.get_object_select(o) and o.type == 'MESH']
- objs.append(context.active_object)
+
+ ob = context.active_object
+ if ob is not None:
+ objs.append(ob)
objs = list(set(objs))
return objs