aboutsummaryrefslogtreecommitdiff
path: root/rumba/storyboard.py
diff options
context:
space:
mode:
Diffstat (limited to 'rumba/storyboard.py')
-rw-r--r--rumba/storyboard.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/rumba/storyboard.py b/rumba/storyboard.py
index 6b56a92..c652073 100644
--- a/rumba/storyboard.py
+++ b/rumba/storyboard.py
@@ -1065,6 +1065,22 @@ class StoryBoard(_SBEntity):
"""
self.schedule_node_state(t, node, 'down')
+ def schedule_destroy_dif(self, t, dif):
+ """
+ Destroys a DIF at the specified time.
+
+ :param t: the time in the storyboard at which the state
+ change should happen
+ :type t: `float`
+ :param dif: the DIF which should go down
+ :type dif: `rumba.model.DIF`
+ """
+ if self.experiment is None:
+ raise ValueError("An experiment is needed to schedule commands.")
+
+ action = functools.partial(self.experiment.destroy_dif, dif)
+ self.add_event(Event(action, ev_time=t))
+
def write_script(self, buffer):
"""
Writes the script on a (string-oriented) buffer,