diff --git a/stopmagic/functions/is_candidate_object.py b/stopmagic/functions/is_candidate_object.py new file mode 100644 index 0000000..4d24d43 --- /dev/null +++ b/stopmagic/functions/is_candidate_object.py @@ -0,0 +1,11 @@ +from __future__ import annotations +import bpy + + +def is_candidate_object(context: bpy.types.Context | None) -> bool: + if context is None: + context = bpy.context + if context.view_layer.objects.active is None: + return False + else: + return context.view_layer.objects.active.type == "MESH"