Blender version: 2.9 and above (but probably going back to 2.8).
Workflow:
- Object linked from separate file.
- Library Override added to linked object
- Modifier added to override object
- Python Script attempts to remove said modifier
Resulting error:
Operator bpy.ops.object.modifier_remove.poll() Cannot edit modifiers coming from linked data in a library override | Error in execute function of DeleteArray
I'm struggling with this, because the same modifiers I'm trying to remove via Python, but can't, I can manually delete in the user interface.
obj.modifiers.remove(mod). Are you sure you are not trying to remove a modifier that was originally on the linked object ? Could be helpful to post a snippet of your code – Gorgious Mar 23 '21 at 16:07bpy.ops.object.modifier_remove(modifier="Array", report=False)on the active object. I wasn't aware of the method you posted, but it works! Thank you very much. (P.S. I was definitely doing this on a modifier added after the override, but your way works with modifiers that came from the linked source file too!). – David Gilson Mar 23 '21 at 22:05