Merge branch 'feature_plugins' into feature_plugins_shader_gadgets

This commit is contained in:
Tristan Rowley
2020-01-31 21:14:56 +00:00
4 changed files with 40 additions and 3 deletions

View File

@@ -17,6 +17,8 @@ class MidiActionsTestPlugin(ActionsPlugin,SequencePlugin):
( r"^toggle_pause_automation$", self.toggle_pause_automation ),
( r"^pause_automation$", self.pause_automation ),
( r"^toggle_loop_automation$", self.toggle_loop_automation ),
( r"^print_arguments$", self.print_arguments ),
( r"^set_the_shader_param_([0-3])_layer_offset_([0-2])_continuous_inverted_example$", self.invert_shader_param_layer )
]
def test_plugin(self):
@@ -49,3 +51,13 @@ class MidiActionsTestPlugin(ActionsPlugin,SequencePlugin):
"set_the_shader_param_1_layer_0_continuous", position
)
def print_arguments(self, *args):
print(">>>>print_arguments ( %s )" % args)
def invert_shader_param_layer(self, param, layer, value):
# invert the value
self.pc.actions.call_method_name(
"set_the_shader_param_%s_layer_offset_%s_continuous" % ( param, layer), 1.0 - value
# if you were calling an action with no argument, use eg:
# "toggle_automation_pause", None
)