Browse Source

Action cycle action

Bastien Sevajol 9 years ago
parent
commit
b4a709b060
1 changed files with 7 additions and 0 deletions
  1. 7 0
      intelligine/synergy/event/smell/SmellAction.py

+ 7 - 0
intelligine/synergy/event/smell/SmellAction.py View File

@@ -7,6 +7,13 @@ class SmellAction(Action):
7 7
 
8 8
     _listen = SmellEvent
9 9
 
10
+    @classmethod
11
+    def cycle_pre_run(cls, context, synergy_manager):
12
+        smell_positions = context.metas.list.get(POINTS_SMELL, POINTS_SMELL, allow_empty=True)
13
+        for smell_position in smell_positions:
14
+            context.metas.value.unset(POINT_SMELL, smell_position)
15
+        context.metas.list.unset(POINTS_SMELL, POINTS_SMELL, allow_empty=True)
16
+
10 17
     def run(self, obj, context, synergy_manager):
11 18
 
12 19
         points_distances = self._parameters['points_distances']