[Bf-extensions-cvs] [ffedd850] master: archipack: fix manipulator stack cleanup dict item delete during iteration

Stephen Leger noreply at git.blender.org
Sat May 13 19:54:09 CEST 2017


Commit: ffedd850bd415d0af8ecda97052271f899735a54
Author: Stephen Leger
Date:   Sat May 13 19:53:47 2017 +0200
Branches: master
https://developer.blender.org/rBACffedd850bd415d0af8ecda97052271f899735a54

archipack: fix manipulator stack cleanup dict item delete during iteration

===================================================================

M	archipack/archipack_manipulator.py

===================================================================

diff --git a/archipack/archipack_manipulator.py b/archipack/archipack_manipulator.py
index fafb4fa2..1a103370 100644
--- a/archipack/archipack_manipulator.py
+++ b/archipack/archipack_manipulator.py
@@ -1984,7 +1984,7 @@ def empty_stack(dummy):
         for m in manip_stack[key]:
             if m is not None:
                 m.exit()
-        del manip_stack[key]
+    manip_stack = {}
 
 
 def exit_stack(key):
@@ -1997,16 +1997,19 @@ def exit_stack(key):
             if m is not None:
                 m.exit()
         del manip_stack[key]
-
+    
 
 def clean_stack():
     """
         remove references to renamed or deleted objects from stack
     """
     global manip_stack
+    key_to_remove = []
     for key in manip_stack.keys():
         if bpy.data.objects.find(key) is None:
-            exit_stack(key)
+            key_to_remove.append(key)
+    for key in key_to_remove:
+        exit_stack(key)
 
 
 def get_stack(key):



More information about the Bf-extensions-cvs mailing list