I’m working with Blender and have a particular workflow where I want to make sure that newly created objects are NOT automatically added to a certain target collection, even when that collection is currently selected or active in the Outliner.
Context: We are creating collection and adding objects to it as part of our add-on code. When the add-on is deactivated, the collection and objects are destroyed as per design. When user activates the add-on and if selects the created collection and adds objects they get added to this collection. We want this to be preventable, even if user has selected the collection inadvertently.
I understand that Blender by default adds new objects to the active collection, but I want to:
- Keep that target collection selected or active (for other reasons),
- But prevent new objects from being linked to it automatically.
Is there a way to "lock" or "protect" a collection from receiving new objects? Or any workflow, setting, or scripting solution that prevents this? I’m open to Python scripting solutions, UI tricks, or addon recommendations.