diff options
author | Stephen Leger <stephen@3dservices.ch> | 2017-08-26 01:33:26 +0300 |
---|---|---|
committer | Stephen Leger <stephen@3dservices.ch> | 2017-08-26 01:33:48 +0300 |
commit | 31499a1ae035fa409d63602d1ffe5f2bf0f47f5c (patch) | |
tree | 083d83d98690235489df2178d7cbb0ce2d638537 /archipack/archipack_door.py | |
parent | 32dc2209dd67b8a6693d9acc59420a4d7b1e7efb (diff) |
archipack: fix performance issue in draw window/door tools
Diffstat (limited to 'archipack/archipack_door.py')
-rw-r--r-- | archipack/archipack_door.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/archipack/archipack_door.py b/archipack/archipack_door.py index c50398c6..22b9123a 100644 --- a/archipack/archipack_door.py +++ b/archipack/archipack_door.py @@ -1679,14 +1679,24 @@ class ARCHIPACK_OT_door_draw(ArchpackDrawTool, Operator): new_w = o.copy() new_w.data = o.data context.scene.objects.link(new_w) + # instance subs + for child in o.children: + if "archipack_hole" not in child: + new_c = child.copy() + new_c.data = child.data + new_c.parent = new_w + context.scene.objects.link(new_c) + # dup handle if any + for c in child.children: + new_h = c.copy() + new_h.data = c.data + new_h.parent = new_c + context.scene.objects.link(new_h) o = new_w o.select = True context.scene.objects.active = o - # synch subs from parent instance - bpy.ops.archipack.door(mode="REFRESH") - else: bpy.ops.archipack.door(auto_manipulate=False, filepath=self.filepath) o = context.active_object |