From ea2e46dccb3ad6f8dc92a66f690f2c058a3e28d5 Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Wed, 19 Aug 2020 11:36:59 +0800 Subject: [PATCH] Part: allow TaskAttachmentEditor to install attacher extension on demand --- src/Mod/Part/AttachmentEditor/TaskAttachmentEditor.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Mod/Part/AttachmentEditor/TaskAttachmentEditor.py b/src/Mod/Part/AttachmentEditor/TaskAttachmentEditor.py index cd33e428a5..270d894c55 100644 --- a/src/Mod/Part/AttachmentEditor/TaskAttachmentEditor.py +++ b/src/Mod/Part/AttachmentEditor/TaskAttachmentEditor.py @@ -187,6 +187,12 @@ class AttachmentEditorTaskPanel(FrozenClass): self.callback_Apply = callback_Apply self.obj = obj_to_attach + try: + if not self.obj.hasExtension('Part::AttachExtension'): + self.obj.addExtension('Part::AttachExtensionPython') + except Exception: + pass + if hasattr(obj_to_attach,'Attacher'): self.attacher = obj_to_attach.Attacher elif hasattr(obj_to_attach,'AttacherType'):