From 4b25801f640ee49f49c63d4de6871504236ce6b7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 5 Aug 2022 15:07:16 +1000 Subject: Fix T99496: Magic UV error in menu search --- magic_uv/common.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'magic_uv/common.py') 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 -- cgit v1.2.3