Part: allow TaskAttachmentEditor to install attacher extension on demand
This commit is contained in:
@@ -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'):
|
||||
|
||||
Reference in New Issue
Block a user