helper functions for getting variables from ManipulatePlugin into other parts of recur code

This commit is contained in:
Tristan Rowley
2020-03-10 23:47:16 +00:00
parent ce2624326d
commit 9739f4c03c
5 changed files with 227 additions and 4 deletions

View File

@@ -103,6 +103,12 @@ class ManipulatePlugin(ActionsPlugin,DisplayPlugin,ModulationReceiverPlugin):
if self.DEBUG: print("ManipulatePlugin>> set_variable (%s) to %s" % (var_name, value))
self.variables[var_name] = value
def get_variable(self, var_name, default):
if var_name in self.variables:
return self.variables[var_name]
else:
return default
def recall_variable(self, var_name, action, *args):
if self.DEBUG: print ("ManipulatePlugin>> recall_variable (%s) as %s" % (var_name,args))
self.pc.actions.call_method_name(