mirror of
https://github.com/cyberboy666/r_e_c_u_r.git
synced 2025-12-12 03:10:17 +01:00
Merge branch 'feature_plugins' into feature_plugins_shader_gadgets
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# Auto-generated Actions list
|
# Auto-generated Actions list
|
||||||
|
|
||||||
Fri 31 Jan 20:24:05 UTC 2020
|
Fri 31 Jan 21:14:27 UTC 2020
|
||||||
|
|
||||||
for branch=feature_plugins_shader_gadgets
|
for branch=feature_plugins_shader_gadgets
|
||||||
|
|
||||||
@@ -173,6 +173,7 @@ for branch=feature_plugins_shader_gadgets
|
|||||||
* set_shader_speed_layer_([0-2])_amount
|
* set_shader_speed_layer_([0-2])_amount
|
||||||
|
|
||||||
### Plugin routes
|
### Plugin routes
|
||||||
|
* (.*)|invert (from ManipulatePlugin)
|
||||||
* (.*)&&(.*) (from MultiActionsPlugin)
|
* (.*)&&(.*) (from MultiActionsPlugin)
|
||||||
* run_automation (from ShaderLoopRecordPlugin)
|
* run_automation (from ShaderLoopRecordPlugin)
|
||||||
* stop_automation (from ShaderLoopRecordPlugin)
|
* stop_automation (from ShaderLoopRecordPlugin)
|
||||||
@@ -199,6 +200,8 @@ for branch=feature_plugins_shader_gadgets
|
|||||||
* toggle_pause_automation (from TestPlugin)
|
* toggle_pause_automation (from TestPlugin)
|
||||||
* pause_automation (from TestPlugin)
|
* pause_automation (from TestPlugin)
|
||||||
* toggle_loop_automation (from TestPlugin)
|
* toggle_loop_automation (from TestPlugin)
|
||||||
|
* print_arguments (from TestPlugin)
|
||||||
|
* set_the_shader_param_([0-3])_layer_offset_([0-2])_continuous_inverted_example (from TestPlugin)
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|||||||
@@ -12,11 +12,11 @@ grep " def " actions.py | grep -v "^#" | sed -e 's/ def //' | sed -e 's/self//'
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
echo "## Dynamic routes"
|
echo "## Dynamic routes"
|
||||||
grep '( r"' actions.py | sed -e 's/\(.*\)"\(.*\)"\(.*\)/ * \2/' | sed -e 's/\$//' | sed -e 's/\^//'
|
grep '( r"' actions.py | sed -e 's/\(.*\)"\(.*\)"\(.*\)/ * \2/' | sed -e 's/\$//' | sed -e 's/\^//' | sed -e 's/\\//'
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo "### Plugin routes"
|
echo "### Plugin routes"
|
||||||
grep "( r\"" plugins/*.py | sed -e 's/plugins\/\(.*\)\.py:\(.*\)\( r\"\)\(.*\)\"\(.*\)/ * \4\t(from \1)/' | grep -v "open_serial" | sed -e 's/\$//' | sed -e 's/\^//'
|
grep "( r\"" plugins/*.py | sed -e 's/plugins\/\(.*\)\.py:\(.*\)\( r\"\)\(.*\)\"\(.*\)/ * \4\t(from \1)/' | grep -v "open_serial" | sed -e 's/\$//' | sed -e 's/\^//' | sed -e 's/\\//'
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo "----"
|
echo "----"
|
||||||
|
|||||||
22
plugins/ManipulatePlugin.py
Normal file
22
plugins/ManipulatePlugin.py
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
import data_centre.plugin_collection
|
||||||
|
from data_centre.plugin_collection import ActionsPlugin#, SequencePlugin
|
||||||
|
|
||||||
|
class ManipulatePlugin(ActionsPlugin):
|
||||||
|
disabled = False
|
||||||
|
|
||||||
|
def __init__(self, plugin_collection):
|
||||||
|
super().__init__(plugin_collection)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def parserlist(self):
|
||||||
|
return [
|
||||||
|
( r"(.*)\|invert$", self.invert ),
|
||||||
|
]
|
||||||
|
|
||||||
|
def invert(self, action, value):
|
||||||
|
# invert the value
|
||||||
|
self.pc.actions.call_method_name(
|
||||||
|
action, 1.0 - value
|
||||||
|
# if you were calling an action with no argument, use eg:
|
||||||
|
# "toggle_automation_pause", None
|
||||||
|
)
|
||||||
@@ -17,6 +17,8 @@ class MidiActionsTestPlugin(ActionsPlugin,SequencePlugin):
|
|||||||
( r"^toggle_pause_automation$", self.toggle_pause_automation ),
|
( r"^toggle_pause_automation$", self.toggle_pause_automation ),
|
||||||
( r"^pause_automation$", self.pause_automation ),
|
( r"^pause_automation$", self.pause_automation ),
|
||||||
( r"^toggle_loop_automation$", self.toggle_loop_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):
|
def test_plugin(self):
|
||||||
@@ -49,3 +51,13 @@ class MidiActionsTestPlugin(ActionsPlugin,SequencePlugin):
|
|||||||
"set_the_shader_param_1_layer_0_continuous", position
|
"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
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user