From ae56f48d701ade3b7541f751cc21e4adaee7cca3 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 2 Dec 2026 02:00:19 +0100 Subject: [PATCH] mesh_object refuses an object in no collection A deleted object a closure still points to stays in the file; attach, set_params, report, boolean and every polish operator found it by name. The refusal moves from close into mesh_object, which they all share (finding cut-kit-joints.s2.attach-onto-orphan-and-ends-first-unpinned, part 1). Co-Authored-By: Claude Fable 5.2 --- surfaces/blender/brokkr_kitbash/__init__.py | 3 --- surfaces/blender/brokkr_mesh_polish/__init__.py | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/surfaces/blender/brokkr_kitbash/__init__.py b/surfaces/blender/brokkr_kitbash/__init__.py index 8edb244..3e19063 100644 --- a/surfaces/blender/brokkr_kitbash/__init__.py +++ b/surfaces/blender/brokkr_kitbash/__init__.py @@ -498,9 +498,6 @@ class BROKKR_KITBASH_OT_close(PolishOperator): other_part, other_built = built_part(other) if obj == other: raise Refused(f"{obj.name!r} cannot close on itself; nothing changed.") - for gone in (obj, other): - if not gone.users_collection: - raise Refused(f"{gone.name!r} is in no collection (a deleted object something still points to): a closure is between parts in the scene; nothing changed.") if closure(obj) is not None: raise Refused(f"{obj.name!r} already states a closure (its socket {closure(obj)[0]!r}): a part states one, and detach clears it; nothing changed.") there, here = mated(other, other_part, other_built, obj, part, built, (self.socket, self.other_socket, 0.0), "closing on") diff --git a/surfaces/blender/brokkr_mesh_polish/__init__.py b/surfaces/blender/brokkr_mesh_polish/__init__.py index 915ab5d..d1043c1 100644 --- a/surfaces/blender/brokkr_mesh_polish/__init__.py +++ b/surfaces/blender/brokkr_mesh_polish/__init__.py @@ -32,6 +32,8 @@ def mesh_object(name: str): obj = bpy.data.objects.get(name) if obj is None or obj.type != "MESH": raise Refused(f"No mesh object named {name!r}.") + if not obj.users_collection: + raise Refused(f"{name!r} is in no collection (a deleted object something still points to); nothing changed.") return obj